Age | Commit message (Collapse) | Author |
|
The xine libmad adaptor seemed not to forward the pts to the metronome: It
buffers the MPEG audio packets until a threshold is reached (MAD_MIN_SIZE:
2889 bytes) and then has libmad decode the packets which is send to audio
out. The pts of the last audio packet is forwarded on to metronome which can
then sync video with audio.
For the channel4 channels MPEG audio packets have a size of 576 bytes which
means it takes five packets to fill the buffer enough for processing. In the
stream every fifth audio packet contains a pts.
The result of this is: If after a seek, the last audio packet is the one
with the pts, video and audio are in sync. If the pts is in any of the four
previous ones no pts will reach metronome and video and audio will never be
synced before a new seek and even then there's a one in five chance that
video and audio are not synced.
Other channels did not show this behaviour because e.g. BBC One has an audio
packet size of about 750 bytes and send a pts every fifth packet as well.
This means that not every pts from the stream gets through to metronome but
some do. This also means that syncing after a seek is probably not as quick
as it could be but it will sync.
My workaround to this problem is to start decoding not only when a the
buffer has reached a threshold but also when a pts != 0 arrives. This does
mean however that the buffer isn't always filled to the theshold and
decoding might not perform as well as it could.
--HG--
extra : transplant_source : %EC%90%EB%AA%8A%C7%BD%A4%B7%EE%F5%E9%E8SY%89S%9D0s
|
|
|
|
|
|
This requires that many other files include config.h themselves.
Also convert <config.h> to "config.h".
|
|
The xine_xmalloc() function is going to be deprecated, as its
behaviour is rarely needed as such, and it's thus misused.
With this, almost all uses of xine_xmalloc() with static size (for
instance the value returned by sizeof()) or with a size that is
guaranteed not to be zero (like strlen()+1) are replaced with calls to
either calloc(1, ...) or malloc().
malloc() is used whenever the allocated memory is going to be
immediately overwritten, while calloc() is used in every other case,
as it sets the whole memory area to zero.
--HG--
extra : transplant_source : %8F%98%EC%02%1E%83%F0s%06X%83C%205Y%80%B12%CC%E1
|
|
Fixed pts handling.
|
|
--HG--
extra : transplant_source : %E0%D0%C5%8B%BEU%DD%24%5D7%1F%ADV%AD%EB%23%CBU%80%EB
|
|
According to bug 1773769, this breaks foo->open().
The fix (as used in Ville Skyttä's patch, which doesn't cover all cases) is
to replace this with (foo->open)().
This patch was generated using
sed -i -re 's/(([[:alnum:]_]+(->|\.))+open) ?\(/(\1) (/' `grep '[>.]open \?(' include -rIl`
One change (in a comment) is not committed.
|
|
external libmad.
|
|
|
|
compensate pts.
|
|
Fixed random glitches.
|
|
Use xineplug_LTLIBRARIES.
--HG--
rename : src/libmad/xine_decoder.c => src/libmad/xine_mad_decoder.c
|