From: Jeongmo Yang Date: Wed, 25 Nov 2020 22:56:20 +0000 (+0900) Subject: Add code to load ini file for network camera X-Git-Tag: accepted/tizen/unified/20210602.122542^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F78%2F258278%2F2;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git Add code to load ini file for network camera [Version] 0.10.235 [Issue Type] Update Change-Id: I07776e5fe91cdce83d82c8e19841bcb7df42cdfe Signed-off-by: Jeongmo Yang --- diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 729f938..be95b1a 100755 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -1,6 +1,6 @@ Name: libmm-camcorder Summary: Camera and recorder library -Version: 0.10.234 +Version: 0.10.235 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index cef260c..d43e79f 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -343,27 +343,34 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord return MM_ERROR_CAMCORDER_NOT_INITIALIZED; } + if (hcamcorder->is_network) { + snprintf(conf_file_name, sizeof(conf_file_name), "%s_network.ini", + CONFIGURE_CTRL_FILE_PREFIX); + } else { #ifdef _MMCAMCORDER_CAMERA_CONF_MGR_SUPPORT - snprintf(devicetype, sizeof(devicetype), "%d", hcamcorder->device_type); - memset(&hcamcorder->conf_device_info, 0x00, sizeof(camera_conf_device_info_s)); - ret_conf = camera_conf_mgr_get_ids(devicetype, __MMCAMCORDER_DEVICE_TYPE_STRING_LEN, - &hcamcorder->conf_device_info); - if (ret_conf != CAMERA_CONF_MGR_ERROR_NONE) { - MMCAM_LOG_ERROR("Device [%s] is not found", devicetype); - return MM_ERROR_CAMCORDER_NOT_SUPPORTED; - } + snprintf(devicetype, sizeof(devicetype), "%d", hcamcorder->device_type); + memset(&hcamcorder->conf_device_info, 0x00, sizeof(camera_conf_device_info_s)); + ret_conf = camera_conf_mgr_get_ids(devicetype, __MMCAMCORDER_DEVICE_TYPE_STRING_LEN, + &hcamcorder->conf_device_info); + if (ret_conf != CAMERA_CONF_MGR_ERROR_NONE) { + MMCAM_LOG_ERROR("Device [%s] is not found", devicetype); + return MM_ERROR_CAMCORDER_NOT_SUPPORTED; + } - snprintf(conf_file_name, sizeof(conf_file_name), "%s_%s_%s.ini", - CONFIGURE_CTRL_FILE_PREFIX, hcamcorder->conf_device_info.vendor_id, - hcamcorder->conf_device_info.product_id); + snprintf(conf_file_name, sizeof(conf_file_name), "%s_%s_%s.ini", + CONFIGURE_CTRL_FILE_PREFIX, hcamcorder->conf_device_info.vendor_id, + hcamcorder->conf_device_info.product_id); - MMCAM_LOG_INFO("Load control configure file [%d][%s][%s]", hcamcorder->device_type, - conf_file_name, hcamcorder->conf_device_info.node); + MMCAM_LOG_INFO("device info : node[%s]", + hcamcorder->conf_device_info.node); #else - snprintf(conf_file_name, sizeof(conf_file_name), "%s%d.ini", - CONFIGURE_CTRL_FILE_PREFIX, hcamcorder->device_type); - MMCAM_LOG_INFO("Load control configure file [%d][%s]", hcamcorder->device_type, conf_file_name); + snprintf(conf_file_name, sizeof(conf_file_name), "%s%d.ini", + CONFIGURE_CTRL_FILE_PREFIX, hcamcorder->device_type); #endif + } + + MMCAM_LOG_INFO("Load control configure file [%d][%s]", + hcamcorder->device_type, conf_file_name); ret = _mmcamcorder_conf_get_info((MMHandleType)hcamcorder, CONFIGURE_TYPE_CTRL, (const char *)conf_file_name, &hcamcorder->conf_ctrl);