Lines Matching refs:pme
77 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
80 fmt->fmt = pme->dim.enc_format;
81 fmt->width = pme->dim.video_width;
82 fmt->height = pme->dim.video_height;
93 mm_camera_app_obj_t *pme = (mm_camera_app_obj_t *)user_data;
96 rc = my_cam_app.hal_lib.mm_camera_do_munmap_ion (pme->ionfd, &(pme->video_buf.frame[i].fd_data),
97 (void *)pme->video_buf.frame[i].buffer, pme->video_buf.frame_len);
118 mm_camera_app_obj_t *pme = (mm_camera_app_obj_t *)user_data;
133 pme->video_buf.reg[i] = 1;
136 pme->video_buf.frame_len = frame_len;
137 pme->video_buf.frame[i].ion_alloc.len = pme->video_buf.frame_len;
138 pme->video_buf.frame[i].ion_alloc.flags =
140 pme->video_buf.frame[i].ion_alloc.align = 4096;
142 pmem_addr = (unsigned long) my_cam_app.hal_lib.mm_camera_do_mmap_ion(pme->ionfd,
143 &(pme->video_buf.frame[i].ion_alloc), &(pme->video_buf.frame[i].fd_data),
144 &pme->video_buf.frame[i].fd);
146 pme->video_buf.frame[i].buffer = pmem_addr;
147 pme->video_buf.frame[i].path = OUTPUT_TYPE_V;
148 pme->video_buf.frame[i].y_off = 0;
149 pme->video_buf.frame[i].cbcr_off = planes[0];
150 pme->video_buf.frame[i].phy_offset = 0;
152 CDBG("Buffer allocated Successfully fd = %d",pme->video_buf.frame[i].fd);
154 bufs[i].fd = pme->video_buf.frame[i].fd;
156 bufs[i].frame_len = pme->video_buf.frame[i].ion_alloc.len;
159 bufs[i].frame = &pme->video_buf.frame[i];
181 void video_cb_signal(mm_camera_app_obj_t *pme)
183 if(pme->cam_state == CAMERA_STATE_RECORD) {
193 mm_camera_app_obj_t *pme = NULL;
196 pme = (mm_camera_app_obj_t *)user_data;
202 dumpFrameToFile(frame,pme->dim.orig_video_width,pme->dim.orig_video_height,"video", 1);
203 if(MM_CAMERA_OK != pme->cam->ops->qbuf(pme->cam->camera_handle,pme->ch_id,frame))
208 video_cb_signal(pme);
216 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
218 mm_app_set_video_fmt(cam_id,&pme->stream[MM_CAMERA_VIDEO].str_config.fmt);
219 pme->stream[MM_CAMERA_VIDEO].str_config.need_stream_on = 1;
220 pme->stream[MM_CAMERA_VIDEO].str_config.num_of_bufs = VIDEO_BUF_NUM;
222 if(MM_CAMERA_OK != (rc = pme->cam->ops->config_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_VIDEO].id,
223 &pme->stream[MM_CAMERA_VIDEO].str_config))) {
230 pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config.need_stream_on = pme->fullSizeSnapshot;
231 pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config.num_of_bufs = 1;
233 mm_app_set_live_snapshot_fmt(cam_id,&pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config.fmt);
235 if(MM_CAMERA_OK != (rc = pme->cam->ops->config_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id,
236 &pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config))) {
249 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
251 pme->stream[MM_CAMERA_VIDEO].id = pme->cam->ops->add_stream(pme->cam->camera_handle,pme->ch_id,
252 mm_app_video_notify_cb,pme,
255 if(!pme->stream[MM_CAMERA_VIDEO].id) {
261 CDBG("Add stream is successfull stream ID = %d",pme->stream[MM_CAMERA_PREVIEW].id);
264 pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id = pme->cam->ops->add_stream(pme->cam->camera_handle,pme->ch_id,
265 NULL,pme,
268 CDBG("Add Snapshot main is successfull stream ID = %d",pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id);
269 if(!pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id) {
285 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
287 if(MM_CAMERA_OK != (rc = pme->cam->ops->del_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_VIDEO].id))){
292 if(MM_CAMERA_OK != (rc = pme->cam->ops->del_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id))){
306 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
313 stream[MM_CAMERA_VIDEO] = pme->stream[MM_CAMERA_VIDEO].id;
314 if(MM_CAMERA_OK != (rc = pme->cam->ops->start_streams(pme->cam->camera_handle,pme->ch_id,1,&stream[1])))
320 pme->cam_state = CAMERA_STATE_RECORD;
329 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
331 stream[0] = pme->stream[MM_CAMERA_VIDEO].id;
333 if(MM_CAMERA_OK != (rc =pme->cam->ops->stop_streams(pme->cam->camera_handle,pme->ch_id,1,&stream)))
339 pme->cam_state = CAMERA_STATE_PREVIEW;
349 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
351 stream[0] = pme->stream[MM_CAMERA_VIDEO].id;
364 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
366 CDBG("pme = %p, pme->cam =%p, pme->ch = %d pme->cam->camera_handle = %d",
367 pme,pme->cam,pme->ch_id,pme->cam->camera_handle);
390 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
393 if(pme->cam_mode == RECORDER_MODE) {
409 pme->cam->ops->set_parm(pme->cam->camera_handle,MM_CAMERA_PARM_RECORDING_HINT, &value);
411 pme->cam->ops->set_parm(pme->cam->camera_handle,MM_CAMERA_PARM_LOW_POWER_MODE, &powermode);
428 pme->cam_mode = RECORDER_MODE;
438 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
440 CDBG("%s: Start Recording mode = %d state = %d",__func__,pme->cam_mode,pme->cam_state);
442 if(pme->cam_mode == CAMERA_MODE || pme->cam_mode == ZSL_MODE) {
443 switch(pme->cam_state) {
458 CDBG("%s : startRecording : mode = %d state = %d",__func__,pme->cam_mode,pme->cam_state);
459 if(pme->cam_mode == RECORDER_MODE && pme->cam_state == CAMERA_STATE_PREVIEW){
473 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
475 if(pme->cam_mode != RECORDER_MODE || pme->cam_state != CAMERA_STATE_RECORD) {