[linux-dvb] [PATCH] proposal - ioctl giving number of bytes available in DVR device.

Perceval Anichini perceval.anichini at streamvision.fr
Tue Jun 21 14:23:54 CEST 2005


	Hello !

This patch provides a new IOCTL (DMX_FIONREAD) which
allows to figure out how many bytes are stored in a DVR buffer.
(just like the FIONREAD ioctl for sockets).

It (should) applies on CVS sources and kernel-2.6.12.

I wrote this patch because of the behavior of the DVR
read () call waits its buffer to be filled with
at least the number of bytes requested before returning,
which can be problematic. 
For example, my application which dynamically add/remove PES
filters. If i remove every filters, and data still avaiable
in the dvr buffer, the read () call will block forever. (as i
try to read as much data as possible to reduce the number
of system calls).

Could you give me your feedback on this patch, and if it
interests other people commit it on CVS ???

Thanks for the DVB API, and keep up the good job !

Perceval.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-fionread
Type: text/x-patch
Size: 1606 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20050621/08cad4f3/patch-fionread.bin


More information about the linux-dvb mailing list