[icecast-dev] PATCH: Faststart implementation

Ricardo Galli gallir at uib.es
Sat Jan 18 19:11:41 PST 2003

On Sunday 19 January 2003 03:35, Michael Smith shaped the electrons to 
> There's a bad interaction here between the predata and this faststart.
> Suppose we have two logical streams (A and B), and the stream has just
> recently got to logical stream B. Now, this means the fast start queue
> contains the end of stream A, then the stream B headers, then the start
> of stream B audio data.

Good point, I didn't think about this case (i'm streaming radio with just 
one logical stream).

> So, we send to the client:
> 	predata   (stream B headers)
> 	faststart (stream A data,
> 		   stream B headers,
> 		   stream B data)
> Which is a corrupt stream.

Could be solved checking it before adding the fastart buffer to the 
client. Because the checking is done just once for the client, it 
shouldn't be expensive. The comparison could be (just for vorbis, mp3 has 
not predata):

1. Comparing the serialno of the current predata and last faststart 
buffer. The comparison could be done when a client connects or every time 
it add a new buffer to the faststart queue.

2. Storing the last predata sent to a client against the current one (less 

<p>If you agree, I can fix it. 

¿How would you implement/hide it to lower layers? 
¿Add a "plugin->get_serialno" in format_xxx.c and then do something like 
"if (source->format->has_predata) -> ... 
source->format->get_serialno(refbuf); ..." for example? 

<p>PS: this can be also used for selectively dropping packages, altough I 
just read it doesn't seem to be interesting :-)

  ricardo galli       GPG id C8114D34

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Icecast-dev mailing list