[0.6.93] resolve playback issue of 360 content with sw codec 46/170046/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Tue, 13 Feb 2018 05:37:29 +0000 (14:37 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Tue, 13 Feb 2018 05:37:57 +0000 (14:37 +0900)
Change-Id: I18bcc67fa03b040b21b203fe639596fb4512cce6

packaging/libmm-player.spec
src/mm_player_priv.c

index cc8739d..0a9f86d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.92
+Version:    0.6.93
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index f98ab43..c7afcef 100644 (file)
@@ -5306,37 +5306,31 @@ ERROR:
 static int
 __mmplayer_gst_create_video_filters(mm_player_t* player, GList** bucket)
 {
-       MMDisplaySurfaceType surface_type = MM_DISPLAY_SURFACE_NULL;
-       gchar* video_csc = "videoconvert"; // default colorspace converter
+       gchar* video_csc = "videoconvert"; /* default colorspace converter */
        GList* element_bucket = *bucket;
 
        MMPLAYER_RETURN_VAL_IF_FAIL(player && player->pipeline && player->pipeline->videobin, MM_ERROR_PLAYER_NOT_INITIALIZED);
 
        MMPLAYER_FENTER();
 
-       mm_attrs_get_int_by_name(player->attrs, "display_surface_type", (int *)&surface_type);
-
-       if (player->set_mode.video_zc) {
-               video_csc = ""; /* videosinks don't use videoconvert normally */
-       } else {
-               /* sw codec, if player use libav, tizenwlsink need videoconvert to render shm wl-buffer which support RGB only */
-               if ((surface_type == MM_DISPLAY_SURFACE_OVERLAY) && (!strncmp(player->ini.videosink_element_overlay, "tizenwlsink", strlen(player->ini.videosink_element_overlay))))
-                       video_csc = "videoconvert";
-       }
-       if (video_csc && (strcmp(video_csc, ""))) {
-               MMPLAYER_CREATE_ELEMENT(player->pipeline->videobin, MMPLAYER_V_CONV, video_csc, "video converter", TRUE, player);
-               LOGD("using video converter: %s", video_csc);
+       if (player->set_mode.video_zc || player->is_content_spherical) {
+               LOGD("do not need to add video filters.");
+               return MM_ERROR_NONE;
        }
 
+       /* in case of sw codec except 360 playback,
+        * if libav video decoder is selected, videoconvert is required to render the shm wl-buffer which support RGB only via tizenwlsink. */
+       MMPLAYER_CREATE_ELEMENT(player->pipeline->videobin, MMPLAYER_V_CONV, video_csc, "video converter", TRUE, player);
+       LOGD("using video converter: %s", video_csc);
+
        /* set video rotator */
-       if (!player->set_mode.video_zc)
-               MMPLAYER_CREATE_ELEMENT(player->pipeline->videobin, MMPLAYER_V_FLIP, "videoflip", "video rotator", TRUE, player);
+       MMPLAYER_CREATE_ELEMENT(player->pipeline->videobin, MMPLAYER_V_FLIP, "videoflip", "video rotator", TRUE, player);
 
        *bucket = element_bucket;
        MMPLAYER_FLEAVE();
        return MM_ERROR_NONE;
 
-ERROR:
+ERROR: /* refer MMPLAYER_CREATE_ELEMENT */
        *bucket = NULL;
        MMPLAYER_FLEAVE();
        return MM_ERROR_PLAYER_INTERNAL;
@@ -5485,7 +5479,7 @@ __mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDispl
        switch (surface_type) {
        case MM_DISPLAY_SURFACE_OVERLAY:
        {
-               bool use_tbm = player->set_mode.video_zc;
+               bool use_tbm = (player->set_mode.video_zc || player->is_content_spherical);
                if (!use_tbm) {
                        LOGD("selected videosink name: %s", videosink_element);