bool _mmcamcorder_commit_extra_preview(MMHandleType handle, int attr_idx, const MMAttrsValue *value)
{
+ int ret = MM_ERROR_NONE;
int current_state = MM_CAMCORDER_STATE_NONE;
mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle);
_MMCamcorderSubContext *sc = NULL;
MMCAM_LOG_INFO("Enable extra preview(%d)", value->value.i_val);
- hcamcorder->extra_preview.is_enabled = (gboolean)value->value.i_val;
-
current_state = _mmcamcorder_get_state(handle);
if (current_state < MM_CAMCORDER_STATE_READY) {
MMCAM_LOG_INFO("will be set when preview is started");
sc = MMF_CAMCORDER_SUBCONTEXT(handle);
mmf_return_val_if_fail(sc, FALSE);
- MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSRC_SRC].gst, "extra-preview", value->value.i_val);
+ if (value->value.i_val)
+ ret = _mmcamcorder_initialize_extra_preview_mode(handle);
+ else
+ ret = _mmcamcorder_deinitialize_extra_preview_mode(handle);
+
+ if (ret != MM_ERROR_NONE) {
+ MMCAM_LOG_ERROR("set[%d] failed[0x%x]", value->value.i_val, ret);
+ return FALSE;
+ }
MMCAM_LOG_INFO("done");