From 7d171f99256c0eb2c032242f3738659db0e0531a Mon Sep 17 00:00:00 2001 From: Sungjae Pyo Date: Tue, 24 Nov 2020 17:17:55 +0900 Subject: [PATCH] RM : set 'device-scaler' property in [directvideosink] before calling gst_video_overlay_set_xxx(). Change-Id: I2838abb21239a0a6af99955b42651c7828dfe638 Signed-off-by: Jeongmo Yang --- src/mm_camcorder_gstcommon.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/mm_camcorder_gstcommon.c b/src/mm_camcorder_gstcommon.c index 85bb8c8..288ffe6 100755 --- a/src/mm_camcorder_gstcommon.c +++ b/src/mm_camcorder_gstcommon.c @@ -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); } -- 2.7.4