public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* DVB TS/PES filters
@ 2012-01-26 15:40 Tony Houghton
  2012-02-01 13:32 ` Tony Houghton
  2012-02-03 10:20 ` Roberto Ragusa
  0 siblings, 2 replies; 6+ messages in thread
From: Tony Houghton @ 2012-01-26 15:40 UTC (permalink / raw)
  To: linux-media

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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVB TS/PES filters
  2012-01-26 15:40 DVB TS/PES filters Tony Houghton
@ 2012-02-01 13:32 ` Tony Houghton
  2012-02-01 17:40   ` Lars Hanisch
  2012-02-03 10:20 ` Roberto Ragusa
  1 sibling, 1 reply; 6+ messages in thread
From: Tony Houghton @ 2012-02-01 13:32 UTC (permalink / raw)
  To: linux-media

On Thu, 26 Jan 2012 15:40:15 +0000
Tony Houghton <h@realh.co.uk> wrote:

> 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?

Can anyone help me get more information about this (and the "magic
number" pid of 8192 for the whole stream)?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVB TS/PES filters
  2012-02-01 13:32 ` Tony Houghton
@ 2012-02-01 17:40   ` Lars Hanisch
  2012-02-02 19:04     ` Tony Houghton
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Hanisch @ 2012-02-01 17:40 UTC (permalink / raw)
  To: Tony Houghton; +Cc: linux-media

Hi,

Am 01.02.2012 14:32, schrieb Tony Houghton:
> On Thu, 26 Jan 2012 15:40:15 +0000
> Tony Houghton<h@realh.co.uk>  wrote:
>
>> 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?
>
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVB TS/PES filters
  2012-02-01 17:40   ` Lars Hanisch
@ 2012-02-02 19:04     ` Tony Houghton
  2012-02-02 22:35       ` Malcolm Priestley
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Houghton @ 2012-02-02 19:04 UTC (permalink / raw)
  To: linux-media

On Wed, 01 Feb 2012 18:40:44 +0100
Lars Hanisch <dvb@flensrocker.de> wrote:

> Am 01.02.2012 14:32, schrieb Tony Houghton:
> > On Thu, 26 Jan 2012 15:40:15 +0000 Tony Houghton<h@realh.co.uk>
> > wrote:
> >
> >> 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?
> >
> > 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVB TS/PES filters
  2012-02-02 19:04     ` Tony Houghton
@ 2012-02-02 22:35       ` Malcolm Priestley
  0 siblings, 0 replies; 6+ messages in thread
From: Malcolm Priestley @ 2012-02-02 22:35 UTC (permalink / raw)
  To: linux-media

On Thu, 2012-02-02 at 19:04 +0000, Tony Houghton wrote:
> On Wed, 01 Feb 2012 18:40:44 +0100
> Lars Hanisch <dvb@flensrocker.de> wrote:
> 
> > Am 01.02.2012 14:32, schrieb Tony Houghton:
> > > On Thu, 26 Jan 2012 15:40:15 +0000 Tony Houghton<h@realh.co.uk>
> > > wrote:
> > >
> > >> 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?
> > >
> > > 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.

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DVB TS/PES filters
  2012-01-26 15:40 DVB TS/PES filters Tony Houghton
  2012-02-01 13:32 ` Tony Houghton
@ 2012-02-03 10:20 ` Roberto Ragusa
  1 sibling, 0 replies; 6+ messages in thread
From: Roberto Ragusa @ 2012-02-03 10:20 UTC (permalink / raw)
  To: linux-media

On 01/26/2012 04:40 PM, Tony Houghton wrote:
> 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?

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.


-- 
   Roberto Ragusa    mail at robertoragusa.it

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-03 10:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 15:40 DVB TS/PES filters Tony Houghton
2012-02-01 13:32 ` Tony Houghton
2012-02-01 17:40   ` Lars Hanisch
2012-02-02 19:04     ` Tony Houghton
2012-02-02 22:35       ` Malcolm Priestley
2012-02-03 10:20 ` Roberto Ragusa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox