#include <mm_session.h>
#include <mm_session_private.h>
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
#include <murphy/common/glib-glue.h>
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/*---------------------------------------------------------------------------------------
"SupportMediaPacketPreviewCb",
&(hcamcorder->support_media_packet_preview_cb));
+ /* Get UseVideoconvert value from INI */
+ _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
+ CONFIGURE_CATEGORY_MAIN_VIDEO_OUTPUT,
+ "UseVideoconvert",
+ &hcamcorder->use_videoconvert);
+
ret = mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,
MMCAM_CAMERA_WIDTH, &resolution_width,
MMCAM_CAMERA_HEIGHT, &resolution_height,
mm_camcorder_get_fps_list_by_resolution((MMHandleType)hcamcorder, resolution_width, resolution_height, &fps_info);
- _mmcam_dbg_log("UseZeroCopyFormat : %d", hcamcorder->use_zero_copy_format);
- _mmcam_dbg_log("SupportMediaPacketPreviewCb : %d", hcamcorder->support_media_packet_preview_cb);
- _mmcam_dbg_log("res : %d X %d, Default FPS by resolution : %d", resolution_width, resolution_height, fps_info.int_array.def);
+ _mmcam_dbg_log("UseZeroCopyFormat %d, UseVideoconvert %d, SupportMediaPacketPreviewCb %d",
+ hcamcorder->use_zero_copy_format, hcamcorder->use_videoconvert, hcamcorder->support_media_packet_preview_cb);
+ _mmcam_dbg_log("res : %d X %d, Default FPS by resolution : %d",
+ resolution_width, resolution_height, fps_info.int_array.def);
if (camera_facing_direction == 1) {
if (rcmd_dpy_rotation == MM_DISPLAY_ROTATION_270 || rcmd_dpy_rotation == MM_DISPLAY_ROTATION_90) {
} else {
camera_default_flip = MM_FLIP_HORIZONTAL;
}
- _mmcam_dbg_log("camera_default_flip : [%d]",camera_default_flip);
+ _mmcam_dbg_log("camera_default_flip : [%d]", camera_default_flip);
}
mm_camcorder_set_attributes((MMHandleType)hcamcorder, &err_attr_name,
}
}
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* initialize resource manager */
ret = _mmcamcorder_resource_manager_init(&hcamcorder->resource_manager, (void *)hcamcorder);
if (ret != MM_ERROR_NONE) {
ret = MM_ERROR_CAMCORDER_INTERNAL;
goto _ERR_DEFAULT_VALUE_INIT;
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
traceBegin(TTRACE_TAG_CAMERA, "MMCAMCORDER:CREATE:INIT_GSTREAMER");
return MM_ERROR_NONE;
_ERR_DEFAULT_VALUE_INIT:
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* de-initialize resource manager */
_mmcamcorder_resource_manager_deinit(&hcamcorder->resource_manager);
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* unregister sound focus */
if (hcamcorder->sound_focus_register && hcamcorder->sound_focus_id > 0) {
hcamcorder->sub_context = NULL;
}
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* de-initialize resource manager */
ret = _mmcamcorder_resource_manager_deinit(&hcamcorder->resource_manager);
if (ret != MM_ERROR_NONE) {
_mmcam_dbg_err("failed to de-initialize resource manager 0x%x", ret);
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* Remove idle function which is not called yet */
if (hcamcorder->setting_event_id) {
{
int ret = MM_ERROR_NONE;
int ret_sound = MM_ERROR_NONE;
- int ret_resource = MM_ERROR_NONE;
int state = MM_CAMCORDER_STATE_NONE;
int state_FROM = MM_CAMCORDER_STATE_NULL;
int state_TO = MM_CAMCORDER_STATE_READY;
} else {
_mmcam_dbg_warn("NULL dpm_policy");
}
-
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* prepare resource manager for camera */
ret = _mmcamcorder_resource_manager_prepare(&hcamcorder->resource_manager, MM_CAMCORDER_RESOURCE_TYPE_CAMERA);
if (ret != MM_ERROR_NONE) {
_mmcamcorder_resource_manager_unprepare(&hcamcorder->resource_manager);
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
}
/* create pipeline */
return MM_ERROR_NONE;
_ERR_CAMCORDER_CMD:
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
/* release hw resources */
if (hcamcorder->type == MM_CAMCORDER_MODE_VIDEO_CAPTURE) {
- ret_resource = _mmcamcorder_resource_manager_release(&hcamcorder->resource_manager);
+ int ret_resource = _mmcamcorder_resource_manager_release(&hcamcorder->resource_manager);
if (ret_resource == MM_ERROR_RESOURCE_INVALID_STATE) {
_mmcam_dbg_warn("it could be in the middle of resource callback or there's no acquired resource");
}
_mmcam_dbg_err("failed to unprepare resource manager, ret_resource(0x%x)", ret_resource);
}
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
_ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK:
_MMCAMCORDER_UNLOCK_CMD(hcamcorder);
hcamcorder->sub_context = NULL;
}
+#ifdef _MMCAMCORDER_MURPHY_SUPPORT
if (hcamcorder->type == MM_CAMCORDER_MODE_VIDEO_CAPTURE) {
/* release resource */
ret = _mmcamcorder_resource_manager_release(&hcamcorder->resource_manager);
_mmcam_dbg_err("failed to unprepare resource manager, ret(0x%x)", ret);
}
}
+#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
/* Deinitialize main context member */
hcamcorder->command = NULL;
switch (getChangeReturn) {
case GST_STATE_CHANGE_NO_PREROLL:
_mmcam_dbg_log("status=GST_STATE_CHANGE_NO_PREROLL.");
+ /* fall through */
case GST_STATE_CHANGE_SUCCESS:
/* if we reached the final target state, exit */
if (pipeline_state == target_state) {