Document progress values for AppleTV metadata

This commit is contained in:
Julien BLACHE 2011-03-27 18:00:57 +02:00
parent 1c861a6662
commit e3b756c730

View File

@ -1979,6 +1979,18 @@ raop_metadata_send_progress(struct raop_session *rs, struct evbuffer *evbuf, str
uint32_t display;
int ret;
/* Here's the deal with progress values:
* - first value, called display, is always start minus a delay
* -> delay x1 if streaming is starting for this device (joining or not)
* -> delay x2 if stream is switching to a new song
* - second value, called start, is the RTP time of the first sample for this
* song for this device
* -> start of song
* -> start of song + offset if device is joining in the middle of a song,
* or getting out of a pause or seeking
* - third value, called end, is the RTP time of the last sample for this song
*/
display = RAOP_RTPTIME(rmd->start - delay);
ret = evbuffer_add_printf(evbuf, "progress: %u/%u/%u\r\n", display, RAOP_RTPTIME(rmd->start + offset), RAOP_RTPTIME(rmd->end));