[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 16:28:09 CET 2010
Yes!
I've done it!
To those, who's interested, my solution is
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-tp1567156p1571994.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list