gst_element_seek() is failing !!
satish pattar
satish.pattar at gmail.com
Fri Apr 29 06:10:28 PDT 2011
Hello All,
I am trying play a mp3 from constructing a pipeline using an application. It
works fine as expected on my desktop. when I cross compile for ARM v7 , the
seek is not happening.
I am constructing pipeline using filesrc ! decodebin2 ! autoaudiosink
my code snippet for seek is like this..
---------------------------------------------------------------------------------------
if (!(gst_element_query_position (pipeline, &fmt, &cur_pos)))
printf("[player] : gst_element_query_position failed \n");
printf("current position before seek = %u\n", cur_pos);
printf("GST_SECOND = %u\n", GST_SECOND);
double new_pos_sec = cur_pos * (1.0 / GST_SECOND) + 10; // seek for 10 sec
gint64 new_pos = new_pos_sec * GST_SECOND ;
if(!(gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
GST_SEEK_TYPE_SET,
new_pos , GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)))
printf("[player] Seek failed!! \n");
--------------------------------------------------------------------------------
output is :
current position before seek = 0
GST_SECOND = 0
[player] Seek failed!!
---------------------------------------------------------
What could be the reason for GST_SECOND = 0 , on my desktop I am getting
this value as 1000000000 & seek is happening as expected.
--
Thanks & Regards,
Satish Pattar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110429/cec7d560/attachment.htm>
More information about the gstreamer-devel
mailing list