Lines Matching defs:cam_obj
129 mm_camera_obj_t *cam_obj = NULL;
133 (NULL != g_cam_ctrl.cam_obj[cam_idx]) &&
134 (cam_handle == g_cam_ctrl.cam_obj[cam_idx]->my_hdl)) {
135 cam_obj = g_cam_ctrl.cam_obj[cam_idx];
137 return cam_obj;
372 * first empty g_cam_ctrl's referent to cam_obj */
373 g_cam_ctrl.cam_obj[cam_idx] = NULL;
1636 mm_camera_obj_t* cam_obj = NULL;
1646 if(NULL != g_cam_ctrl.cam_obj[camera_idx]) {
1648 g_cam_ctrl.cam_obj[camera_idx]->ref_count++;
1651 return &g_cam_ctrl.cam_obj[camera_idx]->vtbl;
1654 cam_obj = (mm_camera_obj_t *)malloc(sizeof(mm_camera_obj_t));
1655 if(NULL == cam_obj) {
1662 memset(cam_obj, 0, sizeof(mm_camera_obj_t));
1663 cam_obj->ctrl_fd = -1;
1664 cam_obj->ds_fd = -1;
1665 cam_obj->ref_count++;
1666 cam_obj->my_hdl = mm_camera_util_generate_handler(camera_idx);
1667 cam_obj->vtbl.camera_handle = cam_obj->my_hdl; /* set handler */
1668 cam_obj->vtbl.ops = &mm_camera_ops;
1669 pthread_mutex_init(&cam_obj->cam_lock, NULL);
1671 rc = mm_camera_open(cam_obj);
1674 pthread_mutex_destroy(&cam_obj->cam_lock);
1675 g_cam_ctrl.cam_obj[camera_idx] = NULL;
1676 free(cam_obj);
1677 cam_obj = NULL;
1682 g_cam_ctrl.cam_obj[camera_idx] = cam_obj;
1684 return &cam_obj->vtbl;