Add to check display type flow when get raw video caps 64/44964/1 accepted/tizen/mobile/20150731.102628 accepted/tizen/tv/20150731.102751 accepted/tizen/wearable/20150731.102918 submit/tizen/20150731.053257
authorHyongtaek Lim <hyongtaek.lim@samsung.com>
Thu, 30 Jul 2015 06:28:43 +0000 (15:28 +0900)
committerHyongtaek Lim <hyongtaek.lim@samsung.com>
Thu, 30 Jul 2015 06:31:29 +0000 (15:31 +0900)
Signed-off-by: Hyongtaek Lim <hyongtaek.lim@samsung.com>
Change-Id: I22c38abc691ab3215f5589df001c1f94bf217d5d

src/mused/mm_player_mused.c

index 772baafe97fb72b892868e28ca95ae277623de77..9a218e760b71e1043cf57f4a7e79a54b4e5c3a31 100644 (file)
@@ -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");