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 734256 - Seeking doesn't work in Python
Seeking doesn't work in Python
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-05 00:18 UTC by Isaac Smith
Modified: 2014-08-05 01:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple example, calls seek_simple on pipeline (1.85 KB, text/x-python)
2014-08-05 00:18 UTC, Isaac Smith
Details
Complex bug example, sends seek event to uridecodebin's src pad (2.13 KB, text/x-python)
2014-08-05 00:19 UTC, Isaac Smith
Details
Fixed test-case (2.20 KB, text/x-python)
2014-08-05 01:02 UTC, Jan Schmidt
Details

Description Isaac Smith 2014-08-05 00:18:40 UTC
Created attachment 282488 [details]
Simple example, calls seek_simple on pipeline

Seeking on an element or pipeline does not work (for me, at least) in Python. Code examples (ported from C) that should work fine simply hang on the last frame. I've attached a couple of examples, change the URI variable to the URI of a video file to test.
Comment 1 Isaac Smith 2014-08-05 00:19:29 UTC
Created attachment 282489 [details]
Complex bug example, sends seek event to uridecodebin's src pad
Comment 2 Isaac Smith 2014-08-05 00:40:10 UTC
Turns out I'm an idiot, the uridecodebin unlinks itself and removes most of its elements before I caught the EOS. Closing bug...
Comment 3 Jan Schmidt 2014-08-05 01:02:13 UTC
Created attachment 282490 [details]
Fixed test-case

The basic problem is that you can't do a flushing seek from an event probe, as the pipeline can't stop streaming until the event probe returns. Equally, you can't do a non-flushing seek once EOS has been sent, as pads will ignore all subsequent data (not sure why we made it that way, maybe something we should change in the future).

The solution is to defer the flushing seek to the mainloop and drop the EOS event, as in this variant of the first test case.

Thanks for providing a good test case, by the way - helps a lot.