Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Problems Recording some FTA.
Gregor Lawatscheck wrote:
> At 16:01 18/05/2003, you wrote:
> >Ummm.. 'buffer empty' has been commented out in av7110.c, so maybe
> > the description needs to be changed..
>
> True :) or better yet fixed so buffer underflows don't actually occur
> during normal replay.
IMHO this buffer underflow is completely harmless (see below).
> The routine in av7110.c goes
>
> if (len<blen || blen > dlen) {
> printk("buffer empty:\n");
> wake_up(&buf->queue);
> return -1;
> }
>
> If I understand correctly the av7110 code calculates the buffer size
> from the PES packet size of the current packet plus an additional 6
> bytes (what are those for)?
3 bytes start code + 1 byte stream id + 2 byte length
PES packet length doesn't include these 6 bytes!
> If the available space in the ring buffer
> (len) is smaller than the packet size derived from the PES header
> (blen) then "buffer empty" is indicated.
> Shouldn't this be more like "buffer overflow"?
'len<blen' means underflow. This ringbuffer holds data until it can be
transferred to the AV7110. ring_buffer_avail() returns the number of
bytes *waiting* in the buffer. Whenever the firmware is ready to accept
a new chunk, it issues an interrupt and pes_play is called with
dlen=2048 bytes.
> Moreover if blen is larger than 2048 (see case DATA_MPEG_PLAY) the
> buffer is supposed to be empty?
I've never seen 'blen>dlen'. The message 'buffer empty' would be
misleading in this case. It should read 'packet too large'.
During my tests I only got 'len<blen' which means that there is an
incomplete pes packet in the ringbuffer. This is harmless as the
firmware will try again later.
> I guess I must misunderstand this but
> it bemuses me. How does this make sense? Again it's more like "buffer
> overflow"? It seems some channels send oversized PES packets from
> time to time (and when they do mostly in succession of three or so).
Are you sure that 'blen>dlen' really occurres?
I think this would be a problem.
Oliver
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index