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 760477 - playbin: caps intersection autoplugs too early and stream stops
playbin: caps intersection autoplugs too early and stream stops
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.7.1
Other Linux
: Normal major
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 760590
 
 
Reported: 2016-01-11 16:16 UTC by christophe vr
Modified: 2016-01-20 14:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-launch-debug-log (9.06 KB, text/plain)
2016-01-11 16:16 UTC, christophe vr
  Details
Just before the commit it rins fine log (112.85 KB, text/plain)
2016-01-11 16:28 UTC, christophe vr
  Details
reply needinfo (413.67 KB, text/plain)
2016-01-11 16:37 UTC, christophe vr
  Details
Stream stops debug *3 (34.93 KB, text/plain)
2016-01-11 17:05 UTC, christophe vr
  Details
Extra log general *3 some 6 like asked (482.66 KB, application/x-bzip)
2016-01-11 17:24 UTC, christophe vr
  Details
Here a full log stream ok before commit (877.90 KB, application/x-bzip)
2016-01-11 18:09 UTC, christophe vr
  Details
Stream stops debug (480.86 KB, application/x-bzip)
2016-01-11 22:10 UTC, christophe vr
  Details
Dvbmediasink with ok playback.so (13.10 KB, text/plain)
2016-01-12 07:38 UTC, christophe vr
  Details
dvbmediasink playback.so not ok (10.40 KB, text/plain)
2016-01-12 07:43 UTC, christophe vr
  Details
dvbmediasink log playback.so still not ok (9.89 KB, text/plain)
2016-01-12 08:18 UTC, christophe vr
  Details
Full debug log with patches (495.57 KB, application/x-bzip)
2016-01-12 14:12 UTC, christophe vr
  Details
playbin: use subset check instead of intersect (2.23 KB, patch)
2016-01-12 14:34 UTC, Thiago Sousa Santos
committed Details | Review
Log ok after patch from application and relevant dvbmedisinks (54.32 KB, text/plain)
2016-01-12 15:08 UTC, christophe vr
  Details

Description christophe vr 2016-01-11 16:16:59 UTC
Created attachment 318761 [details]
gst-launch-debug-log

Since gst-plugins-base commit :

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=844aa3e6a954e76b68f0f0e6e5d829047b2d9f68

Some streams starts playing and stop after a while. example stream :

http://wildhitz.rr.kpnstreaming.nl/b2b/vod/wildhitz/mp4s/Tech_N9ne_-_Strangeulation_Cypher/index.ism/index.m3u

This on stb linux with openpli-50 or 40.

included gst-launch log.
Comment 1 Sebastian Dröge (slomo) 2016-01-11 16:22:08 UTC
The debug log is not very useful, you need to enable more debug categories. As this is a general stream error you have to enable everything related to data flow and pads, and as this is related to playbin somehow additionally enable playbin:6,decodebin:6,uridecodebin:6.
Comment 2 christophe vr 2016-01-11 16:28:42 UTC
Created attachment 318764 [details]
Just before the commit it rins fine log

Just before the commit or better with
gst-plugins-base commit :

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=c119715e252a0ad85878fa438a7e2c81706dd2d8

It runned fine.
Comment 3 christophe vr 2016-01-11 16:37:20 UTC
Created attachment 318766 [details]
reply needinfo

here log with more debug untill freeze 

--gst-debug=dvbaudiosink:4,dvbvideosink:4,playbin:6,decodebin:6,uridecodebin:6,hls:5
Comment 4 Sebastian Dröge (slomo) 2016-01-11 16:50:10 UTC
You forgot all the data flow related things: GST_PADS:6,GST_SCHEDULING:6 at least.
Comment 5 Sebastian Dröge (slomo) 2016-01-11 16:51:38 UTC
Also having *:3 first would be useful to see where the error happens.
Comment 6 christophe vr 2016-01-11 17:05:49 UTC
Created attachment 318768 [details]
Stream stops debug *3

With debug 3
Comment 7 Sebastian Dröge (slomo) 2016-01-11 17:13:05 UTC
I meant all of those together:

*:3,GST_PADS:6,GST_SCHEDULING:6,playbin:6,decodebin:6,uridecodebin:6
Comment 8 christophe vr 2016-01-11 17:24:09 UTC
Created attachment 318787 [details]
Extra log general *3 some 6 like asked

I compressed the file it was to big as txt
Comment 9 Sebastian Dröge (slomo) 2016-01-11 17:28:57 UTC
That's maybe https://bugzilla.gnome.org/show_bug.cgi?id=758212 but I can't know for sure without more debug output. Please try the patches there
Comment 10 christophe vr 2016-01-11 18:09:55 UTC
Created attachment 318811 [details]
Here a full log stream ok before commit

Here I just rebuild the full gstreamer all on head except the gst-plugins-base on last working commit :

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=c119715e252a0ad85878fa438a7e2c81706dd2d8

Ok the stb suffers a bit from the to heavy debug. Trace is really to cpu intensif for a stb. But it worked a bit. What a well can tell is that with that media (and this goes up for half media which needs top be streamed) We first start with a lower resolution up to receiving an updated cap for resolution. It's when the new resolution or right resolution is applied it stops. after last good working commit.

Ok I can try with the bug You mentioned above but now You also have a full log to compare.
Comment 11 Sebastian Dröge (slomo) 2016-01-11 20:47:38 UTC
I need a full debug log not when it was ok but with the bug you observe :)
Comment 12 christophe vr 2016-01-11 22:10:36 UTC
Created attachment 318827 [details]
Stream stops debug

Here again the full log gstreamer is full up to date 
gst-plugins-base at commit 2f7cd8608ac9b680aae4f5312c9cd003aafe805e

stream stopped playing after a couple off seconds.

log made with :

--gst-debug=*:3,GST_PADS:6,GST_SCHEDULING:6,playbin:6,decodebin:6,uridecodebin:6
Comment 13 christophe vr 2016-01-12 07:38:57 UTC
Created attachment 318839 [details]
Dvbmediasink with ok playback.so

This to see what happens with caps.

Here can be seen the caps sended with the right resolution. It is accepted and applied all runs fine.
Comment 14 Sebastian Dröge (slomo) 2016-01-12 07:41:10 UTC
Did you also try the patches I was mentioning before. Maybe we can stop wasting both our times here if it's indeed the same bug and things just work after applying the patches.
Comment 15 christophe vr 2016-01-12 07:43:38 UTC
Created attachment 318840 [details]
dvbmediasink playback.so not ok

Here can clearly be seen that the cap is not accepted and instead off a caps event an error is issued. Result media stops.

the same thing happens also with :

uri=http://live.rpctv.com/rpctv/tm.smil/playlist.m3u8
Comment 16 Sebastian Dröge (slomo) 2016-01-12 08:03:15 UTC
Is that with the patches I mentioned?
Comment 17 christophe vr 2016-01-12 08:18:06 UTC
Created attachment 318842 [details]
dvbmediasink log playback.so still not ok

Here the one with patches You mentionned. Caps are still not accepted

The patches applied are

Revert "playbin: only add the template caps when the result
Subject: [PATCH] playbin: Only append non-raw and sysmem pad template caps to
Comment 18 christophe vr 2016-01-12 08:41:47 UTC
Perhaps adding something just opposed like now.

If video caps raw then query and it will be fine for totem and all pc's devices using video-raw.

For all other case just like before accept-cap. All devices who are working with own codecs will run fine also.
Comment 19 Sebastian Dröge (slomo) 2016-01-12 09:14:37 UTC
Thanks, I'll take a look at the log later :)
Comment 20 Thiago Sousa Santos 2016-01-12 12:47:21 UTC
Those 2 last logs only contain GST_DEBUG=3 which is rarely enough to debug something. Please provide at least "-gst-debug=*:3,GST_PADS:6,GST_SCHEDULING:6,playbin:6,decodebin:6,uridecodebin:6"
Comment 21 Thiago Sousa Santos 2016-01-12 13:35:48 UTC
Maybe this is a gst_caps_can_intersect vs gst_caps_is_subset thing?

A log containing also GST_CAPS:6 could make it a bit easier to see what is happening
Comment 22 christophe vr 2016-01-12 13:55:03 UTC
2 last two logs are complementary to the 
First complete ones.

1) before the regression commit:(full debug)
2) after regression commit.(full debug)

3 complementary to one
4 complementary to 2.

The seconds two are to show exactly what happens and that simple the caps are not accepted. And I'm so what shure You may not launch a caps-query there. And that's cause we are using own codecs. This problem You will have for those streams for all devices using own codecs.

What is done in

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=844aa3e6a954e76b68f0f0e6e5d829047b2d9f68

Is only applicable for devices using audio/video raw obtained by gstreamer codecs convertion.

I now just wil also make a full log with the patches You told to apply and which do not work just same error always.

Then post it when made.
Comment 23 Thiago Sousa Santos 2016-01-12 14:12:07 UTC
Just adding some context to this change:

accept-caps query are shallow checks, they only verify that the next element in the pipeline branch accepts that caps. So if you have some other element further downstream it will be ignored by accept-caps queries. Using a caps query makes sure that it will consider the whole pipeline branch.

For example, if you have:

capsfilter caps=ANY ! videosink

an accept-caps query in capsfilter's sink pad will always accept any type of caps. In this case what we really want is to know what videosink actually can support so a caps query is needed.
Comment 24 christophe vr 2016-01-12 14:12:15 UTC
Created attachment 318873 [details]
Full debug log with patches

Here the full debug with the proposed patches.

Does not work.
Comment 25 christophe vr 2016-01-12 14:21:42 UTC
No we are working with own codecs then You may not query all the elements, there are no further elements in our case. So the query may only be done when incase you are using gstreamers decoding elements.

The logs just prove's that. Before it worked perfect and the cap is in this case only and only for the videosink (customed sink required by dvbapi) . And has nothing to do further. That's why You must accept.

The patch is only valid for devices who are using gstreamer codecs and convertions . We can't to that anyway for video even if they would implement (which is not aloowed by stb dvbapi ??? they tell) the cpu power would not be enough to do the convertions of HD video.
Comment 26 Thiago Sousa Santos 2016-01-12 14:34:16 UTC
Created attachment 318877 [details] [review]
playbin: use subset check instead of intersect

Can you check whether this patch improves the situation?
Comment 27 christophe vr 2016-01-12 14:48:55 UTC
It's now building.

But to mention we are not using audiosink or videosink but a customized own sink.

dvbaudiosink and dvbvideosink.
Comment 28 christophe vr 2016-01-12 14:53:23 UTC
actually just a question. since we do not use the videosink or audiosink , could we trie to call out sinks videsink or audiosink ? gues not.
Comment 29 christophe vr 2016-01-12 15:08:03 UTC
Created attachment 318883 [details]
Log ok after patch from application and relevant dvbmedisinks

With the last patch it does work back ok.

I included a log from run with application.

There You see only our happenings into the customized sink's and the application standard debug.

If You wish I can also make a full debug with gst-launch.
Comment 30 christophe vr 2016-01-12 15:10:08 UTC
I mean it works ok with the last patch off Thiago.

https://bugzilla.gnome.org/attachment.cgi?id=318877&action=diff
Comment 31 Thiago Sousa Santos 2016-01-12 15:17:07 UTC
(In reply to christophe vr from comment #28)
> actually just a question. since we do not use the videosink or audiosink ,
> could we trie to call out sinks videsink or audiosink ? gues not.

I don't understand what you mean by "try to call out"

Anyway. playbin is made to work with custom sinks as well and it has been used for that already.
Comment 32 christophe vr 2016-01-12 15:34:25 UTC
I met call them , but indeed normally that should not be the problem since like You said playbin is used by us.
Comment 33 christophe vr 2016-01-12 16:22:46 UTC
Hello I think You can push the patch :

https://bugzilla.gnome.org/attachment.cgi?id=318877&action=diff

It work really back great.

Thanks :)

Can I mark bug as solved if its commited ?
Comment 34 Thiago Sousa Santos 2016-01-12 18:42:42 UTC
Thanks for verifying it, we will mark it as resolved once the patch is merged. For now, we need to wait a bit to see if other people agree to this change.
Comment 35 Sebastian Dröge (slomo) 2016-01-13 06:25:45 UTC
Comment on attachment 318877 [details] [review]
playbin: use subset check instead of intersect

I think the patch makes sense, yes.
Comment 36 Sebastian Dröge (slomo) 2016-01-13 06:26:40 UTC
Comment on attachment 318877 [details] [review]
playbin: use subset check instead of intersect

OTOH this patch will break things if autoplug-continue is called with unfixed caps. IIRC there are code paths that do that (you can't call is_subsect() with unfixed caps as first argument).
Comment 37 Thiago Sousa Santos 2016-01-13 12:31:04 UTC
(In reply to Sebastian Dröge (slomo) from comment #36)
> Comment on attachment 318877 [details] [review] [review]
> playbin: use subset check instead of intersect
> 
> OTOH this patch will break things if autoplug-continue is called with
> unfixed caps. IIRC there are code paths that do that (you can't call
> is_subsect() with unfixed caps as first argument).

Not disagreeing to this but accept-caps queries also require fixed caps.
Comment 38 Sebastian Dröge (slomo) 2016-01-13 13:26:53 UTC
Ah right, I think I changed the code at some point to only ask for fixed caps. Let's try to go with this then for now. It's also required for all elements that use the INTERSECT flag for the accept-caps query.
Comment 39 Sebastian Dröge (slomo) 2016-01-13 13:27:25 UTC
Maybe we should add some kind of recursive accept-caps query ;)
Comment 40 christophe vr 2016-01-13 13:30:53 UTC
I'm not an expert but in our situation for the videosink we are limited to fixed caps only. The audiosink not.
Comment 41 christophe vr 2016-01-13 17:14:06 UTC
Hello it's not that I want to rush up , but I have to do it.

We are currently in application development using gstreamer. The current base image of stb is still using the very old gstreamer-0.1.xx

And we come to a point now with a full new image named pli50. It does have the so what last lib's and projects avbl. Does use gcc-5.xx quit up to date by use off libc and... The linux kernel is depended on the stb manufacturers since it also included the closed source drivers and acces to the protected codecs. One off our major problems is gstreamer. It's anyway needed for our customized dvbmediasink . But the change over from 0.1xx to 1.xx did caused in first place severe regression into media support. 

Ok we came to gst-1.4.5 that was the first version without severe regression and even a couple off nice benefits for us. All our code (especially the costumed mediasink's ) was adapted to that.

Then came 1.5.1 in general better but some new regressions in media support.

After 1.5.1 perhaps some new extra support was there , but in general stability and support it was a regression this up to and including 1.7.0 . Then with 1.7.1
It's a extreme high improvement again. and all versions above the tagged 1.7.1 where each time a serious improvement until the commit: 
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=844aa3e6a954e76b68f0f0e6e5d829047b2d9f68

It's like we jumped again into darkness the result in media support is dropped again to even below the one using very old gst-0.1xx (which is modified with ton's off patches). 

Ok it's not easy and very tricky the caps issue but why commit for a improvement in totem and brake all other users by it ?
Comment 42 Sebastian Dröge (slomo) 2016-01-13 18:06:46 UTC
Don't forget that people here are helping you for free in their spare time, comments like this are not going to make it more likely that someone is going to care about your problems. If you want your priorities to be handled faster, you can always throw money at them or try to contribute yourself instead of complaining.

Obviously nobody did the change you mention above to break all other software than totem. Thanks for reporting that it broke something (we were not aware of that before) but calm down and try to be constructive.

Also that commit is not only fixing totem but also many other very common scenarios, the solution to this here is not going to be to randomly patch things but to try to understand why it fails and find a solution that solves all known cases instead of breaking other cases again and making your software work.
Comment 43 Thiago Sousa Santos 2016-01-13 18:34:11 UTC
commit 81c52aaa1695cd1d0ca9004aa668b9ed85db2da9
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Tue Jan 12 11:31:50 2016 -0300

    playbin: use subset check instead of intersect
    
    Elements usually require that all fields on their caps are present
    on the fixed caps they receive. Using intersection won't verify it,
    resort to using is_subset() checks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760477
Comment 44 christophe vr 2016-01-13 19:01:03 UTC
at Sebastian,
First I'm one the persons which are helping for free and only work for free. I really dislike all the persons who take profit from others work to make money of it.

at Thiago ,

Thanks for the solution :-)
Comment 45 Alexandre Mazari 2016-01-20 14:18:36 UTC
Hi,

Thanks for your time investigating and fixing this issue. AFAIK, it correct totem behavior in Rawhide.

As it stands rawhide gstreamer1-plugins-base makes totem basically useless. Kinda sad for the workstation product. 
Is a point release containing the subset check work planned before f24 release, for packagers' sake? Should they backport the patch in the mean time>

Thanks for your involvement !
Comment 46 Tim-Philipp Müller 2016-01-20 14:31:21 UTC
Alexandre, yes, bugs like this are always unfortunate. 1.7.1 was a very early development release, and my understanding of rawhide is that its purpose is exactly to catch these kind of issues. 1.7.2 is planned for the near future, and we expect a stable 1.8 will be out long before F24. You'll have to take patching things up with the rawhide packagers.