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 701813 - Reverse playback not working with videotestsrc
Reverse playback not working with videotestsrc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal major
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 701391
 
 
Reported: 2013-06-07 20:42 UTC by Eloi BAIL
Modified: 2013-10-08 19:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test file (2.65 KB, text/x-csrc)
2013-06-07 20:42 UTC, Eloi BAIL
  Details
Add a testsuite to check videotestsrc in reverse playback (2.75 KB, patch)
2013-06-07 21:04 UTC, Thibault Saunier
committed Details | Review
videotestsrc: implement reverse playback (2.77 KB, patch)
2013-10-07 20:21 UTC, Thiago Sousa Santos
none Details | Review
videotestsrc: implement reverse playback (3.14 KB, patch)
2013-10-08 02:59 UTC, Thiago Sousa Santos
none Details | Review
videotestsrc: implement reverse playback (2.78 KB, patch)
2013-10-08 03:12 UTC, Thiago Sousa Santos
committed Details | Review

Description Eloi BAIL 2013-06-07 20:42:25 UTC
Created attachment 246282 [details]
Test file

Hi,

reverse playback is not working with videotestsrc :
- Reproduced on 0.10 SDK and 1.0 HEAD
- Working fine with audiotestsrc

audiotestsrc and videotestsrc are both used for gap on Gstreamer Editing Services. So with this issue not reverse playback can be done on timeline with gaps.


In attachement a simple program showing the issue on videotestsrc and showing that it is working fine on videotestsrc.

For 1.0, you will have to change  

if (!gst_element_query_position (GST_ELEMENT (pipeline), &format, &position)) {

to

if (!gst_element_query_position (GST_ELEMENT (pipeline), format, &position)) {
Comment 1 Thibault Saunier 2013-06-07 21:04:51 UTC
Created attachment 246283 [details] [review]
Add a testsuite to check videotestsrc in reverse playback
Comment 2 Thiago Sousa Santos 2013-10-07 20:21:38 UTC
Created attachment 256673 [details] [review]
videotestsrc: implement reverse playback

Would you mind testing this in GES's scenarios?
Comment 3 Nicolas Dufresne (ndufresne) 2013-10-08 02:09:33 UTC
(In reply to comment #2)
> Created an attachment (id=256673) [details] [review]
> videotestsrc: implement reverse playback
> 
> Would you mind testing this in GES's scenarios?

I've tried it with playback-test, but with no success:

./playback-test 1 "videotestsrc num-buffers=1000 ! xvimagesink"
Comment 4 Thiago Sousa Santos 2013-10-08 02:59:09 UTC
Created attachment 256678 [details] [review]
videotestsrc: implement reverse playback

Updated patch, had forgotten to update the duration of the buffers
Comment 5 Thiago Sousa Santos 2013-10-08 03:12:40 UTC
Created attachment 256679 [details] [review]
videotestsrc: implement reverse playback

Sorry, added too much to the last patch, try this one.
Comment 6 Sebastian Dröge (slomo) 2013-10-08 10:23:39 UTC
Comment on attachment 246283 [details] [review]
Add a testsuite to check videotestsrc in reverse playback

Maybe check timestamps, durations and position query too? Otherwise of course looks good
Comment 7 Nicolas Dufresne (ndufresne) 2013-10-08 13:35:44 UTC
(In reply to comment #6)
> (From update of attachment 246283 [details] [review])
> Maybe check timestamps, durations and position query too? Otherwise of course
> looks good

Looks rather small and safe, can we merge in 1.2 ?
Comment 8 Nicolas Dufresne (ndufresne) 2013-10-08 13:40:26 UTC
commit 866f132821086359c699f0058b73b4e12e1dc2f6
Author: Thiago Santos <ts.santos@partner.samsung.com>
Date:   Tue Oct 8 00:08:34 2013 -0300

    videotestsrc: implement reverse playback
    
    Decrement the n_frames counter when doing reverse playback to
    have timestamps and offsets reducing instead of increasing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701813
Comment 9 Nicolas Dufresne (ndufresne) 2013-10-08 13:46:30 UTC
FYI I've created bug #709646 for the query duration enhancement when num-buffers is set.
Comment 10 Thiago Sousa Santos 2013-10-08 14:22:49 UTC
Also pushed the tests. I think it makes sense to backport to 1.2. I can do it after dealing with #709646