Lines Matching refs:cam_obj
124 mm_camera_obj_t *cam_obj = NULL;
128 (NULL != g_cam_ctrl.cam_obj[cam_idx]) &&
129 (cam_handle == g_cam_ctrl.cam_obj[cam_idx]->my_hdl)) {
130 cam_obj = g_cam_ctrl.cam_obj[cam_idx];
132 return cam_obj;
427 * first empty g_cam_ctrl's referent to cam_obj */
428 g_cam_ctrl.cam_obj[cam_idx] = NULL;
1362 mm_camera_obj_t* cam_obj = NULL;
1372 if(NULL != g_cam_ctrl.cam_obj[camera_idx]) {
1374 g_cam_ctrl.cam_obj[camera_idx]->ref_count++;
1377 return &g_cam_ctrl.cam_obj[camera_idx]->vtbl;
1380 cam_obj = (mm_camera_obj_t *)malloc(sizeof(mm_camera_obj_t));
1381 if(NULL == cam_obj) {
1388 memset(cam_obj, 0, sizeof(mm_camera_obj_t));
1389 cam_obj->ref_count++;
1390 cam_obj->my_hdl = mm_camera_util_generate_handler(camera_idx);
1391 cam_obj->vtbl.camera_handle = cam_obj->my_hdl; /* set handler */
1392 cam_obj->vtbl.ops = &mm_camera_ops;
1393 pthread_mutex_init(&cam_obj->cam_lock, NULL);
1395 rc = mm_camera_open(cam_obj);
1398 pthread_mutex_destroy(&cam_obj->cam_lock);
1399 g_cam_ctrl.cam_obj[camera_idx] = NULL;
1400 free(cam_obj);
1401 cam_obj = NULL;
1406 g_cam_ctrl.cam_obj[camera_idx] = cam_obj;
1408 return &cam_obj->vtbl;