From 6b30a5d98777d4e3b2c12405028338cdf1db98d2 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 3 Oct 2022 15:19:16 -0300 Subject: [PATCH] adaptivedemux2: Generate proper stream-id taking into account upstream Part-of: --- .../flow-expectations/log-i-sink-expected | 2 +- .../gst-plugins-good/ext/adaptivedemux2/dash/gstdashdemux.c | 3 ++- .../ext/adaptivedemux2/gstadaptivedemux-track.c | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-integration-testsuites/testsuites/validate/dash/seek_with_stop_between_fragments/flow-expectations/log-i-sink-expected b/subprojects/gst-integration-testsuites/testsuites/validate/dash/seek_with_stop_between_fragments/flow-expectations/log-i-sink-expected index b290b85a73..64a26a120f 100644 --- a/subprojects/gst-integration-testsuites/testsuites/validate/dash/seek_with_stop_between_fragments/flow-expectations/log-i-sink-expected +++ b/subprojects/gst-integration-testsuites/testsuites/validate/dash/seek_with_stop_between_fragments/flow-expectations/log-i-sink-expected @@ -1,4 +1,4 @@ -event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1, stream=(GstStream)"\(GstStream\)\ video-0"; +event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1, stream=(GstStream)"\(GstStream\)\ ecf1ea12b198caea123f05f4fcb08daa35ee5045577d2be98f3424c0ce90757a/video-0"; event caps: video/x-raw, colorimetry=(string)2:4:0:0, format=(string)I420, framerate=(fraction)0/1, height=(int)446, interlace-mode=(string)progressive, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, width=(int)928; event segment: format=TIME, start=0:00:00.014000000, offset=0:00:00.000000000, stop=none, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000 event stream-collection: stream-collection, collection=(GstStreamCollection)"\(GstStreamCollection\)\ streamcollection0"; diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstdashdemux.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstdashdemux.c index 24e3fe2278..3d0b5624e5 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstdashdemux.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstdashdemux.c @@ -874,7 +874,8 @@ gst_dash_demux_setup_all_streams (GstDashDemux2 * demux) track = gst_adaptive_demux_track_new (GST_ADAPTIVE_DEMUX_CAST (demux), streamtype, GST_STREAM_FLAG_NONE, stream_id, codec_caps, tags); - stream = gst_dash_demux_stream_new (demux->client->period_idx, stream_id); + stream = + gst_dash_demux_stream_new (demux->client->period_idx, track->stream_id); GST_ADAPTIVE_DEMUX2_STREAM_CAST (stream)->stream_type = streamtype; g_free (stream_id); diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-track.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-track.c index b620772313..62e3ada921 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-track.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-track.c @@ -920,10 +920,11 @@ gst_adaptive_demux_track_new (GstAdaptiveDemux * demux, track->demux = demux; track->type = type; track->flags = flags; - track->stream_id = g_strdup (stream_id); + track->stream_id = + gst_element_decorate_stream_id (GST_ELEMENT (demux), stream_id); track->period_num = (guint) (-1); track->generic_caps = caps; - track->stream_object = gst_stream_new (stream_id, caps, type, flags); + track->stream_object = gst_stream_new (track->stream_id, caps, type, flags); if (tags) { track->tags = gst_tag_list_ref (tags); gst_stream_set_tags (track->stream_object, tags);