summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2011-08-26 14:15:23 +0200
committerTorsten Jager <t.jager@gmx.de>2011-08-26 14:15:23 +0200
commitb6ba1791153075a7f196583dde1f4e8153ec1098 (patch)
tree72ba35e0b924d71a32cec4b76e7a1c2cff9c9120 /po
parent80cbcb6136ca8a4b93c8dd652e8349c7f9ac9dd4 (diff)
downloadxine-lib-b6ba1791153075a7f196583dde1f4e8153ec1098.tar.gz
xine-lib-b6ba1791153075a7f196583dde1f4e8153ec1098.tar.bz2
DVB sync
The problem When watching live DVB, data is delivered strictly at the broadcasters speed. We cannot change it through server commands. Our local systems clock usually runs slightly faster or slower than that, causing a/v fifos to run empty or full after a few minutes. Standard network buffering control only handles the first case by pausing the engine (not nice). The latter case ends up in severe stuttering and an a/v lag of several seconds (annoying). I tried quite a few differnt algorithms, and this one made it: a 3 point controller. There is a target buffer fill window with a center and some tolerated width: Minimum: definition: 1 second safety: clamped to 38% of fio size action: switch playback speed to 99.5% Center: definition: 2 seconds safety: clamped to 73% fifo size action: switch to normal playback speed Maximum: definition: 3 seconds safety: clamped to 98% fifo fill action: switch playback speed to 100.5% If the usual dvb audio to video muxing delay is more than 1 second, center time is increased. On low bitrate radio, window width is increased. Real TVs do adjust playback audio sampling rate to follow delivery speed. Some PC sound cards can do that, too. It could be implemented transparently (although I don't know yet how). This comes quite close, resampling audio to stretch. That half percent is large enough to cover clock deviation, and it is small enough not to cause audible pitch bending. Speed control consists of adjusting SCR and telling audio out. Doing just the first will cause metronom to drop and/or insert whole audio frames, not nice with music. BTW. this one needs demux_ts to send BUF_FLAG_FRAME_START.
Diffstat (limited to 'po')
0 files changed, 0 insertions, 0 deletions