Lines Matching refs:pme
225 mm_camera_app_obj_t *pme = NULL;
229 pme = mm_app_get_cam_obj(cam_id);
232 if(pme != NULL) {
238 pme = my_cam_app.obj[cam_id];
240 pme->mem_cam = (mm_camear_mem_vtbl_t *)malloc(sizeof(mm_camear_mem_vtbl_t));
241 memset(pme->mem_cam,0,sizeof(mm_camear_mem_vtbl_t));
242 pme->mem_cam->user_data = pme;
244 pme->cam = my_cam_app.hal_lib.mm_camera_open(cam_id,pme->mem_cam);
245 if(pme->cam == NULL) {
247 memset(pme,0, sizeof(pme));
250 CDBG("Open Camera id = %d handle = %d", cam_id, pme->cam->camera_handle);
252 pme->cam->ops->sync(pme->cam->camera_handle);
254 pme->my_id = cam_id;
255 pme->open_flag = TRUE;
256 mm_app_set_dim_def(&pme->dim);
260 pme->cam->ops->register_event_notify(pme->cam->camera_handle, notify_evt_cb, pme,evt);
262 pme->cam_state = CAMERA_STATE_OPEN;
263 pme->cam_mode = CAMERA_MODE;
264 pme->fullSizeSnapshot = 0;
266 pme->ch_id = pme->cam->ops->ch_acquire(pme->cam->camera_handle);
267 CDBG("Channel Acquired Successfully %d",pme->ch_id);
269 memset(&pme->jpeg_ops, 0, sizeof(mm_jpeg_ops_t));
270 pme->jpeg_hdl = my_cam_app.hal_lib.jpeg_open(&pme->jpeg_ops);
271 if (pme->jpeg_hdl == 0) {
277 pme->ionfd = open("/dev/ion", O_RDONLY);
278 if (pme->ionfd < 0) {
292 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
295 if(!pme->cam) {
300 pme->cam->ops->ch_release(pme->cam->camera_handle,pme->ch_id);
301 pme->cam->ops->camera_close(pme->cam->camera_handle);
302 pme->open_flag = FALSE;
303 pme->cam = NULL;
304 pme->my_id = 0;
305 free(pme->mem_cam);
306 pme->mem_cam = NULL;
307 memset(&pme->dim, 0, sizeof(pme->dim));
310 if (pme->jpeg_hdl && pme->jpeg_ops.close) {
311 pme->jpeg_ops.close(pme->jpeg_hdl);
312 pme->jpeg_hdl = 0;
314 close(pme->ionfd);
316 free(pme);
317 pme = NULL;
328 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
329 switch(pme->cam_state) {
349 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
355 switch(pme->cam_state) {
379 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
383 memcpy(&pme->dim, dim, sizeof(cam_ctrl_dimension_t));
384 if(MM_CAMERA_OK != (rc = pme->cam->ops->set_parm(
385 pme->cam->camera_handle,MM_CAMERA_PARM_DIMENSION, &pme->dim)))
397 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
399 if(pme->open_flag != TRUE) {
405 //memcpy(&pme->dim, dim, sizeof(cam_ctrl_dimension_t));
406 if(MM_CAMERA_OK != (rc = pme->cam->cfg->get_parm(pme->cam,
407 MM_CAMERA_PARM_DIMENSION, &pme->dim))) {
411 __func__, pme->dim.orig_picture_width, pme->dim.orig_picture_height);
413 memcpy(dim, &pme->dim, sizeof(cam_ctrl_dimension_t));
423 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
425 pme->cam->ops->ch_release(pme->cam->camera_handle,pme->ch_id);
444 int mm_stream_invalid_cache(mm_camera_app_obj_t *pme,mm_camera_buf_def_t *frame)
459 if (pme->stream[i].id == frame->stream_id) {
460 app_bufs = &pme->stream [i].app_bufs;
486 ion_fd = pme->ionfd;
501 int mm_stream_clear_invalid_cache(mm_camera_app_obj_t *pme,mm_camera_buf_def_t *frame)
515 if (pme->stream[i].id == frame->stream_id) {
516 app_bufs = &pme->stream [i].app_bufs;
542 ion_fd = pme->ionfd;
555 int mm_stream_alloc_bufs(mm_camera_app_obj_t *pme,
575 app_bufs->bufs[i].buffer = mm_camera_do_mmap_ion(pme->ionfd,
604 int mm_stream_release_bufs(mm_camera_app_obj_t *pme,
612 rc = mm_camera_do_munmap_ion (pme->ionfd,