[icecast-dev] Icecast2?

Ricardo Galli gallir at uib.es
Tue Feb 19 14:40:41 PST 2002

On 19/02/02 23:09, Likai Liu shaped the electrons to say:
> Ricardo Galli wrote:
> >By assigning a timestamp to each packet read from the source socket. I
> > think the only sane way to do it.
> great idea. with this implementation, actually you can set a smaller
> buffer size, but wait a longer time for recovery. once congestion is
> clear, previous "missed" packets are thrown away, and new packets
> continue to flow. that introduces skips but overall latency control is
> better. i like your idea.

I am trying it now, you can do it also at http://mcrg.uib.es:8000/live.ogg

<p>It's configured with a prebuffering of 5 seconds, and a maxlag of 10 seconds. 
If a refbuf for a given client exceeds 10 seconds, and it's not a partial 
packets, it is silently discarded and removed. The "core" is shown below:

if(abuf->timestamp > 0 &&  /* only if has timestamp */
    client->pos == 0 && /* give a chance to partial packets */
    abuf->timestamp < (now - maxlag) /* packet too delayed, discard */ ) {
   /* almost a no-op */
   printf("DEBUG: discarding %d bytes from queue!!! LAG=%d MAXLAG=%d\n",      
              bytes, now - abuf->timestamp, maxlag);
} else {
  printf("DEBUG: sending %d bytes from queue...\n", bytes);
  sbytes = sock_write_bytes(client->con->sock, abuf->data[client->pos], 

"I just stopped using Windows and now you tell me to use Mirrors?" 
    - said Aunt Tillie, just before downloading 2.5.3 kernel.

--- >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