RM : set 'device-scaler' property in [directvideosink] before calling gst_video_overl... 77/258277/2
authorSungjae Pyo <sungjae.pyo@samsung.com>
Tue, 24 Nov 2020 08:17:55 +0000 (17:17 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 13 May 2021 06:03:54 +0000 (06:03 +0000)
Change-Id: I2838abb21239a0a6af99955b42651c7828dfe638
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
src/mm_camcorder_gstcommon.c

index 85bb8c84f04436436ebc521ddc73778300abba42..288ffe606e39410210c6d6ee7c939dc1ed99b6b8 100755 (executable)
@@ -1801,10 +1801,6 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi
                        MMCAM_LOG_WARNING("Handle is NULL. Set xid as 0.. but, it's not recommended.");
                        gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vsink), 0);
                }
-#ifdef _MMCAMCORDER_RM_SUPPORT
-               /* set the videosink using the virtual device id instead of the real id (main=0, sub=1) */
-               MMCAMCORDER_G_OBJECT_SET(vsink, "device-scaler", hcamcorder->returned_devices.device_id[1]);
-#endif /* _MMCAMCORDER_RM_SUPPORT */
        } else if (!strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink")) {
                MMCAM_LOG_INFO("videosink : %s, handle : %p", videosink_name, dp_handle);
 
@@ -1824,6 +1820,11 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi
                        MMCAM_LOG_WARNING("Handle is NULL. skip setting.");
                }
        } else if (!strcmp(videosink_name, "directvideosink")) {
+#ifdef _MMCAMCORDER_RM_SUPPORT
+               /* set the videosink using the virtual device id instead of the real id (main=0, sub=1) */
+               MMCAM_LOG_INFO("device-scaler : %d", hcamcorder->returned_devices.device_id[1]);
+               MMCAMCORDER_G_OBJECT_SET(vsink, "device-scaler", hcamcorder->returned_devices.device_id[1]);
+#endif /* _MMCAMCORDER_RM_SUPPORT */
                if (dp_handle) {
                        window_info = (MMCamWindowInfo *)dp_handle;
                        MMCAM_LOG_INFO("wayland global surface id : %d, x,y,w,h (%d,%d,%d,%d)",
@@ -1841,11 +1842,6 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi
                } else {
                        MMCAM_LOG_WARNING("dp_handle is null");
                }
-#ifdef _MMCAMCORDER_RM_SUPPORT
-               /* set the videosink using the virtual device id instead of the real id (main=0, sub=1) */
-               MMCAM_LOG_INFO("device-scaler : %d", hcamcorder->returned_devices.device_id[1]);
-               MMCAMCORDER_G_OBJECT_SET(vsink, "device-scaler", hcamcorder->returned_devices.device_id[1]);
-#endif /* _MMCAMCORDER_RM_SUPPORT */
        } else {
                MMCAM_LOG_WARNING("Who are you?? (Videosink: %s)", videosink_name);
        }