[linux-dvb] libdvbapi clarification
david at hardeman.nu
Tue Jul 10 11:26:58 CEST 2007
On Tue, July 10, 2007 10:56, Marcel Siegert wrote:
> On Tuesday 10 July 2007, David Härdeman wrote:
>> I'm trying to understand the dvbdemux_set_section_filter function in
>> dvp-apps/lib/libdvbapi/dvbdemux.c (lines 74 - 93).
>> It used to take 16 filter and 16 mask parameters, but then it was
>> changed 15 months ago to take 18 filter and 18 mask parameters,
>> then it throws away 2 of each:
> if you filter a section you can filter on e.g. the table id but NOT on the
> size ect.
> (those are used as byte 2 + 3 of a section)
> so if you would read the source normally, you would think you can filter
> on those values.
> having the two "unused" values within the filter array it makes life
> easier to count the bytes
> you want to filter and to set the right mask.
> it can be more irretating than usefull, i must admit.
Thanks for the prompt reply :)
The "hole" at bytes 2 and 3 seems like a typical implementation detail
that a library should hide from its users. Wouldn't it be saner to change
the API so that the function takes 16 filter/mask values and adds the
unused bytes itself?
More information about the linux-dvb