[gst-devel] Seek doesn't work

Thomas Holzmann holzi1 at gmx.at
Sat Aug 18 10:19:59 CEST 2007


Tim Müller schrieb:
> On Fri, 2007-08-17 at 21:40 +0200, Thomas Holzmann wrote:
>
>   
>> I have a problem with gst_element_seek: It seems that the demux element 
>> (I've tried it with qt and avi) in decodebin cannot handle the seek 
>> command. In debug mode I get this message for the demuxer:
>>     
>
>   
>> gstavidemux.c:3243:gst_avi_demux_handle_seek:<avidemux0> unsupported 
>> format given, seek aborted.
>>
>> My pipeline is " filesrc ! decodebin ! ffmpegcolorspace ! appsink " and 
>> I've tried to seek with these commands:
>>
>> gst_element_seek(file_decode_, 1.0, GST_FORMAT_PERCENT,
>>                  GST_SEEK_FLAG_NONE, GST_SEEK_TYPE_SET, time,
>>                  GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)
>>
>> gst_element_seek_simple(file_decode_, GST_FORMAT_PERCENT,  
>> GST_SEEK_FLAG_NONE, time)
>>
>> Does someone know what my problem could be?
>>     
>
> Hardly any element supports seeks in GST_FORMAT_PERCENT.  You'll
> probably have more luck with GST_FORMAT_TIME. Do a duration query before
> the seek and scale that accordingly (gst_util_uint64_scale_int might
> come in handy for that).  Also, unless you're doing something fancy you
> probably want to use GST_SEEK_FLAG_FLUSH, possibly in combination with
> GST_SEEK_FLAG_KEY_UNIT if precision isn't particularly important.
>
>  Cheers
>   -Tim
>
>   
Thanks, now it works!

Thomas




More information about the gstreamer-devel mailing list