gst_element_seek() is failing !!

satish pattar satish.pattar at gmail.com
Mon May 2 08:17:14 PDT 2011


Hello Wim/ Stephan,

I was using incorrect format specifier , then I used the appropriate
format specifier for printing gint64 , it printed correct value for
GST_SECOND, however my current position i.e., cur_pos is still showing
zero. Also I observed that call to "gst_element_query_duration" is
always failing !!. This could be the reason for gst_element_seek()
getting failed.

I have no clue why it is failing. I checked the gst version on both my
desktop as well as my ARM target & both are same (0.10.28).

I wonder why it would be failing only in the target.

Your inputs are appreciated.

Thanks & Regards
Satish P.


On 4/29/11, Wim Taymans <wim.taymans at gmail.com> wrote:
> 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
>
>


-- 
Thanks & Regards,

Satish Pattar


More information about the gstreamer-devel mailing list