[gst-devel] Framestepping backwards in MPEG2 files

wl2776 wl2776 at gmail.com
Fri May 14 17:03:24 CEST 2010


Is it complete?
My pipeline doesn't step one frame backwards.

m_player is an instance of the playbin2. It has loaded the MPEG2 Program
Stream.
Then, the pipeline was paused before calling step_left

void gst_player::step_left(void)
{GstFormat fmt=GST_FORMAT_TIME;
 
  if(m_player){
    if(m_current_position>=40*GST_MSECOND){
      gboolean rb=gst_element_seek(m_player,-1.0,GST_FORMAT_TIME,
                                         
(GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE),
                                         
GST_SEEK_TYPE_SET,m_current_position,GST_SEEK_TYPE_SET,m_stream_duration);
      GST_DEBUG("seek backwards: %d",rb);
      GstEvent *event = gst_event_new_step (GST_FORMAT_BUFFERS, 1, 1.0,
TRUE, FALSE);
      rb=gst_element_send_event (m_player, event);
      GST_DEBUG("send step event: %d",rb);
    }
  }
}


Both _seek and _send_event(_new_step) return TRUE.
However, I don't see any changes in picture on the screen. 
After several calls to step_left() I get the EOS.
What am I doing wrong?
-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Framestepping-backwards-in-MPEG2-files-tp2216718p2216718.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list