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 776672 - urisourcebin: Reuse slot if new pad's caps is compatible with previous one
urisourcebin: Reuse slot if new pad's caps is compatible with previous one
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-01 09:41 UTC by Seungha Yang
Modified: 2017-01-11 08:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
urisourcebin: Reuse slot if new pad's caps is compatible with previous one (2.72 KB, patch)
2017-01-01 09:44 UTC, Seungha Yang
none Details | Review
log file (132.35 KB, application/gzip)
2017-01-01 11:24 UTC, Seungha Yang
  Details
1st period (1.18 MB, image/png)
2017-01-01 11:25 UTC, Seungha Yang
  Details
2nd period (1.15 MB, image/png)
2017-01-01 11:25 UTC, Seungha Yang
  Details
mpd file (2.65 KB, application/dash+xml)
2017-01-01 11:25 UTC, Seungha Yang
  Details

Description Seungha Yang 2017-01-01 09:41:10 UTC
Although values of caps field (e.g., rate, resolution, etc) might be slightly
different, reuse existing compatible slot, if new caps has same name and fields
with previous caps.
Comment 1 Seungha Yang 2017-01-01 09:44:59 UTC
Created attachment 342684 [details] [review]
urisourcebin: Reuse slot if new pad's caps is compatible with previous one
Comment 2 Seungha Yang 2017-01-01 09:52:18 UTC
When adaptivedemux is used, new pad (may be caused by period change) can have different value on caps. Note that caps fields are same.
In that case, urisourcebin exposes/removes srcpads. It seems to be unnecessary operation in my opinion.
Comment 3 Jan Schmidt 2017-01-01 10:59:12 UTC
Can you paste some examples?
Comment 4 Seungha Yang 2017-01-01 11:24:14 UTC
(In reply to Jan Schmidt from comment #3)
> Can you paste some examples?

It tested on my private mpd content. Although I'd like to share the content, it's restricted due to my company's policy, sorry.
So, I can share log, dot graph, and just mpd.
Comment 5 Seungha Yang 2017-01-01 11:24:50 UTC
Created attachment 342687 [details]
log file
Comment 6 Seungha Yang 2017-01-01 11:25:16 UTC
Created attachment 342688 [details]
1st period
Comment 7 Seungha Yang 2017-01-01 11:25:35 UTC
Created attachment 342689 [details]
2nd period
Comment 8 Seungha Yang 2017-01-01 11:25:50 UTC
Created attachment 342690 [details]
mpd file
Comment 9 Seungha Yang 2017-01-01 11:27:34 UTC
In attached mpd, the 2nd period's audioSamplingRate is different from 1st period's one.

So, urisourcebin exposed new srcpad, and new parsebin also configured.
Comment 10 Jan Schmidt 2017-01-01 12:03:12 UTC
Sorry - I just meant examples of the different caps that it should consider as compatible :)

In general, having the same caps name doesn't guarantee compatibility (for example both MPEG-PS system stream and MPEG video elementary stream have 'video/mpeg' caps), but urisourcebin could instead check if the existing pad can accept the new caps.
Comment 11 Seungha Yang 2017-01-01 23:11:49 UTC
(In reply to Jan Schmidt from comment #10)
Firstly, because link_pending_pad_to_output() is called with "pad-removed" or adaptivedemux's srcpad event probe, please note that what I intended modification is only applicable on adaptivedemux in current generic usecase :)

> In general, having the same caps name doesn't guarantee compatibility (for
> example both MPEG-PS system stream and MPEG video elementary stream have
> 'video/mpeg' caps), but urisourcebin could instead check if the existing pad
> can accept the new caps.

As an example, followings are compatible based on my intention, since mime-type, #field, and field names are same.
"audio/x-m4a, rate=(int)48000" and "audio/x-m4a, rate=(int)11025"

But below caps are not compatible, because although both have same mime-type, field configuration is different. Mostly, the first one is for DASH subtitle mp4, and the other is for actual video mp4 stream.
"video/quicktime" and "video/quicktime, width=(int)352, height=(int)288, framerate=(fraction)25/1"
Comment 12 Seungha Yang 2017-01-11 08:00:22 UTC
Hello Jan Schmidt
Please remove this issue. I'd like to solve this on bug #775132
by using GstStream API