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 679378 - [basesink] Changing playback rate via step events does not work
[basesink] Changing playback rate via step events does not work
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.36
Other All
: Normal normal
: 0.10.37
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-04 08:34 UTC by Xavi Artigas
Modified: 2012-10-06 11:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Basic tutorial 13 from the GStreamer SDK (3.44 KB, text/plain)
2012-07-04 08:34 UTC, Xavi Artigas
Details
Debug log (38.75 KB, application/gzip)
2012-07-17 11:59 UTC, Xavi Artigas
Details

Description Xavi Artigas 2012-07-04 08:34:27 UTC
Created attachment 217986 [details]
Basic tutorial 13 from the GStreamer SDK

The attached code exercises multiple trick modes.
For convenience, step events are used to change the playback rate.
The first rate change works fine, however, further changes seem to be ignored.
E.g., moving from 1x to 2x works, but then you are stuck at 2x.

Reverse playback does not work either, but that's filed as a separate bug https://bugzilla.gnome.org/show_bug.cgi?id=679250
Comment 1 Wim Taymans 2012-07-11 10:07:53 UTC
There seems to be a bug with the flushing of the current video frame when a flushing step with amount = 0 is done, looking into it now.
Comment 2 Wim Taymans 2012-07-11 10:44:37 UTC
commit 48dbfd530a06c7c77af3ae4a67e6e5b1d7b35fb8
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Wed Jul 11 12:37:05 2012 +0200

    basesink: handle step end correctly
    
    when we have a new step event with a -1 amount, make sure that we follow the
    regular code path so that the stop_end handler is called as usual. This takes
    care of flushing the buffer in case of a flushing step and also posts a step end
    message.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=679378
Comment 3 Wim Taymans 2012-07-12 14:12:56 UTC
The problem now is that changing the playback speed with a -1 step doesn't work. The -1 step is to stop the currently active step operation and resume normal playback.
Comment 4 Wim Taymans 2012-07-13 07:34:39 UTC
So, either change the playback speed with a seek event or do stepping with small increments. Also flushing steps are most likely not what you want.
Comment 5 Xavi Artigas 2012-07-17 11:59:24 UTC
Created attachment 219011 [details]
Debug log

Obtained with GST_DEBUG=2,basesink:5 (a single non-flushing step with amount 0, around second 4)
Comment 6 Xavi Artigas 2012-07-17 12:00:01 UTC
With these changes the Step Events seem to be completely ignored. They do not change the playback rate not even once, no matter if the amount is set to 0 or -1, or if the Step is flushing or not.
Debug log attached.
Comment 7 Wim Taymans 2012-07-17 12:43:07 UTC
(In reply to comment #6)
> With these changes the Step Events seem to be completely ignored. They do not
> change the playback rate not even once, no matter if the amount is set to 0 or
> -1, or if the Step is flushing or not.

It does change the playback rate but since the duration of the step is 0 (the same as -1) the step completes immediately and then it continues normal playback.

> Debug log attached.
Comment 8 Sebastian Dröge (slomo) 2012-07-18 07:56:31 UTC
So, the real bug here is fixed and everything else is just misunderstanding of how the step events work. Nonetheless it makes sense to change the meaning of -1 as amount in 0.11 to mean "step forever". Currently 0 and -1 have the same meaning.
Comment 9 Wim Taymans 2012-07-19 10:59:39 UTC
Untested:

commit 5360ba56f7fa552865a42ed12845e748663ae6db
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Wed Jul 18 11:17:23 2012 +0200

    basesink: handle -1 step amounts
    
    Define a 0 and -1 step amount. They used to almost do the same thing but now, 0
    cancels/stops the current step and -1 keeps on stepping until the end of the
    segment.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=679378