After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796000 - adaptivedemux: Re-use pads (streams-aware)
adaptivedemux: Re-use pads (streams-aware)
Status: RESOLVED DUPLICATE of bug 777213
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 775132
Blocks:
 
 
Reported: 2018-05-10 11:44 UTC by Seungha Yang
Modified: 2018-05-11 06:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
urisourcebin: Link pending pad to slot by using GstStream API (11.61 KB, patch)
2018-05-10 13:16 UTC, Seungha Yang
rejected Details | Review

Description Seungha Yang 2018-05-10 11:44:41 UTC
slot's caps comparison with pending pad's caps cannot guarantee
that they are fully compatible ones. For example, in case of hls streaming,
caps for both video/audio streams can be "video/mpegts".
So, newly exposed pads by adaptivedemux can be inappropriately linked
with an existing slot. (e.g., link video stream's pad to audio stream's slot)
Comment 1 Seungha Yang 2018-05-10 11:47:12 UTC
Moved from Bug #775132. See also Bug #776672
Comment 2 Seungha Yang 2018-05-10 12:19:58 UTC
In Bug #775132, I proposed mapping new/old streams using Caps/Tag/StreamType/StreamFlags. But it seems to insufficient approach and there might be still ambiguity.

I thing new API for mapping two streams' continuity can be useful for that.
maybe gst_stream_set_peer_stream_id(const gchar* stream_id) ?

When we add expose-all mode in decodebin3, potentially the same ambiguity could be made.
Comment 3 Seungha Yang 2018-05-10 13:16:27 UTC
Created attachment 371897 [details] [review]
urisourcebin: Link pending pad to slot by using GstStream API
Comment 4 Seungha Yang 2018-05-10 13:19:41 UTC
This stream has two audio track and current urisourcebin impl. can cause invalid stream mapping.

http://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8

Almost always, video is disappeared with bit rate switching by hlsdemux.
Comment 5 Edward Hervey 2018-05-10 13:30:05 UTC
Why can't adaptive demuxers do that themselves ? (i.e. figure out which pad to re-use)
Comment 6 Seungha Yang 2018-05-10 13:47:13 UTC
(In reply to Edward Hervey from comment #5)
> Why can't adaptive demuxers do that themselves ? (i.e. figure out which pad
> to re-use)

That idea looks great (same approach with Bug 684790), and I guess that will bring very big change in adaptivedemux though.
Comment 7 Edward Hervey 2018-05-10 14:00:15 UTC
It might not be *that* much change in adaptivedemux.

In general I think it should really be up to "stream providers" (demuxer, adaptive demuxers,...) to figure out which stream/pad can be re-used. They have the most information and can make the most informed decision. Trying to handle this from the outside is a "best effort that won't always work".

Shall we close this bug or rename it to add this feature in adaptivedemux ?
Comment 8 Seungha Yang 2018-05-10 14:07:16 UTC
(In reply to Edward Hervey from comment #7)
> It might not be *that* much change in adaptivedemux.
> 
> In general I think it should really be up to "stream providers" (demuxer,
> adaptive demuxers,...) to figure out which stream/pad can be re-used. They
> have the most information and can make the most informed decision. Trying to
> handle this from the outside is a "best effort that won't always work".
> 
> Shall we close this bug or rename it to add this feature in adaptivedemux ?

OK. let's drop this urisourcebin patch :) I prefer to rename btw.
Comment 9 Edward Hervey 2018-05-10 14:10:21 UTC
Renamed title. Of course this would only be in streams-aware context (so we don't break legacy usage)
Comment 10 Seungha Yang 2018-05-10 14:35:40 UTC
oh... I already proposed this reusing approach at Bug #777213. This bug seems to duplication of it.

Can I follow up this discussion at Bug #777213 ? (and close this bug)
Comment 11 Edward Hervey 2018-05-11 05:12:37 UTC
Well spotted :)

Should the title of Bug #777213 be renamed (to be more generic) ?

Also this bug depends on Bug #775132, should #777213 also depend on that ?

*** This bug has been marked as a duplicate of bug 777213 ***
Comment 12 Seungha Yang 2018-05-11 06:26:40 UTC
Bug #775132 is also block of #Bug #777213.
I changed the name to be more generic.