diff options
author | Hyuntae Kim <ht1211.kim@samsung.com> | 2019-11-12 17:50:09 +0900 |
---|---|---|
committer | Hyuntae Kim <ht1211.kim@samsung.com> | 2019-11-14 14:19:36 +0900 |
commit | 1044299a1d7b6c0b0ea979fe5d244af8dcca3741 (patch) | |
tree | aa39c4b2765b17d61626ec0ff4df9c2f103f4be9 | |
parent | be62f70e640830b75006e78f8303b8123d3d3d08 (diff) | |
download | libmm-camcorder-1044299a1d7b6c0b0ea979fe5d244af8dcca3741.tar.gz libmm-camcorder-1044299a1d7b6c0b0ea979fe5d244af8dcca3741.tar.bz2 libmm-camcorder-1044299a1d7b6c0b0ea979fe5d244af8dcca3741.zip |
Set display handle for directvideosinksubmit/tizen/20191119.110334accepted/tizen/unified/20191120.034533
[Version] 0.10.189
[Profile] TV
[Issue Type] Update
Change-Id: Ic8cf1ddd6470ddd4786ca083e479d613130920ec
-rw-r--r-- | packaging/libmm-camcorder.spec | 2 | ||||
-rw-r--r-- | src/mm_camcorder_attribute.c | 17 | ||||
-rw-r--r-- | src/mm_camcorder_gstcommon.c | 26 |
3 files changed, 41 insertions, 4 deletions
diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index c0d3db9..d20b3d1 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -1,6 +1,6 @@ Name: libmm-camcorder Summary: Camera and recorder library -Version: 0.10.188 +Version: 0.10.189 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_camcorder_attribute.c b/src/mm_camcorder_attribute.c index 48d962f..d4bc7f6 100644 --- a/src/mm_camcorder_attribute.c +++ b/src/mm_camcorder_attribute.c @@ -3806,6 +3806,20 @@ bool _mmcamcorder_commit_display_handle(MMHandleType handle, int attr_idx, const window_info = (MMCamWindowInfo *)dp_handle; _mmcam_dbg_log("wayland global surface id : %d", window_info->surface_id); gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)window_info->surface_id); + } else if (!strcmp(videosink_name, "directvideosink")) { + window_info = (MMCamWindowInfo *)dp_handle; + _mmcam_dbg_log("wayland global surface id : %d, x,y,w,h (%d,%d,%d,%d)", + window_info->surface_id, + window_info->rect.x, + window_info->rect.y, + window_info->rect.width, + window_info->rect.height); + gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)window_info->surface_id); + gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), + window_info->rect.x, + window_info->rect.y, + window_info->rect.width, + window_info->rect.height); } else { _mmcam_dbg_warn("Commit : Nothing to commit with this element[%s]", videosink_name); return FALSE; @@ -3942,7 +3956,8 @@ bool _mmcamcorder_commit_display_visible(MMHandleType handle, int attr_idx, cons } if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "tizenwlsink") || - !strcmp(videosink_name, "evaspixmapsink") || !strcmp(videosink_name, "evasimagesink")) { + !strcmp(videosink_name, "evaspixmapsink") || !strcmp(videosink_name, "evasimagesink") || + !strcmp(videosink_name, "directvideosink")) { 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); } else { diff --git a/src/mm_camcorder_gstcommon.c b/src/mm_camcorder_gstcommon.c index 5a9377b..a0da705 100644 --- a/src/mm_camcorder_gstcommon.c +++ b/src/mm_camcorder_gstcommon.c @@ -1439,8 +1439,7 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi _mmcam_dbg_log("(dp_handle=%p, size=%d)", dp_handle, size); /* Set display handle */ - if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "ximagesink") || - !strcmp(videosink_name, "directvideosink")) { + if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "ximagesink")) { if (dp_handle) { xid = *dp_handle; _mmcam_dbg_log("xid = %lu )", xid); @@ -1473,6 +1472,29 @@ int _mmcamcorder_videosink_window_set(MMHandleType handle, type_element* Videosi } else { _mmcam_dbg_warn("Handle is NULL. skip setting."); } + } else if (!strcmp(videosink_name, "directvideosink")) { + if (dp_handle) { + window_info = (MMCamWindowInfo *)dp_handle; + _mmcam_dbg_log("wayland global surface id : %d, x,y,w,h (%d,%d,%d,%d)", + window_info->surface_id, + window_info->rect.x, + window_info->rect.y, + window_info->rect.width, + window_info->rect.height); + gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vsink), (guintptr)window_info->surface_id); + gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(vsink), + window_info->rect.x, + window_info->rect.y, + window_info->rect.width, + window_info->rect.height); + } else { + _mmcam_dbg_warn("dp_handle is null"); + } +#ifdef _MMCAMCORDER_RM_SUPPORT + if (hcamcorder->request_resources.category_id[0] == RM_CATEGORY_VIDEO_DECODER_SUB) + display_scaler = 1; + MMCAMCORDER_G_OBJECT_SET(vsink, "device-scaler", display_scaler); +#endif /* _MMCAMCORDER_RM_SUPPORT */ } else { _mmcam_dbg_warn("Who are you?? (Videosink: %s)", videosink_name); } |