[linux-dvb] [V4] Querying capabilities

Johannes Stezenbach js at linuxtv.org
Thu Sep 15 18:40:56 CEST 2005

On Thu, Sep 15, 2005 hunold at linuxtv.org wrote:
> Johannes Stezenbach writes:
> >I think the current implementation is simpler, more extensible and
> >more consistent (same interface for video/audio/demux etc.).
> We agreed that some of the enums should be changed to #defines, and that 
> other enum should not look like #define by setting them to values manually 
> (ie. DVB_DEMUX_FOO = (1 << 2)). 
> If I remove these manual settings for the enums, we lose the ability to 
> (ab)use the enums as bitfields for querying the capabilities, because the 
> values are no longer a power of two and can be distinguished. 
> So we either keep these manual settings or we need to change capability 
> interface. 
> Simpler in this case means that we annoy C++ users and that the userspace 
> code must know the return code of the different capabilities, because they 
> are all returned as unsigned int. 

I thought we simply drop the enums and use #defines for the
flag values, like e.g. videodev2.h does. C++ problem solved.


More information about the linux-dvb mailing list