[Icecast-dev] Caching current events for new listeners

Karl Heyes karl at xiph.org
Tue Apr 29 08:41:27 PDT 2008


ogg.k.ogg.k at googlemail.com wrote:

> - if I keep them in the codec specific struct (which is what I'm doing now),
> I can't request them when a new listener connects, as I don't know when
> this happens from the format_ogg.c code
> 
> - if I keep them (and update them as streaming goes on) in the headers list,
> then send_ogg_headers will continuously stream them out, but I don't want
> that since that'll get pushed to all listeners, and they'll have already gotten
> those as normal streaming progresses.

There are certain things that could be done to help the situation, I'm 
not sure which would be best in your particular case but the current 
sync_point setting could be turned into a general bitmask flags, where 
sync point is just one and you can have codec specific allocations of 
those flags.

Also the check_buffer routine is called before the send_to_listener. 
It's used to populate data from intro/fallback files or progress through 
the queue. You could set a special check buffer handler that checks the 
above refbuf_t flags. It's possible to create a per-client refbuf_t 
within there that hooks back into the queue.

karl.



More information about the Icecast-dev mailing list