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 Tue, Jan 14, 2003 at 03:49:36PM +0100, Felix Domke wrote:

Johannes Stezenbach wrote:


Regardless what manual pages or POSIX say, the driver implements
read() for section filters in such a way that you get either
a full section, or nothing -- provided that the buffer you pass
to read() is large enough for the section (else you will get
partial sections, but never the end of one section and the start
of the next section in one read).


Sorry, I think after a partitial section you read the same section again, since otherwise the "read 3 bytes, determine length, read whole section"-sheme wouldn't work. And exactly this leeds to EOVERFLOW, since the buffer fills and fills and no section will ever be removed from the buffer.

If this is true then it is a bug. The second read() should give
you the remainder of the section, and the section should then
be removed from the driver's buffer.

DVB/doc/dvbapi/demux.tex documents this behaviour of the
read() system call for section filters.

But I must admit that I haven't tested this, I always use a large
buffer and get full sections.


Regards,
Johannes



Hi,

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. 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.

Regards

Gerard



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



Home | Main Index | Thread Index