[Bug 675773] Reverse video playback does not work anymore

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jun 14 09:53:19 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=675773
  GStreamer | gst-plugins-base | 0.10.x

--- Comment #12 from Jan Schmidt <thaytan at mad.scientist.com> 2012-06-14 16:53:15 UTC ---
Looking further into this, there's no need to store events from the dropped
frame for later pushing. Whether in forward, or reverse mode, as soon as a
frame is either passed to drop_frame() or finish_frame() the events it holds
are pushed downstream.

Also, it seems that at least some formats do work with the current 0.10 code -
I'm able to play a divx/avi file in either direction OK.

Theora still has trouble though, I think mostly related to timestamp tracking.
In reverse mode, oggdemux no longer interpolates timestamps to ensure each
outgoing packet has one, and it's up to theoradec to calculate them. One
specific problem that causes is that keyframes don't necessarily have a
timestamp attached, but the base class assumes that they must and assumes a
timestamp of the start of the segment (usually 0) otherwise.

This is the relevant code in gst_video_decoder_prepare_finish_frame():
  } else {
    if (GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame)) {
      GST_WARNING_OBJECT (decoder, "sync point doesn't have timestamp");
      if (!GST_CLOCK_TIME_IS_VALID (priv->timestamp_offset)) {
        GST_WARNING_OBJECT (decoder,
            "No base timestamp.  Assuming frames start at segment start");
        priv->timestamp_offset = decoder->output_segment.start;
      }
    }
  }

I'm still trying to figure out where to begin cleaning this up. To be honest, I
don't understand why this stuff was committed to 0.10 in the state it's in.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list