[0.6.224] set input information to parsebin 18/231318/1
authorEunhye Choi <eunhae1.choi@samsung.com>
Tue, 21 Apr 2020 06:53:49 +0000 (15:53 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Tue, 21 Apr 2020 06:53:51 +0000 (15:53 +0900)
- set detected input information to parsebin
  to avoid duplicated typefinding which can cause
  deadlock issue.

Change-Id: I21cc822a4806361ab589755e2a2f4a9b76980bc3

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

index 0b0f964..add6374 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.223
+Version:    0.6.224
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 73264c6..1201b39 100644 (file)
@@ -619,6 +619,7 @@ typedef struct {
 
        /* type string */
        gchar *type;
+       GstCaps *type_caps;
 
        /* video stream caps parsed by demuxer */
        GstCaps *v_stream_caps;
index da38d53..33e0eed 100644 (file)
@@ -3125,6 +3125,8 @@ __mmplayer_gst_deep_element_added(GstElement *bin, GstBin *child, GstElement *el
 
                g_object_set(G_OBJECT(child), "message-forward", TRUE, NULL);
                g_object_set(G_OBJECT(element), "message-forward", TRUE, NULL);
+               if (player->type_caps)
+                       g_object_set(G_OBJECT(element), "sink-caps", player->type_caps, NULL);
 
                mm_attrs_get_int_by_name(player->attrs, MM_PLAYER_VIDEO_CODEC_TYPE, &video_codec_type);
                mm_attrs_get_int_by_name(player->attrs, MM_PLAYER_AUDIO_CODEC_TYPE, &audio_codec_type);
index a15b493..a148f06 100644 (file)
@@ -4363,6 +4363,11 @@ __mmplayer_gst_destroy_pipeline(mmplayer_t *player)
        }
        MMPLAYER_FREEIF(player->album_art);
 
+       if (player->type_caps) {
+               gst_caps_unref(player->type_caps);
+               player->type_caps = NULL;
+       }
+
        if (player->v_stream_caps) {
                gst_caps_unref(player->v_stream_caps);
                player->v_stream_caps = NULL;
@@ -5959,6 +5964,14 @@ _mmplayer_typefind_have_type(GstElement *tf, guint probability,
        MMPLAYER_RETURN_IF_FAIL(player && tf && caps);
 
        /* store type string */
+       if (player->type_caps) {
+               gst_caps_unref(player->type_caps);
+               player->type_caps = NULL;
+       }
+
+       player->type_caps = gst_caps_copy(caps);
+       MMPLAYER_LOG_GST_CAPS_TYPE(player->type_caps);
+
        MMPLAYER_FREEIF(player->type);
        player->type = gst_caps_to_string(caps);
        if (player->type)