[0.6.246] Set h264parse to send SPS/PPS with every IDR frame if omxdec_h264 is used. 47/245947/2 accepted/tizen/unified/20201102.124441 submit/tizen/20201028.052639
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 20 Oct 2020 08:50:36 +0000 (17:50 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Wed, 21 Oct 2020 08:28:12 +0000 (17:28 +0900)
- The OMX decoder gets error if the player disables audio-only mode during playback,
  because SPS/PPS is not received in that situation.

Change-Id: I297e96983b8c6c7514ea98fc93cb6036c5f97e47

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

index 6ff67bc..b98dc12 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.245
+Version:    0.6.246
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 881b9d1..b8fabf0 100644 (file)
@@ -192,6 +192,7 @@ typedef enum {
        MMPLAYER_M_Q2,
        MMPLAYER_M_DEMUX,
        MMPLAYER_M_SUBPARSE,
+       MMPLAYER_M_V_PARSE,
        MMPLAYER_M_V_INPUT_SELECTOR,    // video input_select
        MMPLAYER_M_A_INPUT_SELECTOR,    // audio input_select
        MMPLAYER_M_T_INPUT_SELECTOR,    // text input_select
index 1bde8bf..b3fadf0 100644 (file)
@@ -7680,6 +7680,9 @@ _mmplayer_gst_element_added(GstElement *bin, GstElement *element, gpointer data)
 #endif
                player->pipeline->mainbin[MMPLAYER_M_DEMUX].id = MMPLAYER_M_DEMUX;
                player->pipeline->mainbin[MMPLAYER_M_DEMUX].gst = element;
+       } else if (g_strrstr(klass, "Parser") && (g_strrstr(klass, "Video"))) {
+               player->pipeline->mainbin[MMPLAYER_M_V_PARSE].id = MMPLAYER_M_V_PARSE;
+               player->pipeline->mainbin[MMPLAYER_M_V_PARSE].gst = element;
        }
 
        if (g_strrstr(factory_name, "asfdemux") || g_strrstr(factory_name, "qtdemux") || g_strrstr(factory_name, "avidemux")) {
@@ -7703,6 +7706,12 @@ _mmplayer_gst_element_added(GstElement *bin, GstElement *element, gpointer data)
                }
        } else if (g_strrstr(factory_name, player->ini.videocodec_element_hw)) {
                player->pipeline->mainbin[MMPLAYER_M_DEC1].gst = element;
+       } else if (g_strrstr(factory_name, "omxdec_h264")) {
+               GstElement *video_parse = player->pipeline->mainbin[MMPLAYER_M_V_PARSE].gst;
+               if (video_parse && (g_object_class_find_property(G_OBJECT_GET_CLASS(video_parse), "config-interval"))) {
+                       g_object_set(G_OBJECT(video_parse), "config-interval", -1, NULL);
+                       LOGD("Send SPS and PPS Insertion every IDR frame");
+               }
        }
 
        if ((player->pipeline->mainbin[MMPLAYER_M_DEMUX].gst) &&