[gst-devel] Ogg and GStreamer

Ronald Bultje rbultje at ronald.bitfreak.net
Wed Jul 30 06:45:06 CEST 2003


Hi Benjamin,

On Wed, 2003-07-30 at 15:23, in7y118 at public.uni-hamburg.de wrote:
> So, what is the problem? The problem is the type of additional information that 
> is put into the page headers. Ogg requires an "absolute granule position", 
> which corresponds to a format that GStreamer calls "frame". It is media 
> specific and up to the encoded packets to define. And ogg saves for each packet 
> the number of frames _including_ the packet. Ogg uses this instead of 
> timestamps. Now I am trying to put/get this stuff into/from GstBuffers.
> The obvious idea is to require that all streams that get muxed into ogg need to 
> be framed so that you have 1 packet per buffer. There is one problem though: 
> When you get a GstBuffer, you have no idea what the frame offset is _including_ 
> the frame. buffer->offset is the frame offset _excluding_ the buffer.
> So there are two options now:
> - include a frames field in GstBuffer, so that the frame offset can be 
> computed. (That's what I vote for)
> - wait for the next buffer, and use the offset field of that buffer as 
> the "absolute granule position" in the ogg stream.

(2) is evil. (1) could be used, but doesn't GST_BUFFER_DURATION(buf)
suffice here? It's the actual reason why I added it... And well, not all
plugins use it or fill it in perfectly, but it works, mostly.

If GST_BUFFER_DURATION(buf) isn't good enough, could you please explain
what more it should do? We could then remove GST_BUFFER_DURATION() in
favour of something else. We shouldn't add something, I think, they look
too much alike...

Ronald

-- 
Ronald Bultje <rbultje at ronald.bitfreak.net>





More information about the gstreamer-devel mailing list