Mailing List archive

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

[linux-dvb] Re: Kernel demux API



On Tue, Sep 03, 2002 at 04:50:56PM +0100, Chris Newell wrote:
> 
> I need to create a Section Filter which passes filtered sections to my code
> via a callback as they are received (the DVB Demux API doesn't look ideal
> for this).
> 
> Does anyone have any sample code showing how to use the Kernel Demux API?

The NEWSTRUCT branch has an example program in
apps/test/test_sections.c which shows how to use
section filters.

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. For Gtk+ based programs, you can wrap the file
descriptor in an GIOChannel and register it with the
GMainLoop using g_io_add_watch().

http://developer.gnome.org/doc/API/2.0/glib/glib-io-channels.html
http://developer.gnome.org/doc/API/2.0/glib/glib-the-main-event-loop.html

It all depends on your application.


HTH,
Johannes


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



Home | Main Index | Thread Index