Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: EOVERFLOW with section filter



Johannes Stezenbach wrote:

On Sun, Jan 19, 2003 at 09:50:28AM +0100, Gerard MAULINO wrote:

I use a program that do that (ie: read 3 bytes, then read the rest of the section). It works for me and it has the advantage to work with the "world" of reading section. I mean reading from a file or a socket.

Yes, it may be advantageous that the same read logic works on
any type of file descriptor.


I don't know what's the better way to implement this, but I know that most of data sections in the french air are less than 4kb and also than 1kb (BAT, EIT, SDT...). So if you need to get about ten megas of data cutted in sections of 2kb you will probably lost time and space using a read of 4k's buffer.

The section_length field has only 12 bits, so the section size is
limited to 4096. For most sections the size is further limited by
specification to 1024 bytes. So, at the expense of a few bytes
of "wasted" buffer space you get the section using one read() system
call instead of two. And the fixed buffer size makes it easier to
use buffer pools and thus avoiding a malloc() per section.

Regards,
Johannes



Ok, it's a good thing that the driver let you get one section even if you read more than 'section_lenght'. I will try this.

Thanks,

Gerard.



--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index