[gst-devel] base format for seeking, time vs. bytes

Tim Müller t.i.m at zen.co.uk
Tue Nov 29 01:51:04 CET 2005

On Tue, 2005-11-29 at 10:14 +0100, Stefan Kost wrote:

> The question is how get we get this implemented? WHat do you think of
> time vs. bytes as the base unit and so on. Can we do it in 0.10 or does
> it has to wait for 0.11?

I'd really like to have TIME-based seeking for GstBaseSrc/GstPushSrc as
well (in 0.10).

An easy improvement that would cover at least some more cases would be
to modify seeking in base source to do something like this:

  if (seek_format != GST_FORMAT_BYTES) {
    if (!gst_pad_convert_from_seek_format_to_bytes (...))
      return FALSE;

(and conversion from default format to bytes should be handled by the
conversion as well instead of assuming default format == bytes for all

Other than that, why not just add another vfunc to GstBaseSrcClass, e.g.

  gint64   (*seek_event) (GstBaseSrc * basesrc, GstEvent * seek_event)

where a return value of -1 means 'failed/not handled' and any other
return value denotes the new byte offset for the base source to use? Or
just use the existing 'event' vfunc and skip gst_base_src_do_seek() when
the subclass has already returned TRUE in the 'event' vfunc? 


More information about the gstreamer-devel mailing list