[gst-devel] ogg and friends

Benjamin Otte in7y118 at public.uni-hamburg.de
Sun May 23 07:37:03 CEST 2004

On Wed, 19 May 2004, Thomas Vander Stichele wrote:

> OK, so here's a mail trying to explain specifically what is going on and
> what we need to support in GStreamer so we can do ogg streaming (bear in
> mind, nobody is doing ogg/theora streaming yet).
I'll follow this up with an explanation of how GStreamer works, so you can
understand why neither David nor I think what you want to do is a good

When you throw some data in a format at GStreamer, data in this format
has some implicit properties, which have to be honoured by all elements
handling this data format or bad things will happen. These formats are
represented by caps.
There are different kinds of caps that are used for different purposes and
that have different kinds of implicit properties.

Let me give you some examples:
- raw
These are all the caps that can come out of a filesrc (or by extension, a
typefind element). Because GStreamer knows essentially nothing about them,
there are no implicit properties. This of course means that every element
handling them must be able to work with just a raw data stream. This
most of the time also means that all information about the data stream is
stored inside the data stream and has not yet been made available to
GStreamer. You require an element that handles this data stream to do
that. An example for this caps is application/ogg.
 - packetized
These caps describe data streams that are divided into chunks. Demuxers
put out caps like these. Here an implicit property of the stream is that
one buffer contains exactly 1 packet of data. (For video caps this mostly
means 1 picture/buffer) Some of these formats carry all info about the
format in their caps and therefore allow replugging inside GStreamer (raw
audio and raw video do), some still carry format information inside the
stream and don't allow to just replug (most notable are vorbis or theora -
I think dvd subtitles and their palettes are such a format, too).

Other caps may have other implicit properties. A normal decoding pipeline
takes a raw data stream and tries to transform (or decode) it into a very
specific format used by the output element. This not only requires
transforming the data but also providing other things like seekability.

Now writing an element that takes input from a given caps absolutely
requires honouring all its implicit properties or you're asking for
trouble, even if it's "just" autoplugging that breaks. So if you want to
provide an element that takes a raw caps like application/ogg you have to
work with it, raw as it is, because that is what you requested.

> - "Ogg Vorbis" and "Ogg Theora" or "Ogg A/V" are media mappings.
> Media mappings describe how codecs are encapsulated in the muxer, and
> can thus impose additional constraints on how the ogg muxer is to behave
> to implement this media mapping.
I believe we do not currently have a way to map media mappings into our
GStreamer model. Who knows (or should know) about the requirements of the
vorbis an Ogg A/V model?

More information about the gstreamer-devel mailing list