Home | History | Annotate | Download | only in src

Lines Matching defs:test_obj

471     mm_camera_test_obj_t *test_obj =
473 if (test_obj == NULL || test_obj->cam->camera_handle != camera_handle) {
495 mm_camera_test_obj_t *test_obj)
502 test_obj->cam = cam_app->hal_lib.mm_camera_open((uint8_t)cam_id);
503 if(test_obj->cam == NULL) {
508 CDBG("Open Camera id = %d handle = %d", cam_id, test_obj->cam->camera_handle);
514 rc = mm_app_alloc_bufs(&test_obj->cap_buf,
525 rc = test_obj->cam->ops->map_buf(test_obj->cam->camera_handle,
527 test_obj->cap_buf.mem_info.fd,
528 test_obj->cap_buf.mem_info.size);
537 rc = mm_app_alloc_bufs(&test_obj->parm_buf,
548 rc = test_obj->cam->ops->map_buf(test_obj->cam->camera_handle,
550 test_obj->parm_buf.mem_info.fd,
551 test_obj->parm_buf.mem_info.size);
556 test_obj->params_buffer = (parm_buffer_t*) test_obj->parm_buf.mem_info.data;
557 CDBG_HIGH("\n%s params_buffer=%p\n",__func__,test_obj->params_buffer);
559 rc = test_obj->cam->ops->register_event_notify(test_obj->cam->camera_handle,
561 test_obj);
568 rc = test_obj->cam->ops->query_capability(test_obj->cam->camera_handle);
574 memset(&test_obj->jpeg_ops, 0, sizeof(mm_jpeg_ops_t));
579 test_obj->jpeg_hdl = cam_app->hal_lib.jpeg_open(&test_obj->jpeg_ops,pic_size);
580 if (test_obj->jpeg_hdl == 0) {
589 test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
592 mm_app_release_bufs(1, &test_obj->parm_buf);
594 test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
597 mm_app_release_bufs(1, &test_obj->cap_buf);
599 test_obj->cam->ops->close_camera(test_obj->cam->camera_handle);
600 test_obj->cam = NULL;
618 int commit_set_batch(mm_camera_test_obj_t *test_obj)
624 if(test_obj->params_buffer->is_valid[i])
628 CDBG_HIGH("\n set_param p_buffer =%p\n",test_obj->params_buffer);
629 rc = test_obj->cam->ops->set_parms(test_obj->cam->camera_handle, test_obj->params_buffer);
637 int mm_app_close(mm_camera_test_obj_t *test_obj)
641 if (test_obj == NULL || test_obj->cam ==NULL) {
647 rc = test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
654 rc = test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
660 rc = test_obj->cam->ops->close_camera(test_obj->cam->camera_handle);
664 test_obj->cam = NULL;
667 if (test_obj->jpeg_hdl && test_obj->jpeg_ops.close) {
668 rc = test_obj->jpeg_ops.close(test_obj->jpeg_hdl);
669 test_obj->jpeg_hdl = 0;
676 rc = mm_app_release_bufs(1, &test_obj->cap_buf);
682 rc = mm_app_release_bufs(1, &test_obj->parm_buf);
690 mm_camera_channel_t * mm_app_add_channel(mm_camera_test_obj_t *test_obj,
699 ch_id = test_obj->cam->ops->add_channel(test_obj->cam->camera_handle,
707 channel = &test_obj->channels[ch_type];
712 int mm_app_del_channel(mm_camera_test_obj_t *test_obj,
715 test_obj->cam->ops->delete_channel(test_obj->cam->camera_handle,
721 mm_camera_stream_t * mm_app_add_stream(mm_camera_test_obj_t *test_obj,
729 stream->s_id = test_obj->cam->ops->add_stream(test_obj->cam->camera_handle,
736 stream->multipleOf = test_obj->slice_size;
749 test_obj->cam->ops->delete_stream(test_obj->cam->camera_handle,
757 rc = test_obj->cam->ops->map_stream_buf(test_obj->cam->camera_handle,
768 test_obj->cam->ops->delete_stream(test_obj->cam->camera_handle,
778 int mm_app_del_stream(mm_camera_test_obj_t *test_obj,
782 test_obj->cam->ops->unmap_stream_buf(test_obj->cam->camera_handle,
789 test_obj->cam->ops->delete_stream(test_obj->cam->camera_handle,
796 mm_camera_channel_t *mm_app_get_channel_by_type(mm_camera_test_obj_t *test_obj,
799 return &test_obj->channels[ch_type];
802 int mm_app_config_stream(mm_camera_test_obj_t *test_obj,
807 return test_obj->cam->ops->config_stream(test_obj->cam->camera_handle,
813 int mm_app_start_channel(mm_camera_test_obj_t *test_obj,
816 return test_obj->cam->ops->start_channel(test_obj->cam->camera_handle,
820 int mm_app_stop_channel(mm_camera_test_obj_t *test_obj,
823 return test_obj->cam->ops->stop_channel(test_obj->cam->camera_handle,
827 int initBatchUpdate(mm_camera_test_obj_t *test_obj)
831 parm_buffer_t *parm_buf = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
833 ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
839 int commitSetBatch(mm_camera_test_obj_t *test_obj)
844 parm_buffer_t *p_table = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
850 rc = test_obj->cam->ops->set_parms(test_obj->cam->camera_handle, p_table);
856 int commitGetBatch(mm_camera_test_obj_t *test_obj)
860 parm_buffer_t *p_table = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
866 rc = test_obj->cam->ops->get_parms(test_obj->cam->camera_handle, p_table);
871 int setAecLock(mm_camera_test_obj_t *test_obj, int value)
875 rc = initBatchUpdate(test_obj);
881 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
888 rc = commitSetBatch(test_obj);
898 int setAwbLock(mm_camera_test_obj_t *test_obj, int value)
902 rc = initBatchUpdate(test_obj);
908 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
915 rc = commitSetBatch(test_obj);
926 int set3Acommand(mm_camera_test_obj_t *test_obj, cam_eztune_cmd_data_t *value)
930 rc = initBatchUpdate(test_obj);
936 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
943 rc = commitSetBatch(test_obj);
953 int getChromatix(mm_camera_test_obj_t *test_obj, tune_chromatix_t *value)
957 rc = initBatchUpdate(test_obj);
963 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
970 rc = commitGetBatch(test_obj);
976 READ_PARAM_ENTRY(test_obj->parm_buf.mem_info.data,
983 int setReloadChromatix(mm_camera_test_obj_t *test_obj, tune_chromatix_t *value)
987 rc = initBatchUpdate(test_obj);
993 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1000 rc = commitSetBatch(test_obj);
1009 int getAutofocusParams(mm_camera_test_obj_t *test_obj, tune_autofocus_t *value)
1013 rc = initBatchUpdate(test_obj);
1019 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1026 rc = commitGetBatch(test_obj);
1032 READ_PARAM_ENTRY(test_obj->parm_buf.mem_info.data,
1039 int setReloadAutofocusParams(mm_camera_test_obj_t *test_obj, tune_autofocus_t *value)
1043 rc = initBatchUpdate(test_obj);
1049 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1056 rc = commitSetBatch(test_obj);
1065 int setAutoFocusTuning(mm_camera_test_obj_t *test_obj, tune_actuator_t *value)
1069 rc = initBatchUpdate(test_obj);
1075 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1082 rc = commitSetBatch(test_obj);
1092 int setVfeCommand(mm_camera_test_obj_t *test_obj, tune_cmd_t *value)
1096 rc = initBatchUpdate(test_obj);
1102 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1109 rc = commitSetBatch(test_obj);
1119 int setPPCommand(mm_camera_test_obj_t *test_obj, tune_cmd_t *value)
1123 rc = initBatchUpdate(test_obj);
1129 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1136 rc = commitSetBatch(test_obj);
1146 int setFocusMode(mm_camera_test_obj_t *test_obj, cam_focus_mode_type mode)
1150 rc = initBatchUpdate(test_obj);
1158 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1165 rc = commitSetBatch(test_obj);
1175 int setEVCompensation(mm_camera_test_obj_t *test_obj, int ev)
1181 camera_cap = (cam_capability_t *) test_obj->cap_buf.mem_info.data;
1185 rc = initBatchUpdate(test_obj);
1191 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1198 rc = commitSetBatch(test_obj);
1214 int setAntibanding(mm_camera_test_obj_t *test_obj, cam_antibanding_mode_type antibanding)
1218 rc = initBatchUpdate(test_obj);
1224 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1231 rc = commitSetBatch(test_obj);
1243 int setWhiteBalance(mm_camera_test_obj_t *test_obj, cam_wb_mode_type mode)
1247 rc = initBatchUpdate(test_obj);
1253 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1260 rc = commitSetBatch(test_obj);
1272 int setExposureMetering(mm_camera_test_obj_t *test_obj, cam_auto_exposure_mode_type mode)
1276 rc = initBatchUpdate(test_obj);
1282 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1289 rc = commitSetBatch(test_obj);
1301 int setBrightness(mm_camera_test_obj_t *test_obj, int brightness)
1305 rc = initBatchUpdate(test_obj);
1311 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1318 rc = commitSetBatch(test_obj);
1330 int setContrast(mm_camera_test_obj_t *test_obj, int contrast)
1334 rc = initBatchUpdate(test_obj);
1340 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1347 rc = commitSetBatch(test_obj);
1359 int setTintless(mm_camera_test_obj_t *test_obj, int tintless)
1363 rc = initBatchUpdate(test_obj);
1369 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1376 rc = commitSetBatch(test_obj);
1388 int setSaturation(mm_camera_test_obj_t *test_obj, int saturation)
1392 rc = initBatchUpdate(test_obj);
1398 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1405 rc = commitSetBatch(test_obj);
1417 int setSharpness(mm_camera_test_obj_t *test_obj, int sharpness)
1421 rc = initBatchUpdate(test_obj);
1427 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1434 rc = commitSetBatch(test_obj);
1440 test_obj->reproc_sharpness = sharpness;
1447 int setISO(mm_camera_test_obj_t *test_obj, cam_iso_mode_type iso)
1451 rc = initBatchUpdate(test_obj);
1457 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1464 rc = commitSetBatch(test_obj);
1476 int setZoom(mm_camera_test_obj_t *test_obj, int zoom)
1480 rc = initBatchUpdate(test_obj);
1486 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1493 rc = commitSetBatch(test_obj);
1505 int setFPSRange(mm_camera_test_obj_t *test_obj, cam_fps_range_t range)
1509 rc = initBatchUpdate(test_obj);
1515 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1522 rc = commitSetBatch(test_obj);
1537 int setScene(mm_camera_test_obj_t *test_obj, cam_scene_mode_type scene)
1541 rc = initBatchUpdate(test_obj);
1547 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1554 rc = commitSetBatch(test_obj);
1566 int setFlash(mm_camera_test_obj_t *test_obj, cam_flash_mode_t flash)
1570 rc = initBatchUpdate(test_obj);
1576 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1583 test_obj);
1595 int setWNR(mm_camera_test_obj_t *test_obj, uint8_t enable)
1599 rc = initBatchUpdate(test_obj);
1610 if (ADD_SET_PARAM_ENTRY_TO_BATCH(test_obj->parm_buf.mem_info.data,
1617 rc = commitSetBatch(test_obj);
1624 test_obj->reproc_wnr = param;
1648 if ( lib_handle->test_obj.zsl_enabled) {
1650 if ( ( lib_handle->test_obj.buffer_width != dim->width) ||
1651 ( lib_handle->test_obj.buffer_height = dim->height ) ) {
1653 lib_handle->test_obj.buffer_width = dim->width;
1654 lib_handle->test_obj.buffer_height = dim->height;
1673 lib_handle->test_obj.encodeJpeg = 1;
1686 lib_handle->test_obj.buffer_width = dim->width;
1687 lib_handle->test_obj.buffer_height = dim->height;
1689 rc = mm_app_start_capture(&lib_handle->test_obj, 1);
1698 rc = mm_app_stop_capture(&lib_handle->test_obj);
1799 handle->test_obj.buffer_width = DEFAULT_PREVIEW_WIDTH;
1800 handle->test_obj.buffer_height = DEFAULT_PREVIEW_HEIGHT;
1801 handle->test_obj.buffer_format = DEFAULT_SNAPSHOT_FORMAT;
1805 rc = mm_app_open(&handle->app_ctx, (uint8_t)cam_id, &handle->test_obj);
1812 //rc = mm_app_initialize_fb(&handle->test_obj);
1836 if ( handle->test_obj.zsl_enabled ) {
1837 rc = mm_app_start_preview_zsl(&handle->test_obj);
1844 handle->test_obj.enable_reproc = ENABLE_REPROCESSING;
1845 rc = mm_app_start_preview(&handle->test_obj);
1862 handle->test_obj.focus_supported = 0;
1865 handle->test_obj.focus_supported = 1;
1867 rc = setFocusMode(&handle->test_obj, handle->current_params.af_mode);
1888 if ( handle->test_obj.zsl_enabled ) {
1889 rc = mm_app_stop_preview_zsl(&handle->test_obj);
1896 rc = mm_app_stop_preview(&handle->test_obj);
1927 *caps = *( (cam_capability_t *) handle->test_obj.cap_buf.mem_info.data );
1950 camera_cap = (cam_capability_t *) handle->test_obj.cap_buf.mem_info.data;
1956 rc = setFPSRange(&handle->test_obj, range);
1967 rc = setFlash(&handle->test_obj, flash);
1978 rc = setScene(&handle->test_obj, scene);
1989 rc = setZoom(&handle->test_obj, zoom);
2000 rc = setISO(&handle->test_obj, iso);
2011 rc = setSharpness(&handle->test_obj, sharpness);
2022 rc = setSaturation(&handle->test_obj, saturation);
2033 rc = setContrast(&handle->test_obj, contrast);
2044 rc = setTintless(&handle->test_obj, tintless);
2055 rc = setBrightness(&handle->test_obj, brightness);
2066 rc = setExposureMetering(&handle->test_obj, exp);
2077 rc = setWhiteBalance(&handle->test_obj, wb);
2088 rc = setAntibanding(&handle->test_obj, antibanding);
2099 rc = setEVCompensation(&handle->test_obj, ev);
2110 if ( ( enable_zsl != handle->test_obj.zsl_enabled ) &&
2118 handle->test_obj.zsl_enabled = enable_zsl;
2126 handle->test_obj.zsl_enabled = enable_zsl;
2145 width = handle->test_obj.buffer_width;
2146 height = handle->test_obj.buffer_height;
2147 handle->test_obj.buffer_width =
2149 handle->test_obj.buffer_height =
2151 handle->test_obj.buffer_format = DEFAULT_RAW_FORMAT;
2156 rc = mm_app_start_capture_raw(&handle->test_obj, 1);
2165 rc = mm_app_stop_capture_raw(&handle->test_obj);
2172 handle->test_obj.buffer_width = width;
2173 handle->test_obj.buffer_height = height;
2174 handle->test_obj.buffer_format = DEFAULT_SNAPSHOT_FORMAT;
2201 if (handle->test_obj.is_chromatix_reload == TRUE) {
2204 rc = setReloadChromatix(&handle->test_obj,
2205 (tune_chromatix_t *)&(handle->test_obj.tune_data));
2216 rc = setFocusMode(&handle->test_obj, mode);
2225 if (handle->test_obj.focus_supported) {
2226 rc = handle->test_obj.cam->ops->do_auto_focus(handle->test_obj.cam->camera_handle);
2237 rc = handle->test_obj.cam->ops->cancel_auto_focus(handle->test_obj.cam->camera_handle);
2246 rc = setAwbLock(&handle->test_obj, 1);
2254 rc = setAwbLock(&handle->test_obj, 0);
2262 rc = setAecLock(&handle->test_obj, 1);
2270 rc = setAecLock(&handle->test_obj, 0);
2278 rc = set3Acommand(&handle->test_obj, (cam_eztune_cmd_data_t *)in_data);
2287 rc = getChromatix(&handle->test_obj,
2297 rc = setReloadChromatix(&handle->test_obj,
2303 handle->test_obj.is_chromatix_reload = TRUE;
2304 memcpy((void *)&(handle->test_obj.tune_data),
2310 rc = getAutofocusParams(&handle->test_obj,
2320 rc = setReloadAutofocusParams(&handle->test_obj,
2330 rc = setAutoFocusTuning(&handle->test_obj, in_data);
2339 rc = setVfeCommand(&handle->test_obj, in_data);
2348 rc = setPPCommand(&handle->test_obj, in_data);
2357 rc = setWNR(&handle->test_obj, *((uint8_t *)in_data));
2399 //rc = mm_app_close_fb(&handle->test_obj);
2407 rc = mm_app_close(&handle->test_obj);
2421 if (handle->test_obj.user_preview_cb != NULL) {
2425 handle->test_obj.user_preview_cb = *cb;
2429 int mm_app_set_preview_fps_range(mm_camera_test_obj_t *test_obj,
2435 rc = setFPSRange(test_obj, *fpsRange);