Home | History | Annotate | Download | only in src

Lines Matching defs:test_obj

460     mm_camera_test_obj_t *test_obj =
462 if (test_obj == NULL || test_obj->cam->camera_handle != camera_handle) {
484 mm_camera_test_obj_t *test_obj)
491 test_obj->cam = cam_app->hal_lib.mm_camera_open(cam_id);
492 if(test_obj->cam == NULL) {
497 CDBG("Open Camera id = %d handle = %d", cam_id, test_obj->cam->camera_handle);
503 rc = mm_app_alloc_bufs(&test_obj->cap_buf,
514 rc = test_obj->cam->ops->map_buf(test_obj->cam->camera_handle,
516 test_obj->cap_buf.mem_info.fd,
517 test_obj->cap_buf.mem_info.size);
526 rc = mm_app_alloc_bufs(&test_obj->parm_buf,
537 rc = test_obj->cam->ops->map_buf(test_obj->cam->camera_handle,
539 test_obj->parm_buf.mem_info.fd,
540 test_obj->parm_buf.mem_info.size);
545 test_obj->params_buffer = (parm_buffer_t*) test_obj->parm_buf.mem_info.data;
546 CDBG_HIGH("\n%s params_buffer=%p\n",__func__,test_obj->params_buffer);
548 rc = test_obj->cam->ops->register_event_notify(test_obj->cam->camera_handle,
550 test_obj);
557 rc = test_obj->cam->ops->query_capability(test_obj->cam->camera_handle);
563 memset(&test_obj->jpeg_ops, 0, sizeof(mm_jpeg_ops_t));
568 test_obj->jpeg_hdl = cam_app->hal_lib.jpeg_open(&test_obj->jpeg_ops,pic_size);
569 if (test_obj->jpeg_hdl == 0) {
578 test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
581 mm_app_release_bufs(1, &test_obj->parm_buf);
583 test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
586 mm_app_release_bufs(1, &test_obj->cap_buf);
588 test_obj->cam->ops->close_camera(test_obj->cam->camera_handle);
589 test_obj->cam = NULL;
627 int commit_set_batch(mm_camera_test_obj_t *test_obj)
633 if(test_obj->params_buffer->is_valid[i])
637 CDBG_HIGH("\n set_param p_buffer =%p\n",test_obj->params_buffer);
638 rc = test_obj->cam->ops->set_parms(test_obj->cam->camera_handle, test_obj->params_buffer);
647 int mm_app_set_params(mm_camera_test_obj_t *test_obj,
653 rc = init_batch_update(test_obj->params_buffer);
658 rc = add_parm_entry_tobatch(test_obj->params_buffer, param_type, sizeof(value), &value);
663 rc = commit_set_batch(test_obj);
671 int mm_app_close(mm_camera_test_obj_t *test_obj)
675 if (test_obj == NULL || test_obj->cam ==NULL) {
681 rc = test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
688 rc = test_obj->cam->ops->unmap_buf(test_obj->cam->camera_handle,
694 rc = test_obj->cam->ops->close_camera(test_obj->cam->camera_handle);
698 test_obj->cam = NULL;
701 if (test_obj->jpeg_hdl && test_obj->jpeg_ops.close) {
702 rc = test_obj->jpeg_ops.close(test_obj->jpeg_hdl);
703 test_obj->jpeg_hdl = 0;
710 rc = mm_app_release_bufs(1, &test_obj->cap_buf);
716 rc = mm_app_release_bufs(1, &test_obj->parm_buf);
724 mm_camera_channel_t * mm_app_add_channel(mm_camera_test_obj_t *test_obj,
733 ch_id = test_obj->cam->ops->add_channel(test_obj->cam->camera_handle,
741 channel = &test_obj->channels[ch_type];
746 int mm_app_del_channel(mm_camera_test_obj_t *test_obj,
749 test_obj->cam->ops->delete_channel(test_obj->cam->camera_handle,
755 mm_camera_stream_t * mm_app_add_stream(mm_camera_test_obj_t *test_obj,
763 stream->s_id = test_obj->cam->ops->add_stream(test_obj->cam->camera_handle,
770 stream->multipleOf = test_obj->slice_size;
783 test_obj->cam->ops->delete_stream(test_obj->cam->camera_handle,
791 rc = test_obj->cam->ops->map_stream_buf(test_obj->cam->camera_handle,
802 test_obj->cam->ops->delete_stream(test_obj->cam->camera_handle,
812 int mm_app_del_stream(mm_camera_test_obj_t *test_obj,
816 test_obj->cam->ops->unmap_stream_buf(test_obj->cam->camera_handle,
823 test_obj->cam->ops->delete_stream(test_obj->cam->camera_handle,
830 mm_camera_channel_t *mm_app_get_channel_by_type(mm_camera_test_obj_t *test_obj,
833 return &test_obj->channels[ch_type];
836 int mm_app_config_stream(mm_camera_test_obj_t *test_obj,
841 return test_obj->cam->ops->config_stream(test_obj->cam->camera_handle,
847 int mm_app_start_channel(mm_camera_test_obj_t *test_obj,
850 return test_obj->cam->ops->start_channel(test_obj->cam->camera_handle,
854 int mm_app_stop_channel(mm_camera_test_obj_t *test_obj,
857 return test_obj->cam->ops->stop_channel(test_obj->cam->camera_handle,
861 int AddSetParmEntryToBatch(mm_camera_test_obj_t *test_obj,
866 parm_buffer_t *p_table = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
884 int initBatchUpdate(mm_camera_test_obj_t *test_obj)
888 parm_buffer_t *parm_buf = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
890 AddSetParmEntryToBatch(test_obj,
898 int ReadSetParmEntryToBatch(mm_camera_test_obj_t *test_obj,
904 parm_buffer_t *p_table = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
914 int commitSetBatch(mm_camera_test_obj_t *test_obj)
919 parm_buffer_t *p_table = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
925 rc = test_obj->cam->ops->set_parms(test_obj->cam->camera_handle, p_table);
931 int commitGetBatch(mm_camera_test_obj_t *test_obj)
935 parm_buffer_t *p_table = ( parm_buffer_t * ) test_obj->parm_buf.mem_info.data;
941 rc = test_obj->cam->ops->get_parms(test_obj->cam->camera_handle, p_table);
946 int setAecLock(mm_camera_test_obj_t *test_obj, int value)
950 rc = initBatchUpdate(test_obj);
956 test_obj,
965 rc = commitSetBatch(test_obj);
975 int setAwbLock(mm_camera_test_obj_t *test_obj, int value)
979 rc = initBatchUpdate(test_obj);
985 rc = AddSetParmEntryToBatch(test_obj,
994 rc = commitSetBatch(test_obj);
1005 int set3Acommand(mm_camera_test_obj_t *test_obj, cam_eztune_cmd_data_t *value)
1009 rc = initBatchUpdate(test_obj);
1015 rc = AddSetParmEntryToBatch(test_obj,
1024 rc = commitSetBatch(test_obj);
1034 int getChromatix(mm_camera_test_obj_t *test_obj, tune_chromatix_t *value)
1038 rc = initBatchUpdate(test_obj);
1044 rc = AddSetParmEntryToBatch(test_obj,
1053 rc = commitGetBatch(test_obj);
1059 rc = ReadSetParmEntryToBatch(test_obj,
1071 int setReloadChromatix(mm_camera_test_obj_t *test_obj, tune_chromatix_t *value)
1075 rc = initBatchUpdate(test_obj);
1081 rc = AddSetParmEntryToBatch(test_obj,
1090 rc = commitSetBatch(test_obj);
1099 int getAutofocusParams(mm_camera_test_obj_t *test_obj, tune_autofocus_t *value)
1103 rc = initBatchUpdate(test_obj);
1109 rc = AddSetParmEntryToBatch(test_obj,
1118 rc = commitGetBatch(test_obj);
1124 rc = ReadSetParmEntryToBatch(test_obj,
1136 int setReloadAutofocusParams(mm_camera_test_obj_t *test_obj, tune_autofocus_t *value)
1140 rc = initBatchUpdate(test_obj);
1146 rc = AddSetParmEntryToBatch(test_obj,
1155 rc = commitSetBatch(test_obj);
1164 int setAutoFocusTuning(mm_camera_test_obj_t *test_obj, tune_actuator_t *value)
1168 rc = initBatchUpdate(test_obj);
1174 rc = AddSetParmEntryToBatch(test_obj,
1183 rc = commitSetBatch(test_obj);
1193 int setVfeCommand(mm_camera_test_obj_t *test_obj, tune_cmd_t *value)
1197 rc = initBatchUpdate(test_obj);
1203 rc = AddSetParmEntryToBatch(test_obj,
1212 rc = commitSetBatch(test_obj);
1222 int setPPCommand(mm_camera_test_obj_t *test_obj, tune_cmd_t *value)
1226 rc = initBatchUpdate(test_obj);
1232 rc = AddSetParmEntryToBatch(test_obj,
1241 rc = commitSetBatch(test_obj);
1251 int setFocusMode(mm_camera_test_obj_t *test_obj, cam_focus_mode_type mode)
1255 rc = initBatchUpdate(test_obj);
1263 rc = AddSetParmEntryToBatch(test_obj,
1272 rc = commitSetBatch(test_obj);
1282 int setEVCompensation(mm_camera_test_obj_t *test_obj, int ev)
1288 camera_cap = (cam_capability_t *) test_obj->cap_buf.mem_info.data;
1292 rc = initBatchUpdate(test_obj);
1300 rc = AddSetParmEntryToBatch(test_obj,
1309 rc = commitSetBatch(test_obj);
1325 int setAntibanding(mm_camera_test_obj_t *test_obj, cam_antibanding_mode_type antibanding)
1329 rc = initBatchUpdate(test_obj);
1337 rc = AddSetParmEntryToBatch(test_obj,
1346 rc = commitSetBatch(test_obj);
1358 int setWhiteBalance(mm_camera_test_obj_t *test_obj, cam_wb_mode_type mode)
1362 rc = initBatchUpdate(test_obj);
1370 rc = AddSetParmEntryToBatch(test_obj,
1379 rc = commitSetBatch(test_obj);
1391 int setExposureMetering(mm_camera_test_obj_t *test_obj, cam_auto_exposure_mode_type mode)
1395 rc = initBatchUpdate(test_obj);
1403 rc = AddSetParmEntryToBatch(test_obj,
1412 rc = commitSetBatch(test_obj);
1424 int setBrightness(mm_camera_test_obj_t *test_obj, int brightness)
1428 rc = initBatchUpdate(test_obj);
1436 rc = AddSetParmEntryToBatch(test_obj,
1445 rc = commitSetBatch(test_obj);
1457 int setContrast(mm_camera_test_obj_t *test_obj, int contrast)
1461 rc = initBatchUpdate(test_obj);
1469 rc = AddSetParmEntryToBatch(test_obj,
1478 rc = commitSetBatch(test_obj);
1490 int setTintless(mm_camera_test_obj_t *test_obj, int tintless)
1494 rc = initBatchUpdate(test_obj);
1502 rc = AddSetParmEntryToBatch(test_obj,
1511 rc = commitSetBatch(test_obj);
1523 int setSaturation(mm_camera_test_obj_t *test_obj, int saturation)
1527 rc = initBatchUpdate(test_obj);
1535 rc = AddSetParmEntryToBatch(test_obj,
1544 rc = commitSetBatch(test_obj);
1556 int setSharpness(mm_camera_test_obj_t *test_obj, int sharpness)
1560 rc = initBatchUpdate(test_obj);
1568 rc = AddSetParmEntryToBatch(test_obj,
1577 rc = commitSetBatch(test_obj);
1583 test_obj->reproc_sharpness = sharpness;
1590 int setISO(mm_camera_test_obj_t *test_obj, cam_iso_mode_type iso)
1594 rc = initBatchUpdate(test_obj);
1602 rc = AddSetParmEntryToBatch(test_obj,
1611 rc = commitSetBatch(test_obj);
1623 int setZoom(mm_camera_test_obj_t *test_obj, int zoom)
1627 rc = initBatchUpdate(test_obj);
1635 rc = AddSetParmEntryToBatch(test_obj,
1644 rc = commitSetBatch(test_obj);
1656 int setFPSRange(mm_camera_test_obj_t *test_obj, cam_fps_range_t range)
1660 rc = initBatchUpdate(test_obj);
1666 rc = AddSetParmEntryToBatch(test_obj,
1675 rc = commitSetBatch(test_obj);
1690 int setScene(mm_camera_test_obj_t *test_obj, cam_scene_mode_type scene)
1694 rc = initBatchUpdate(test_obj);
1702 rc = AddSetParmEntryToBatch(test_obj,
1711 rc = commitSetBatch(test_obj);
1723 int setFlash(mm_camera_test_obj_t *test_obj, cam_flash_mode_t flash)
1727 rc = initBatchUpdate(test_obj);
1735 rc = AddSetParmEntryToBatch(test_obj,
1744 rc = commitSetBatch(test_obj);
1756 int setWNR(mm_camera_test_obj_t *test_obj, int enable)
1760 rc = initBatchUpdate(test_obj);
1771 rc = AddSetParmEntryToBatch(test_obj,
1780 rc = commitSetBatch(test_obj);
1787 test_obj->reproc_wnr = param;
1811 if ( lib_handle->test_obj.zsl_enabled) {
1813 if ( ( lib_handle->test_obj.buffer_width != dim->width) ||
1814 ( lib_handle->test_obj.buffer_height = dim->height ) ) {
1816 lib_handle->test_obj.buffer_width = dim->width;
1817 lib_handle->test_obj.buffer_height = dim->height;
1836 lib_handle->test_obj.encodeJpeg = 1;
1849 lib_handle->test_obj.buffer_width = dim->width;
1850 lib_handle->test_obj.buffer_height = dim->height;
1852 rc = mm_app_start_capture(&lib_handle->test_obj, 1);
1861 rc = mm_app_stop_capture(&lib_handle->test_obj);
1962 handle->test_obj.buffer_width = DEFAULT_PREVIEW_WIDTH;
1963 handle->test_obj.buffer_height = DEFAULT_PREVIEW_HEIGHT;
1964 handle->test_obj.buffer_format = DEFAULT_SNAPSHOT_FORMAT;
1968 rc = mm_app_open(&handle->app_ctx, cam_id, &handle->test_obj);
1975 //rc = mm_app_initialize_fb(&handle->test_obj);
1999 if ( handle->test_obj.zsl_enabled ) {
2000 rc = mm_app_start_preview_zsl(&handle->test_obj);
2007 handle->test_obj.enable_reproc = ENABLE_REPROCESSING;
2008 rc = mm_app_start_preview(&handle->test_obj);
2025 handle->test_obj.focus_supported = 0;
2028 handle->test_obj.focus_supported = 1;
2030 rc = setFocusMode(&handle->test_obj, handle->current_params.af_mode);
2051 if ( handle->test_obj.zsl_enabled ) {
2052 rc = mm_app_stop_preview_zsl(&handle->test_obj);
2059 rc = mm_app_stop_preview(&handle->test_obj);
2090 *caps = *( (cam_capability_t *) handle->test_obj.cap_buf.mem_info.data );
2113 camera_cap = (cam_capability_t *) handle->test_obj.cap_buf.mem_info.data;
2119 rc = setFPSRange(&handle->test_obj, range);
2130 rc = setFlash(&handle->test_obj, flash);
2141 rc = setScene(&handle->test_obj, scene);
2152 rc = setZoom(&handle->test_obj, zoom);
2163 rc = setISO(&handle->test_obj, iso);
2174 rc = setSharpness(&handle->test_obj, sharpness);
2185 rc = setSaturation(&handle->test_obj, saturation);
2196 rc = setContrast(&handle->test_obj, contrast);
2207 rc = setTintless(&handle->test_obj, tintless);
2218 rc = setBrightness(&handle->test_obj, brightness);
2229 rc = setExposureMetering(&handle->test_obj, exp);
2240 rc = setWhiteBalance(&handle->test_obj, wb);
2251 rc = setAntibanding(&handle->test_obj, antibanding);
2262 rc = setEVCompensation(&handle->test_obj, ev);
2273 if ( ( enable_zsl != handle->test_obj.zsl_enabled ) &&
2281 handle->test_obj.zsl_enabled = enable_zsl;
2289 handle->test_obj.zsl_enabled = enable_zsl;
2308 width = handle->test_obj.buffer_width;
2309 height = handle->test_obj.buffer_height;
2310 handle->test_obj.buffer_width = camera_cap->raw_dim[0].width;
2311 handle->test_obj.buffer_height = camera_cap->raw_dim[0].height;
2312 handle->test_obj.buffer_format = DEFAULT_RAW_FORMAT;
2317 rc = mm_app_start_capture_raw(&handle->test_obj, 1);
2326 rc = mm_app_stop_capture_raw(&handle->test_obj);
2333 handle->test_obj.buffer_width = width;
2334 handle->test_obj.buffer_height = height;
2335 handle->test_obj.buffer_format = DEFAULT_SNAPSHOT_FORMAT;
2362 if (handle->test_obj.is_chromatix_reload == TRUE) {
2365 rc = setReloadChromatix(&handle->test_obj,
2366 (tune_chromatix_t *)&(handle->test_obj.tune_data));
2377 rc = setFocusMode(&handle->test_obj, mode);
2386 if (handle->test_obj.focus_supported) {
2387 rc = handle->test_obj.cam->ops->do_auto_focus(handle->test_obj.cam->camera_handle);
2398 rc = handle->test_obj.cam->ops->cancel_auto_focus(handle->test_obj.cam->camera_handle);
2407 rc = setAwbLock(&handle->test_obj, 1);
2415 rc = setAwbLock(&handle->test_obj, 0);
2423 rc = setAecLock(&handle->test_obj, 1);
2431 rc = setAecLock(&handle->test_obj, 0);
2439 rc = set3Acommand(&handle->test_obj, (cam_eztune_cmd_data_t *)in_data);
2448 rc = getChromatix(&handle->test_obj,
2458 rc = setReloadChromatix(&handle->test_obj,
2464 handle->test_obj.is_chromatix_reload = TRUE;
2465 memcpy((void *)&(handle->test_obj.tune_data),
2471 rc = getAutofocusParams(&handle->test_obj,
2481 rc = setReloadAutofocusParams(&handle->test_obj,
2491 rc = setAutoFocusTuning(&handle->test_obj, in_data);
2500 rc = setVfeCommand(&handle->test_obj, in_data);
2509 rc = setPPCommand(&handle->test_obj, in_data);
2519 rc = setWNR(&handle->test_obj, wnr_enable);
2561 //rc = mm_app_close_fb(&handle->test_obj);
2569 rc = mm_app_close(&handle->test_obj);
2583 if (handle->test_obj.user_preview_cb != NULL) {
2587 handle->test_obj.user_preview_cb = *cb;