diff options
author | Hyongtaek Lim <hyongtaek.lim@samsung.com> | 2015-07-30 15:28:43 +0900 |
---|---|---|
committer | Hyongtaek Lim <hyongtaek.lim@samsung.com> | 2015-07-30 15:31:29 +0900 |
commit | 2b25b617845ccee6eb0aa69806efabd5c6d496b7 (patch) | |
tree | c0f11364cc15284da5c82f74dbc7463c82949921 | |
parent | e031d8c0cbdc6e4ec8625a7b5745c27a82e34d86 (diff) | |
download | libmm-player-2b25b617845ccee6eb0aa69806efabd5c6d496b7.tar.gz libmm-player-2b25b617845ccee6eb0aa69806efabd5c6d496b7.tar.bz2 libmm-player-2b25b617845ccee6eb0aa69806efabd5c6d496b7.zip |
Add to check display type flow when get raw video capssubmit/tizen/20150731.053257accepted/tizen/wearable/20150731.102918accepted/tizen/tv/20150731.102751accepted/tizen/mobile/20150731.102628
Signed-off-by: Hyongtaek Lim <hyongtaek.lim@samsung.com>
Change-Id: I22c38abc691ab3215f5589df001c1f94bf217d5d
-rw-r--r-- | src/mused/mm_player_mused.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/mused/mm_player_mused.c b/src/mused/mm_player_mused.c index 772baaf..9a218e7 100644 --- a/src/mused/mm_player_mused.c +++ b/src/mused/mm_player_mused.c @@ -833,13 +833,30 @@ static int _mmplayer_get_raw_video_caps(mm_player_t *player, char **caps) GstCaps *v_caps = NULL; GstPad *pad = NULL; GstElement *gst; + gint stype = 0; - if ( !player->pipeline || !player->pipeline->videobin || - !player->pipeline->videobin[MMPLAYER_V_SINK].gst ) { - debug_error("No video pipeline"); - return MM_ERROR_PLAYER_INVALID_STATE; + if(!player->videosink_linked) { + debug_log("No video sink"); + return MM_ERROR_NONE; + } + mm_attrs_get_int_by_name (player->attrs, "display_surface_type", &stype); + + if (stype == MM_DISPLAY_SURFACE_NULL) { + debug_log("Display type is NULL"); + if(!player->video_fakesink) { + debug_error("No fakesink"); + return MM_ERROR_PLAYER_INVALID_STATE; + } + gst = player->video_fakesink; + } + else { + if ( !player->pipeline || !player->pipeline->videobin || + !player->pipeline->videobin[MMPLAYER_V_SINK].gst ) { + debug_error("No video pipeline"); + return MM_ERROR_PLAYER_INVALID_STATE; + } + gst = player->pipeline->videobin[MMPLAYER_V_SINK].gst; } - gst = player->pipeline->videobin[MMPLAYER_V_SINK].gst; pad = gst_element_get_static_pad(gst, "sink"); if(!pad) { debug_error("static pad is NULL"); |