DVB TS/PES filters
I could do with a little more information about DMX_SET_PES_FILTER. Specifically I want to use an output type of DMX_OUT_TS_TAP. I believe there's a limit on how many filters can be set, but I don't know whether the kernel imposes such a limit or whether it depends on the hardware, If the latter, how can I read the limit?
I looked at the code for GStreamer's dvbsrc and that defines a limit of 32 filters. It also implies that using the "magic number" 8192 as the pid requests the entire stream.
I can't find information about these things in the API docs. Is there somewhere I can get more details.
If I ended up wanting enough pids to exceed the limit would it work to allow LIMIT - 1 individual pid filters to be set, then after that set one for 8192 instead and clear all the others?
Quoted 5 lines · On Thu, 26 Jan 2012 15:40:15 +0000 Tony Houghton <[email protected]> wrote:
I could do with a little more information about
DMX_SET_PES_FILTER. Specifically I want to use an output type ofDMX_OUT_TS_TAP. I believe there's a limit on how many filters can be set, but I don't know whether the kernel imposes such a limit or whether it depends on the hardware, If the latter, how can I read the limit?
Can anyone help me get more information about this (and the "magic number" pid of 8192 for the whole stream)?
Hi,
Am 01.02.2012 14:32, schrieb Tony Houghton:
Quoted 11 lines
Quoted 5 lines · On Thu, 26 Jan 2012 15:40:15 +0000 Tony Houghton<[email protected]> wrote:
I could do with a little more information about
DMX_SET_PES_FILTER. Specifically I want to use an output type ofDMX_OUT_TS_TAP. I believe there's a limit on how many filters can be set, but I don't know whether the kernel imposes such a limit or whether it depends on the hardware, If the latter, how can I read the limit?Can anyone help me get more information about this (and the "magic number" pid of 8192 for the whole stream)?
In the TS-header there are 13 bits for the PID, so it can be from 0 to 8191. Therefore dvb-core interprets 8192 (and greater values I think) as "all PIDs".
Regards,
Lars.
Quoted 10 lines · On Wed, 01 Feb 2012 18:40:44 +0100 Lars Hanisch <[email protected]> wrote:
Am 01.02.2012 14:32, schrieb Tony Houghton:
Quoted 9 lines
Quoted 5 lines · On Thu, 26 Jan 2012 15:40:15 +0000 Tony Houghton<[email protected]> wrote:
I could do with a little more information about
DMX_SET_PES_FILTER. Specifically I want to use an output type ofDMX_OUT_TS_TAP. I believe there's a limit on how many filters can be set, but I don't know whether the kernel imposes such a limit or whether it depends on the hardware, If the latter, how can I read the limit?
Quoted 6 lines
Quoted 2 lines
Can anyone help me get more information about this (and the "magic number" pid of 8192 for the whole stream)?
In the TS-header there are 13 bits for the PID, so it can be from 0 to 8191. Therefore dvb-core interprets 8192 (and greater values I think) as "all PIDs".
Thanks for that. But it would be really helpful if I could find out whether there really is a limit to the number of filters and whether it's hardware dependent or the kernel.
Quoted 16 lines · Tony Houghton
Quoted 13 lines · On Wed, 01 Feb 2012 18:40:44 +0100 Lars Hanisch <[email protected]> wrote:
Am 01.02.2012 14:32, schrieb Tony Houghton:
Quoted 11 lines
Quoted 5 lines · On Thu, 26 Jan 2012 15:40:15 +0000 Tony Houghton<[email protected]> wrote:
I could do with a little more information about
DMX_SET_PES_FILTER. Specifically I want to use an output type ofDMX_OUT_TS_TAP. I believe there's a limit on how many filters can be set, but I don't know whether the kernel imposes such a limit or whether it depends on the hardware, If the latter, how can I read the limit?Can anyone help me get more information about this (and the "magic number" pid of 8192 for the whole stream)?
Quoted 7 lines
Quoted 3 lines
In the TS-header there are 13 bits for the PID, so it can be from 0 to 8191. Therefore dvb-core interprets 8192 (and greater values I think) as "all PIDs".
Thanks for that. But it would be really helpful if I could find out whether there really is a limit to the number of filters and whether it's hardware dependent or the kernel.
The hardware usually only filters the TS packets unprocessed.
Hardware TS filtering is typically 16, 32 or 64. Nearly all can be turned off(unfiltered).
dvb-usb devices the unfiltered limit is 255.
The most TS streams usually contain 20 to 40 or so.
Quoted 10 lines · Tony Houghton
I could do with a little more information about
DMX_SET_PES_FILTER. Specifically I want to use an output type ofDMX_OUT_TS_TAP. I believe there's a limit on how many filters can be set, but I don't know whether the kernel imposes such a limit or whether it depends on the hardware, If the latter, how can I read the limit?I looked at the code for GStreamer's dvbsrc and that defines a limit of 32 filters. It also implies that using the "magic number" 8192 as the pid requests the entire stream.
Quoted 6 lines
I can't find information about these things in the API docs. Is there somewhere I can get more details.
If I ended up wanting enough pids to exceed the limit would it work to allow LIMIT - 1 individual pid filters to be set, then after that set one for 8192 instead and clear all the others?
It has been a long time since I touched this, anyway...
Yes 8192 is "all PIDs"; this has to be supported by the hardware, which usually does. All the packets go to the userspace process.
If you ask filters, the kernel uses the HW filters if available/enough, otherwise it switches to software filtering at the kernel level. Your application sees only the packets it asked, but the kernel may be getting everything and filtering itself; this can have some performance implication on slow (USB) buses.
I suggest you to experiment a little to discover if I said something wrong and if your hardware (driver) behaves as I said.
Signature · 1 line
Roberto Ragusa mail at robertoragusa.it