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 783257 - gst-discoverer: use state changes instead of ASYNC_DONE.
gst-discoverer: use state changes instead of ASYNC_DONE.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-31 01:31 UTC by Mathieu Duponchelle
Modified: 2017-05-31 03:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-discoverer: use state changes instead of ASYNC_DONE. (9.11 KB, patch)
2017-05-31 01:31 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2017-05-31 01:31:35 UTC
And monitor no_more_pads.

With live sources such as rtsp, uridecodebin only creates its
child decodebins between PAUSED and PLAYING.

This means that the ASYNC_DONE it posts when getting NO_PREROLL
in its change_state method gets immediately propagated by the
GstBin parent class, as opposed to a situation where a
decodebin has been added to it already, and has posted ASYNC_START.

The proposed solution, instead of simply waiting for ASYNC_DONE,
and finishing prematurely in that case, waits for three conditions
to be true:

* the uridecodebin needs to have emitted no_more_pads
* its current state must be PAUSED if not live, PLAYING otherwise
* There must be no "pending subtitle pads", ie pads where we haven't
  received tags yet.

All these conditions are checked in the message handler, as we
post custom messages on it when we get subtitle tags or no_more_pads.
Comment 1 Mathieu Duponchelle 2017-05-31 01:31:40 UTC
Created attachment 352913 [details] [review]
gst-discoverer: use state changes instead of ASYNC_DONE.
Comment 2 Mathieu Duponchelle 2017-05-31 01:33:15 UTC
The exact problem this solves was mentioned by Vivia in
https://bugzilla.gnome.org/show_bug.cgi?id=754178#c15 ,

it can be reproduced by running:

ninja-build && gst-discoverer-1.0 -v
"rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov"
  
Currently, this returns very fast, and we don't get any discovery
information.

After fixing https://bugzilla.gnome.org/show_bug.cgi?id=783255 and https://bugzilla.gnome.org/show_bug.cgi?id=783256, I made sure that the discoverer validate tests ran forever both in master and with that patch:

gst-validate-launcher --mute -t 'validate.*.media_check' --forever
Comment 3 Mathieu Duponchelle 2017-05-31 03:10:58 UTC
Attachment 352913 [details] pushed as 5d6b3b6 - gst-discoverer: use state changes instead of ASYNC_DONE.