Lines Matching refs:pme
48 extern int mm_stream_invalid_cache(mm_camera_app_obj_t *pme,
85 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
88 fmt->fmt = pme->dim.enc_format;
89 fmt->width = pme->dim.video_width;
90 fmt->height = pme->dim.video_height;
101 mm_camera_app_obj_t *pme = (mm_camera_app_obj_t *)user_data;
104 rc = my_cam_app.hal_lib.mm_camera_do_munmap_ion (pme->ionfd, &(pme->video_buf.frame[i].fd_data),
105 (void *)pme->video_buf.frame[i].buffer, pme->video_buf.frame_len);
126 mm_camera_app_obj_t *pme = (mm_camera_app_obj_t *)user_data;
141 pme->video_buf.reg[i] = 1;
144 pme->video_buf.frame_len = frame_len;
145 pme->video_buf.frame[i].ion_alloc.len = pme->video_buf.frame_len;
146 pme->video_buf.frame[i].ion_alloc.flags =
148 pme->video_buf.frame[i].ion_alloc.align = 4096;
150 pmem_addr = (unsigned long) my_cam_app.hal_lib.mm_camera_do_mmap_ion(pme->ionfd,
151 &(pme->video_buf.frame[i].ion_alloc), &(pme->video_buf.frame[i].fd_data),
152 &pme->video_buf.frame[i].fd);
154 pme->video_buf.frame[i].buffer = pmem_addr;
155 pme->video_buf.frame[i].path = OUTPUT_TYPE_V;
156 pme->video_buf.frame[i].y_off = 0;
157 pme->video_buf.frame[i].cbcr_off = planes[0];
158 pme->video_buf.frame[i].phy_offset = 0;
160 CDBG("Buffer allocated Successfully fd = %d",pme->video_buf.frame[i].fd);
162 bufs[i].fd = pme->video_buf.frame[i].fd;
164 bufs[i].frame_len = pme->video_buf.frame[i].ion_alloc.len;
167 bufs[i].frame = &pme->video_buf.frame[i];
189 void video_cb_signal(mm_camera_app_obj_t *pme)
191 if(pme->cam_state == CAMERA_STATE_RECORD) {
202 mm_camera_app_obj_t *pme = NULL;
205 pme = (mm_camera_app_obj_t *)user_data;
211 snprintf(buf, sizeof(buf), "V_%dx%d_C%d", pme->dim.orig_video_width,
212 pme->dim.orig_video_height, pme->cam->camera_info->camera_id);
214 dumpFrameToFile(frame, pme->dim.orig_video_width,
215 pme->dim.orig_video_height, buf, 1,"yuv");
217 if(MM_CAMERA_OK != pme->cam->ops->qbuf(pme->cam->camera_handle,pme->ch_id,frame))
222 mm_stream_invalid_cache(pme,frame);
223 video_cb_signal(pme);
231 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
233 mm_app_set_video_fmt(cam_id,&pme->stream[MM_CAMERA_VIDEO].str_config.fmt);
234 pme->stream[MM_CAMERA_VIDEO].str_config.need_stream_on = 1;
235 pme->stream[MM_CAMERA_VIDEO].str_config.num_of_bufs = VIDEO_BUF_NUM;
237 if(MM_CAMERA_OK != (rc = pme->cam->ops->config_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_VIDEO].id,
238 &pme->stream[MM_CAMERA_VIDEO].str_config))) {
245 pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config.need_stream_on = pme->fullSizeSnapshot;
246 pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config.num_of_bufs = 1;
248 mm_app_set_live_snapshot_fmt(cam_id,&pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config.fmt);
250 if(MM_CAMERA_OK != (rc = pme->cam->ops->config_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id,
251 &pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config))) {
264 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
266 pme->stream[MM_CAMERA_VIDEO].id = pme->cam->ops->add_stream(pme->cam->camera_handle,pme->ch_id,
267 mm_app_video_notify_cb,pme,
270 if(!pme->stream[MM_CAMERA_VIDEO].id) {
276 CDBG("Add stream is successfull stream ID = %d",pme->stream[MM_CAMERA_PREVIEW].id);
279 pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id = pme->cam->ops->add_stream(pme->cam->camera_handle,pme->ch_id,
280 NULL,pme,
283 CDBG("Add Snapshot main is successfull stream ID = %d",pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id);
284 if(!pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id) {
300 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
302 if(MM_CAMERA_OK != (rc = pme->cam->ops->del_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_VIDEO].id))){
307 if(MM_CAMERA_OK != (rc = pme->cam->ops->del_stream(pme->cam->camera_handle,pme->ch_id,pme->stream[MM_CAMERA_SNAPSHOT_MAIN].id))){
321 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
328 stream = pme->stream[MM_CAMERA_VIDEO].id;
329 if(MM_CAMERA_OK != (rc = pme->cam->ops->start_streams(pme->cam->camera_handle,pme->ch_id,1,&stream)))
335 pme->cam_state = CAMERA_STATE_RECORD;
344 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
346 stream = pme->stream[MM_CAMERA_VIDEO].id;
348 if(MM_CAMERA_OK != (rc =pme->cam->ops->stop_streams(pme->cam->camera_handle,pme->ch_id,1,&stream)))
354 pme->cam_state = CAMERA_STATE_PREVIEW;
364 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
366 stream[0] = pme->stream[MM_CAMERA_VIDEO].id;
379 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
381 CDBG("pme = %p, pme->cam =%p, pme->ch = %d pme->cam->camera_handle = %d",
382 pme,pme->cam,pme->ch_id,pme->cam->camera_handle);
405 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
408 if(pme->cam_mode == RECORDER_MODE) {
425 pme->cam->ops->set_parm(pme->cam->camera_handle,MM_CAMERA_PARM_RECORDING_HINT, &value);
427 pme->cam->ops->set_parm(pme->cam->camera_handle,MM_CAMERA_PARM_LOW_POWER_MODE, &powermode);
444 pme->cam_mode = RECORDER_MODE;
454 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
456 CDBG("%s: Start Recording mode = %d state = %d",__func__,pme->cam_mode,pme->cam_state);
458 if(pme->cam_mode == CAMERA_MODE || pme->cam_mode == ZSL_MODE) {
459 switch(pme->cam_state) {
474 CDBG("%s : startRecording : mode = %d state = %d",__func__,pme->cam_mode,pme->cam_state);
475 if(pme->cam_mode == RECORDER_MODE && pme->cam_state == CAMERA_STATE_PREVIEW){
489 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
491 if(pme->cam_mode != RECORDER_MODE || pme->cam_state != CAMERA_STATE_RECORD) {