[gst-devel] addition of a buffer flag

Thomas Vander Stichele thomas at apestaart.org
Wed May 12 06:42:03 CEST 2004


Hi,

for streaming purposes, we need a way for the network elements to know
what part of the beginning of a data stream are to be considered
"headers" and what is the raw data.  This isn't necessary for every
format, but it is a requirement for Ogg.

As an example, here's what needs to be done to stream Ogg/Theora+Vorbis.

a) ogg page 1 contains a header for the vorbis stream
b) ogg page 2 contains a header for the theora stream
c) ogg page 3 contains two extra headers for the vorbis stream
d) ogg page 4 contains two extra headers for the theora stream
e) ogg page 5 is the first page containing data packets

Every new client that picks up in the middle of the stream needs to
first receive the first four ogg pages.  (Contrast with an mp3 stream,
where you can pick in any time since each mp3 frame is preceded by a
header, or with mpeg-video where the codec can choose to repeatedly send
header info every few seconds).

We discussed the various options.  We wanted to attach the information
that some buffers represent a reusable header to the stream, instead of
signalling it out-of-band through signals/deep_notify and property
setting.

So the choice is between events or buffer flags.  I prefer a buffer flag
because it's the cleanest implementation:
- the vorbis codec would generate the three packets of header info
marked with this flag
- same for theora
- ogg muxer assembles pages with this flag
- network streaming element looks at incoming flags, and puts all
incoming buffers with this flag on an internal queue
- every new connection to this element first receives the stored headers
before picking in anywhere in the data stream.

So, can I go ahead and add a _HEADER buffer flag for this ?

Thomas

Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
Won't you come a
little closer
close enough so
I can smell you
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list