Mailing List archive

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

[linux-dvb] Re: Why no more than 3 PID filters



Delaunay Christophe wrote:
> >Delaunay Christophe wrote:
> >> Since I wanted to play several services from the same transport stream
> >> to different socket, I tried to use "dmx_pes_filter"s, (one per PID I
> >> want to play).
> 
> >Look at dvb-apps/test/test_dvr.c.
> 
> This app is just fine for playing a single service.
> 
> >Note that the current API is somewhat limited in that all DMX_OUT_TS_TAP
> >packets go to a single dvr device, hence you must post-demux in software
> >if you want to stream different programs to a different socket.
> 
> And that's why I could not figure out how to use it as is. These is
> probably the source of my mistake.
> 
> Here is what I tried to do in order to work around this.
> 
> First, my idea was to patch the demux in such a way that it could send
> data to a buffer, exactly as it does when we define a PES filter with
> the "DMX_OUT_TAP" but the data in the buffer would be full TS packet,
> like if we use "DMX_OUT_TS_TAP".
> 
> First, I tried to add a new value in the dmx_output_t enum defined in
> "linuxtv-dvb-1.1.1/linux/include/linux/dvb/dmx.h". I named
> "DMX_OUT_TS_BUF".
...
> Now, when I open one, two or three demux filters with an output type
> of "DMX_OUT_TS_BUF", I can "read()" full TS packets from their
> respective file descriptors.
> 
> I can then open a fourth demux filter, perform the ioctl which sets
> its parameters and starts it, but when I then try to "read()" from its
> file descriptor, I am back with a "Bad file descriptor" error.

Well, from your description I think that it should work. But it would
have been easier to implement post-filtering of the packets from dvr
in userspace (it's not much code, and easier to debug).

Anyway, you might want to grep the code for EBADF. I did for current
CVS, and there are no EBADF. Maybe you have a silly bug in your
userspace program which trashes the fourth file descriptor?
I'm not aware of any three-pid limitation; maybe there is a problem
with the PID value, and another PID would work?

> >The V4 API attempts to improve on this (but the public prototype driver
> >is no necessarily functional).
> 
> Please, how does it manage to propose an equivalent behaviour ?

V4 has (TS) recording filters, where you can set filters for multiple
PIDs on a single file descriptor. STB chips support this in hardware,
but for Nexus and Budget cards in will be emulated in software.

Michael Hunold will do a presentation of the V4 API at the
CELF conference:
http://tree.celinuxforum.org/CelfPubWiki/TechnicalConference

Johannes




Home | Main Index | Thread Index