gst_element_seek() is failing !!
Wim Taymans
wim.taymans at gmail.com
Fri Apr 29 07:03:33 PDT 2011
On 04/29/2011 03:10 PM, satish pattar wrote:
> 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.
Check the type of the cur_pos variable and also the printf format
specifiers, they
are likely wrong.
Wim
>
> 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
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list