[gst-devel] Please, help me with mpegpsdemux or/and mped2dec.

wl2776 wl2776 at gmail.com
Thu Mar 25 15:07:19 CET 2010



wl2776 wrote:
> 
> I am trying to implement the "Go end" command, which would position the
> player to the last frame.
> The problem is that that last frame is not displayed, neither in paused,
> nor in playing state. 
> 

Ok, seeking backwards from the end of file seems doing the job.

void gst_player::go_end()
{
  if(m_player){
    gboolean rb;
    rb=gst_element_seek(GST_ELEMENT(m_player),-1.0,
             GST_FORMAT_TIME,
             (GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE),
             GST_SEEK_TYPE_SET,0,GST_SEEK_TYPE_END,0);

    gst_element_set_state(GST_ELEMENT(m_player),GST_STATE_PAUSED);
  }
}

This displays the last frame in a movie. 

However, there's another problem. 
If I press play button, which triggers call 
gst_element_set_state(GST_ELEMENT(m_player),GST_STATE_PAUSED);
I see some frames which are before the latest displayed frame in a movie
file.
This, probably, caused by that the pipeline has prerolled some data for
playing backwards from the movie end. This is wrong for my case. How can I
flush the pipeline after seeking to the latest frame?
-- 
View this message in context: http://n4.nabble.com/Please-help-me-with-mpegpsdemux-or-and-mped2dec-tp1690268p1690685.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list