[gst-devel] How can I make a playbin2 to jump to the last video frame and display it?
wl2776
wl2776 at gmail.com
Sat Feb 27 17:07:23 CET 2010
Further studies have shown, that this doesn't work on all files. I tried avi
and mpeg-2 PS files.
I am still looking for reliable solution.
I am developing a medial player with GStreamer, in windows. My task is to
make it to jump to the end of file and display the last frame.
I use playbin2 with directdraw videosink.
wl2776 wrote:
>
> void gst_player::go_end()
> {
> if(m_player){
> gboolean rb;
> int attempts=0;
> do {
> 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);
> if(!rb) Sleep(100);
> }while(!rb || ++attempts>3);
>
> if(rb){
> gst_element_set_state(GST_ELEMENT(m_player),GST_STATE_PLAYING);
> }
> }
> }
>
> This makes the playbin2 to display the last frame.
> In all other cases, I've tried, it successfully positioned to the end of
> file, but didn't draw the last frame.
>
--
View this message in context: http://n4.nabble.com/How-can-I-make-a-playbin2-to-jump-to-the-last-video-frame-and-display-it-tp1567156p1572038.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list