[Release version 0.10.34] Change display routine for Overlay type 07/58307/3 accepted/tizen/mobile/20160202.113105 accepted/tizen/tv/20160202.113119 accepted/tizen/wearable/20160202.113144 submit/tizen/20160201.062702
authorJeongmo Yang <jm80.yang@samsung.com>
Fri, 29 Jan 2016 06:49:10 +0000 (15:49 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Fri, 29 Jan 2016 06:58:02 +0000 (15:58 +0900)
Change-Id: I3f087c0a6137ca03150d23b3f84a444c5772c52f
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder.h
src/mm_camcorder_attribute.c
src/mm_camcorder_client.c
src/mm_camcorder_configure.c
src/mm_camcorder_gstcommon.c
src/mm_camcorder_internal.c

index 760c77e..86dbe7e 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.33
+Version:    0.10.34
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index ab4fa61..c5f3b30 100644 (file)
        * Attribute @n
        Attribute system is an interface to operate camcorder. Depending on each attribute, camcorder behaves differently.
        Attribute system provides get/set functions. Setting proper attributes, a user can control camcorder as he want. (mm_camcorder_set_attributes())
-       Also, a user can comprehend current status of the camcorder, calling getter function(mm_camcorder_get_attributes()). 
+       Also, a user can comprehend current status of the camcorder, calling getter function(mm_camcorder_get_attributes()).
        Beware, arguments of mm_camcorder_set_attributes() and mm_camcorder_get_attributes() should be finished with 'NULL'.
        This is a rule for the variable argument.
        @par
@@ -923,7 +923,7 @@ extern "C" {
 #define MMCAM_FILTER_SHARPNESS                  "filter-sharpness"
 
 /**
- * Pixel format that you want to capture. If you set MM_PIXEL_FORMAT_ENCODED, 
+ * Pixel format that you want to capture. If you set MM_PIXEL_FORMAT_ENCODED,
  * the result will be encoded by image codec specified in #MMCAM_IMAGE_ENCODER.
  * If not, the result will be raw data.
  *
@@ -1092,7 +1092,7 @@ extern "C" {
 #define MMCAM_TARGET_MAX_SIZE                   "target-max-size"
 
 /**
- * Time limit(Second) of recording file. If the elapsed time of recording reaches this value, 
+ * Time limit(Second) of recording file. If the elapsed time of recording reaches this value,
  * camcorder will send 'MM_MESSAGE_CAMCORDER_TIME_LIMIT' message.
  */
 #define MMCAM_TARGET_TIME_LIMIT                 "target-time-limit"
@@ -1797,14 +1797,12 @@ typedef struct _MMCamFaceDetectInfo {
  * Wayland information
  */
 typedef struct _MMCamWaylandInfo {
-       void *evas_obj;
-       void *window;
-       void *surface;
-       void *display;
+       int parent_id;
        int window_x;
        int window_y;
        int window_width;
        int window_height;
+       void *evas_obj;
 } MMCamWaylandInfo;
 #endif /* HAVE_WAYLAND */
 
@@ -1813,10 +1811,10 @@ typedef struct _MMCamWaylandInfo {
 ========================================================================================*/
 /**
  *     Function definition for video stream callback.
- *  Be careful! In this function, you can't call functions that change the state of camcorder such as mm_camcorder_stop(), 
+ *  Be careful! In this function, you can't call functions that change the state of camcorder such as mm_camcorder_stop(),
  *  mm_camcorder_unrealize(), mm_camcorder_record(), mm_camcorder_commit(), and mm_camcorder_cancel(), etc.
- *  Please don't hang this function long. It may cause low performance of preview or occur timeout error from video source. 
- *  Also, you're not allowed to call mm_camcorder_stop() even in other context, while you're hanging this function. 
+ *  Please don't hang this function long. It may cause low performance of preview or occur timeout error from video source.
+ *  Also, you're not allowed to call mm_camcorder_stop() even in other context, while you're hanging this function.
  *  I recommend to you releasing this function ASAP.
  *
  *     @param[in]      stream                  Reference pointer to video stream data
@@ -1860,12 +1858,12 @@ typedef gboolean (*mm_camcorder_video_capture_callback)(MMCamcorderCaptureDataTy
 ========================================================================================*/
 /**
  *    mm_camcorder_create:\n
- *  Create camcorder object. This is the function that an user who wants to use mm_camcorder calls first. 
+ *  Create camcorder object. This is the function that an user who wants to use mm_camcorder calls first.
  *  This function creates handle structure and initialize mutex, attributes, gstreamer.
- *  When this function success, it will return  a handle of newly created object. 
+ *  When this function success, it will return  a handle of newly created object.
  *  A user have to put the handle when he calls every function of mm_camcorder. \n
  *  Second argument of this function is the field to decribe pre-setting information of mm_camcorder such as which camera device it will use.
- *  Normally, MM_VIDEO_DEVICE_CAMERA0 is for Main camera(or Mega camera, Back camera), 
+ *  Normally, MM_VIDEO_DEVICE_CAMERA0 is for Main camera(or Mega camera, Back camera),
  *  and MM_VIDEO_DEVICE_CAMERA1 is for VGA camera (or Front camera). If you want audio recording,
  *  please set MM_VIDEO_DEVICE_NONE. (No camera device is needed.)
  *
@@ -2155,7 +2153,7 @@ int mm_camcorder_realize(MMHandleType camcorder);
  *    mm_camcorder_unrealize:\n
  *  Uninitialize camcoder resources and free allocated memory.
  *  Most important resource that is released here is gstreamer pipeline of mm_camcorder.
- *  Because most of resources, such as camera device, video display device, and audio I/O device, are operating on the gstreamer pipeline, 
+ *  Because most of resources, such as camera device, video display device, and audio I/O device, are operating on the gstreamer pipeline,
  *  this function should be called to release its resources.
  *  Moreover, mm_camcorder is controlled by audio session manager. If an user doesn't call this function when he want to release mm_camcorder,
  *  other multimedia frameworks may face session problem. For more detail information, please refer mm_session module.
@@ -2640,8 +2638,8 @@ int mm_camcorder_pause(MMHandleType camcorder);
  *  Some encoder or muxer require a certain type of finalizing such as adding some information to header.
  *  This function takes that roll. So if you don't call this function after recording, the result file may not be playable.\n
  *  After committing successfully, camcorder resumes displaying preview (video recording case).
- *  Because this is the function for saving the recording result, the operation is available 
- *  only when the mode of camcorder is MM_CAMCORDER_MODE_AUDIO or MM_CAMCORDER_MODE_VIDEO. 
+ *  Because this is the function for saving the recording result, the operation is available
+ *  only when the mode of camcorder is MM_CAMCORDER_MODE_AUDIO or MM_CAMCORDER_MODE_VIDEO.
  *
  *     @param[in]      camcorder       A handle of camcorder.
  *     @return         This function returns zero(MM_ERROR_NONE) on success, or negative value with error code.\n
@@ -2692,8 +2690,8 @@ int mm_camcorder_commit(MMHandleType camcorder);
  *     When a user want to finish recording without saving the result file, this function can be used.
  *     Like mm_camcorder_commit(), this function also stops recording, release related resources(like codec) ,and goes back to preview status.
  *     However, instead of saving file, this function unlinks(delete) the result.\n
- *     Because this is the function for canceling recording, the operation is available 
- *     only when mode is MM_CAMCORDER_MODE_AUDIO or MM_CAMCORDER_MODE_VIDEO. 
+ *     Because this is the function for canceling recording, the operation is available
+ *     only when mode is MM_CAMCORDER_MODE_AUDIO or MM_CAMCORDER_MODE_VIDEO.
  *
  *     @param[in]      camcorder       A handle of camcorder.
  *     @return         This function returns zero(MM_ERROR_NONE) on success, or negative value with error code.\n
@@ -2773,7 +2771,7 @@ int mm_camcorder_set_message_callback(MMHandleType camcorder, MMMessageCallback
 /**
  *    mm_camcorder_set_video_stream_callback:\n
  *  Set callback for user defined video stream callback function.
- *  Users can retrieve video frame using registered callback. 
+ *  Users can retrieve video frame using registered callback.
  *  The callback function holds the same buffer that will be drawed on the display device.
  *  So if an user change the buffer, it will be displayed on the device.
  *
@@ -2809,7 +2807,7 @@ int mm_camcorder_set_video_stream_callback(MMHandleType camcorder, mm_camcorder_
  *  mm_camcorder deliever captured image through the callback.\n
  *  Normally, this function provides main captured image and thumnail image. But depending on the environment,
  *  thumnail would not be available. Information related with main captured image and thumnail image is also included
- *  in the argument of the callback function. 
+ *  in the argument of the callback function.
  *  For more detail information of callback, please refer 'mm_camcorder_video_capture_callback'.
  *
  *     @param[in]      camcorder       A handle of camcorder.
@@ -2909,7 +2907,7 @@ int mm_camcorder_get_state(MMHandleType camcorder, MMCamcorderStateType *state);
 /**
  *    mm_camcorder_get_attributes:\n
  *  Get attributes of camcorder with given attribute names. This function can get multiple attributes
- *  simultaneously. If one of attribute fails, this function will stop at the point. 
+ *  simultaneously. If one of attribute fails, this function will stop at the point.
  *  'err_attr_name' let you know the name of the attribute.
  *
  *     @param[in]      camcorder       Specifies the camcorder  handle.
@@ -2957,7 +2955,7 @@ int mm_camcorder_get_attributes(MMHandleType camcorder,  char **err_attr_name, c
 /**
  *    mm_camcorder_set_attributes:\n
  *  Set attributes of camcorder with given attribute names. This function can set multiple attributes
- *  simultaneously. If one of attribute fails, this function will stop at the point. 
+ *  simultaneously. If one of attribute fails, this function will stop at the point.
  *  'err_attr_name' let you know the name of the attribute.
  *
  *     @param[in]      camcorder       Specifies the camcorder  handle.
@@ -3161,8 +3159,8 @@ int mm_camcorder_init_focusing(MMHandleType camcorder);
  *  Start focusing. \n
  *  This function command to start focusing opeartion. Because focusing operation depends on mechanic or electric module,
  *  it may take small amount of time. (For ex, 500ms ~ 3sec). \n
- *  This function works asynchronously. When an user call this function,  it will return immediately. 
- *  However, focusing operation will continue until it gets results. 
+ *  This function works asynchronously. When an user call this function,  it will return immediately.
+ *  However, focusing operation will continue until it gets results.
  *  After finishing operation, you can get 'MM_MESSAGE_CAMCORDER_FOCUS_CHANGED' message.
  *  'param.code' of the message structure describes the fucusing was success or not.
  *
@@ -3223,7 +3221,7 @@ int mm_camcorder_start_focusing(MMHandleType camcorder);
  *     @return         This function returns zero(MM_ERROR_NONE) on success, or negative value with error code.\n
  *                     Please refer 'mm_error.h' to know the exact meaning of the error.
  *     @see            mm_camcorder_init_focusing, mm_camcorder_start_focusing
- *     @pre            mm_camcorder_start_focusing() should be called before calling this function. 
+ *     @pre            mm_camcorder_start_focusing() should be called before calling this function.
  *     @post           None
  *     @remarks        None
  *     @par example
index 409aba4..64fec71 100644 (file)
@@ -3265,21 +3265,12 @@ bool _mmcamcorder_commit_display_handle(MMHandleType handle, int attr_idx, const
 #ifdef HAVE_WAYLAND
                } else if (!strcmp(videosink_name, "waylandsink")) {
                        MMCamWaylandInfo *wl_info = (MMCamWaylandInfo *)p_handle;
-                       GstContext *context = NULL;
 
-                       context = gst_wayland_display_handle_context_new((struct wl_display *)wl_info->display);
-                       if (context) {
-                               gst_element_set_context(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, context);
-                       } else {
-                               _mmcam_dbg_warn("gst_wayland_display_handle_context_new failed");
-                       }
+                       _mmcam_dbg_log("parent id : %d", wl_info->parent_id);
 
-                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)wl_info->surface);
+                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)wl_info->parent_id);
                        gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst),
-                                                              wl_info->window_x,
-                                                              wl_info->window_y,
-                                                              wl_info->window_width,
-                                                              wl_info->window_height);
+                               wl_info->window_x, wl_info->window_y, wl_info->window_width, wl_info->window_height);
 #endif /* HAVE_WAYLAND */
                } else {
                        _mmcam_dbg_warn("Commit : Nothing to commit with this element[%s]", videosink_name);
@@ -3327,7 +3318,7 @@ bool _mmcamcorder_commit_display_mode(MMHandleType handle, int attr_idx, const m
 
        _mmcam_dbg_log("Commit : videosinkname[%s]", videosink_name);
 
-       if (!strcmp(videosink_name, "xvimagesink")) {
+       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink")) {
                _mmcam_dbg_log("Commit : display mode [%d]", value->value.i_val);
                MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "display-mode", value->value.i_val);
                return TRUE;
@@ -3420,8 +3411,8 @@ bool _mmcamcorder_commit_display_visible(MMHandleType handle, int attr_idx, cons
                return FALSE;
        }
 
-       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "evasimagesink") ||
-           !strcmp(videosink_name, "evaspixmapsink")) {
+       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink") ||
+           !strcmp(videosink_name, "evaspixmapsink") || !strcmp(videosink_name, "evasimagesink")) {
                MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "visible", value->value.i_val);
                _mmcam_dbg_log("Set visible [%d] done.", value->value.i_val);
                return TRUE;
@@ -3465,8 +3456,8 @@ bool _mmcamcorder_commit_display_geometry_method (MMHandleType handle, int attr_
                return FALSE;
        }
 
-       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "evasimagesink") ||
-           !strcmp(videosink_name, "evaspixmapsink")) {
+       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink") ||
+           !strcmp(videosink_name, "evaspixmapsink") || !strcmp(videosink_name, "evasimagesink")) {
                method = value->value.i_val;
                MMCAMCORDER_G_OBJECT_SET( sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "display-geometry-method", method);
                return TRUE;
@@ -3519,7 +3510,7 @@ bool _mmcamcorder_commit_display_rect(MMHandleType handle, int attr_idx, const m
                return FALSE;
        }
 
-       if (!strcmp(videosink_name, "xvimagesink") ||
+       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink") ||
            !strcmp(videosink_name, "evaspixmapsink")) {
                int rect_x = 0;
                int rect_y = 0;
@@ -3624,7 +3615,7 @@ bool _mmcamcorder_commit_display_scale(MMHandleType handle, int attr_idx, const
        }
 
        zoom = value->value.i_val;
-       if (!strcmp(videosink_name, "xvimagesink")) {
+       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink")) {
                vs_element = sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst;
 
                MMCAMCORDER_G_OBJECT_SET(vs_element, "zoom", (float)(zoom + 1));
index 7873b6d..ab0cada 100644 (file)
@@ -155,21 +155,12 @@ bool _mmcamcorder_client_commit_display_handle(MMHandleType handle, int attr_idx
 #ifdef HAVE_WAYLAND
                } else if (!strcmp(videosink_name, "waylandsink")) {
                        MMCamWaylandInfo *wl_info = (MMCamWaylandInfo *)p_handle;
-                       GstContext *context = NULL;
 
-                       context = gst_wayland_display_handle_context_new((struct wl_display *)wl_info->display);
-                       if (context) {
-                               gst_element_set_context(sc->element[_MMCAMCORDER_CLIENT_VIDEOSINK_SINK].gst, context);
-                       } else {
-                               _mmcam_dbg_warn("gst_wayland_display_handle_context_new failed");
-                       }
+                       _mmcam_dbg_log("parent id : %d", wl_info->parent_id);
 
-                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_CLIENT_VIDEOSINK_SINK].gst), (guintptr)wl_info->surface);
+                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_CLIENT_VIDEOSINK_SINK].gst), (guintptr)wl_info->parent_id);
                        gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_CLIENT_VIDEOSINK_SINK].gst),
-                                                              wl_info->window_x,
-                                                              wl_info->window_y,
-                                                              wl_info->window_width,
-                                                              wl_info->window_height);
+                               wl_info->window_x, wl_info->window_y, wl_info->window_width, wl_info->window_height);
 #endif /* HAVE_WAYLAND */
                } else {
                        _mmcam_dbg_warn("Commit : Nothing to commit with this element[%s]", videosink_name);
@@ -662,21 +653,10 @@ int _mmcamcorder_client_videosink_window_set(MMHandleType handle, type_element*
        } else if (!strcmp(videosink_name, "waylandsink")) {
                MMCamWaylandInfo *wl_info = (MMCamWaylandInfo *)overlay;
                if (wl_info) {
-                       GstContext *context = NULL;
-
-                       context = gst_wayland_display_handle_context_new((struct wl_display *)wl_info->display);
-                       if (context) {
-                               gst_element_set_context(vsink, context);
-                       } else {
-                               _mmcam_dbg_warn("gst_wayland_display_handle_context_new failed");
-                       }
-
-                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vsink), (guintptr)wl_info->surface);
+                       _mmcam_dbg_log("parent id : %d", wl_info->parent_id);
+                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vsink), (guintptr)wl_info->parent_id);
                        gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(vsink),
-                                                              wl_info->window_x,
-                                                              wl_info->window_y,
-                                                              wl_info->window_width,
-                                                              wl_info->window_height);
+                               wl_info->window_x, wl_info->window_y, wl_info->window_width, wl_info->window_height);
                } else {
                        _mmcam_dbg_warn("Handle is NULL. skip setting.");
                }
@@ -1055,7 +1035,7 @@ MMHandleType _mmcamcorder_client_alloc_attribute(MMHandleType handle)
 
        for (idx = 0; idx < attr_count; idx++)
        {
-               _mmcam_dbg_log("Valid type [%s]", hcamcorder->cam_attrs_const_info[idx].name);
+               /*_mmcam_dbg_log("Valid type [%s]", hcamcorder->cam_attrs_const_info[idx].name);*/
 
                mmf_attrs_set_valid_type (attrs, idx, hcamcorder->cam_attrs_const_info[idx].validity_type);
 
@@ -1071,7 +1051,6 @@ MMHandleType _mmcamcorder_client_alloc_attribute(MMHandleType handle)
                                }
                        break;
                        case MM_ATTRS_VALID_TYPE_INT_RANGE:
-                               _mmcam_dbg_err("MM_ATTRS_VALID_TYPE_INT_RANGE");
                                mmf_attrs_set_valid_range(attrs, idx,
                                                          hcamcorder->cam_attrs_const_info[idx].validity_value_1.int_min,
                                                          hcamcorder->cam_attrs_const_info[idx].validity_value_2.int_max,
index b6e4a3a..6445d54 100644 (file)
@@ -1664,10 +1664,8 @@ int _mmcamcorder_conf_add_info(MMHandleType handle, int type, conf_detail** info
                                        } else {
                                                _mmcam_dbg_err("allocation failed");
                                        }
-                               }
-                               else
-                               {
-                                       _mmcam_dbg_err("invalid count - %d", new_element->count_int);
+                               } else {
+                                       /*_mmcam_dbg_err("invalid count - %d", new_element->count_int);*/
                                        new_element->value_int = NULL;
                                }
 
@@ -1693,7 +1691,7 @@ int _mmcamcorder_conf_add_info(MMHandleType handle, int type, conf_detail** info
                                                _mmcam_dbg_err("malloc failed : %d", sizeof(type_string2*)*(new_element->count_string));
                                        }
                                } else {
-                                       _mmcam_dbg_err("invalid count - %d", new_element->count_string);
+                                       /*_mmcam_dbg_err("invalid count - %d", new_element->count_string);*/
                                        new_element->value_string = NULL;
                                }
 
index 5fabb05..bf205a3 100644 (file)
@@ -1267,21 +1267,10 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi
        } else if (!strcmp(videosink_name, "waylandsink")) {
                MMCamWaylandInfo *wl_info = (MMCamWaylandInfo *)overlay;
                if (wl_info) {
-                       GstContext *context = NULL;
-
-                       context = gst_wayland_display_handle_context_new((struct wl_display *)wl_info->display);
-                       if (context) {
-                               gst_element_set_context(vsink, context);
-                       } else {
-                               _mmcam_dbg_warn("gst_wayland_display_handle_context_new failed");
-                       }
-
-                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vsink), (guintptr)wl_info->surface);
+                       _mmcam_dbg_log("parent id : %d", wl_info->parent_id);
+                       gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vsink), (guintptr)wl_info->parent_id);
                        gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(vsink),
-                                                              wl_info->window_x,
-                                                              wl_info->window_y,
-                                                              wl_info->window_width,
-                                                              wl_info->window_height);
+                               wl_info->window_x, wl_info->window_y, wl_info->window_width, wl_info->window_height);
                } else {
                        _mmcam_dbg_warn("Handle is NULL. skip setting.");
                }
@@ -1294,7 +1283,7 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi
                       videosink_name, display_geometry_method, origin_size, visible, rotation, flip);
 
        /* Set attribute */
-       if (!strcmp(videosink_name, "xvimagesink") ||
+       if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink") ||
            !strcmp(videosink_name, "evaspixmapsink")) {
                /* set rotation */
                MMCAMCORDER_G_OBJECT_SET(vsink, "rotate", rotation);
index b26fe60..519f09c 100644 (file)
@@ -823,10 +823,9 @@ int _mmcamcorder_realize(MMHandleType handle)
        _mmcam_dbg_log("Profile mode [%d]", hcamcorder->type);
 
        mm_camcorder_get_attributes(handle, NULL,
-                                   MMCAM_DISPLAY_SURFACE, &display_surface_type,
-                                   MMCAM_CAMERA_RECORDING_MOTION_RATE, &motion_rate,
-                                   MMCAM_DISPLAY_SOCKET_PATH, &socket_path, &socket_path_len,
-                                   NULL);
+               MMCAM_DISPLAY_SURFACE, &display_surface_type,
+               MMCAM_CAMERA_RECORDING_MOTION_RATE, &motion_rate,
+               NULL);
 
        /* sound focus */
        if (hcamcorder->sound_focus_register) {
@@ -912,30 +911,32 @@ int _mmcamcorder_realize(MMHandleType handle)
                _mmcam_dbg_warn("SupportDualStream [%d]", hcamcorder->sub_context->info_video->support_dual_stream);
        }
 
-       if (socket_path == NULL) {
-               _mmcam_dbg_warn("Socket Path is not properly set, -> to NullSink.");
+       switch (display_surface_type) {
+       case MM_DISPLAY_SURFACE_OVERLAY:
+               videosink_element_type = strdup("VideosinkElementOverlay");
+               break;
+       case MM_DISPLAY_SURFACE_EVAS:
+               videosink_element_type = strdup("VideosinkElementEvas");
+               break;
+       case MM_DISPLAY_SURFACE_GL:
+               videosink_element_type = strdup("VideosinkElementGL");
+               break;
+       case MM_DISPLAY_SURFACE_NULL:
                videosink_element_type = strdup("VideosinkElementNull");
-       } else {
-               switch (display_surface_type) {
-               case MM_DISPLAY_SURFACE_OVERLAY:
-                       videosink_element_type = strdup("VideosinkElementOverlay");
-                       break;
-               case MM_DISPLAY_SURFACE_EVAS:
-                       videosink_element_type = strdup("VideosinkElementEvas");
-                       break;
-               case MM_DISPLAY_SURFACE_GL:
-                       videosink_element_type = strdup("VideosinkElementGL");
-                       break;
-               case MM_DISPLAY_SURFACE_NULL:
+               break;
+       case MM_DISPLAY_SURFACE_REMOTE:
+               mm_camcorder_get_attributes(handle, NULL,
+                       MMCAM_DISPLAY_SOCKET_PATH, &socket_path, &socket_path_len,
+                       NULL);
+               if (socket_path == NULL) {
+                       _mmcam_dbg_warn("REMOTE surface, but socket path is NULL -> to NullSink");
                        videosink_element_type = strdup("VideosinkElementNull");
-                       break;
-               case MM_DISPLAY_SURFACE_REMOTE:
+               } else
                        videosink_element_type = strdup("VideosinkElementRemote");
-                       break;
-               default:
-                       videosink_element_type = strdup("VideosinkElementOverlay");
-                       break;
-               }
+               break;
+       default:
+               videosink_element_type = strdup("VideosinkElementOverlay");
+               break;
        }
 
        /* check string of videosink element */