From: Reinhard N. <rn...@gm...> - 2010-09-16 20:20:52
|
Hi, Am 10.09.2010 18:27, schrieb VDR User: >> System details are: >> >> debian testing >> stable kernel 2.6.35.3 (quiet notsc clocksource=hpet) >> gcc 4.4.4-8 >> alsa-base 1.0.23+dfsg-1 >> alsa-utils 1.0.23-2 >> xine-lib-1.2 hg r11577 >> xine-ui hg r3054 >> VDR-1.7.15 >> mplayer-nogui 2:1.0~rc3++svn20100804-0.0 >> >> I recently tried the notsc and clocksource=hpet kernel options, which >> also had no affect. I want to reiterate that the dropout problem only >> occurs in xine. The error I see in the xine log when the dropout >> occurs is: pcm_hw.c: snd_pcm_hw_delay() SNDRV_PCM_IOCTL_DELAY failed >> (-32). >> >> I accidentally posted this to the alsa-dev mailing list and one of >> their devs Jaroslav Kysela wound up responding to it with the >> following: >> >>> -32 means -EPIPE - underrun has occured. It means that xine does not deliver >>> samples in time to the driver for some reason. Because mplayer works, it >>> does not seem like a general ALSA issue. I would ask xine developers for >>> further debugging of this issue (compare the audio write calls with the >>> realtime clock)." > > Will someone PLEASE look into this. Well, I was able to reproduce this issue with your supplied .xine/config. The problem is caused by a too small number of video input buffers (you used the default value of 500 buffers). What is a reasonable buffer size? When using vdr-xine to connect VDR to xine, each video input buffer will get 2048 byte of the video stream. Given that your HD channel broadcasts at 10 Mbit/s, you'll need that much buffers to hold a single second of video: 10000000 bit / 8 bit/byte / 2048 byte/buffer = 610 buffer What about audio buffers. vdr-xine puts a single audio frame (let's assume such a frame equals 24 ms of audio) into an audio input buffer. So for a second of audio, you'll need that much buffers: 1000 ms / 24 ms/frame / 1 frame/buffer = 41 buffer To allow an a/v offset at the input stage of up to +/-3 seconds, you'll need 1831 video input buffers and 125 audio input buffers. On top of that, you'll add another 2 seconds to allow for some latency at the receiving and processing stages, so you'll end up with 3051 video input buffers and 208 audio input buffers. As you can see, 208 audio buffers is a bit less that what is the default (230). But 3051 video buffers are much more than the default (500). The memory footprint of the above buffer counts is like that: xine uses 8192 byte per input buffer, so you'll get 3259 buffer * 8 kbyte/buffer = 26072 kbyte or roughly 25 MB. The actual number of input buffers may be chosen a bit lower as a part of the a/v offset can also be buffered during decoding and by the output buffers. Bye. -- Dipl.-Inform. (FH) Reinhard Nissl mailto:rn...@gm... |