seek before playback
b12
bradley.p.twelves at lmco.com
Wed Jun 19 09:43:18 PDT 2013
Hey everyone, I recently found this mailing list and am excited to get
involved. I am new to gstreamer, have a big project in front of me and hope
to glean some experience from everyone. I read through the manual and
searched around before deciding to post a new topic.
I am attempting to begin playback of a prerecorded file from some midpoint
in the file.
Here is my specs:
/Format: mpegts (mpeg-2TS)
Stream: h264
GStreamer 0.10.36
Linux
c/c++/
Basically here is how my pipeline is setup:
filesrc-> queue->flutsdemux-> ffdec_h264->xvimagesink
So far I have attempted to do this by:
1)Build my pipeline
2)Set state to PLAYING
3)On the GST_MESSAGE_STATE_CHANGED to PLAYING I attempt my seek.
Problem I find with this solution is that 9 times out of 10 the seek fails
(dont know why). The one time out of 10 that it does work I get a ton (50 -
100) qos messages with very bad rendering then after about 5 seconds it
begins playback.
I understand that the bad rendering may be that I am seeking to a point
between i frames.
My pipline:
/gst_element_link_many(filesrc, queue, flutsdemux)
gst_element_link_many(ffdecoder, xvsink)
then on the pad-added of the demux signal i'm doing a pad_link to the
decoder. /
the seek:
/GstEvent *seekEvent;
seekEvent = gst_event_new_seek(1.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH |
GST_SEEK_FLAG_SKIP |
GST_SEEK_FLAG_KEY_UNIT, //I
have tried different variations of flags
GST_SEEK_TYPE_SET,
seekToTime,
GST_SEEK_TYPE_NONE,
GST_CLOCK_TIME_NONE);
gst_element_set_state(m_pipeline, GST_STATE_PAUSED);
if(!gst_element_send_event(m_pipeline, seekEvent))
{
Logger::warn("seek failed")
}
gst_element_set_state(m_pipeline, GST_STATE_PLAYING);/
Any help or direction anyone can provide would be great. If you want to
point out any misunderstanding I have at this point that would be greatly
appreciated also.
Sorry if this has already been covered.
Thanks in advance!
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/seek-before-playback-tp4660624.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list