Mailing List archive

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

[linux-dvb] Re: Kernel demux API



On Thu, Sep 05, 2002 at 10:11:08AM +0100, Chris Newell wrote:
> At 19:30 03/09/2002 +0200, you wrote:
> >If you want callbacks, you can either use a thread dedicated
> >to reading from the demux device, or open the device with
> >O_NONBLOCK and wait for data with poll() or select() in an
> >event loop.
> 
> I can see that this would be possible but it doesn't feel very efficient.
> Is using the Kernel Demux API very difficult?

poll/select() is the usual UNIX way for multiplexed I/O.
A kernel driver cannot directly call userspace callbacks.
If you have a GUI application, it already has an event loop
and probably has a way of adding arbitrary file descriptors
and callbacks.
Threads have a low overhead in Linux, but require you to
use locking in the right places.

BTW, the term "Kernel Demux API" in the driver documentation
refers to a driver internal API which is of interest for
driver developers only. Applications use the "Demux Device",
defined in include/linux/dvb/dmx.h (*not* demux.h).


Johannes


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



Home | Main Index | Thread Index