[linux-dvb] [PATCH] dvb-kernel-v4 demux.h

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

 



hunold@xxxxxxxxxxx wrote:
> Johannes Stezenbach writes:
> >On Wed, Aug 31, 2005 hunold@xxxxxxxxxxx wrote:
> 
> >>enum dvb_demux_pid_filter_packet_selection {
> >>	DVB_DEMUX_TS_PACKET       = (1 << 0), /*!< default: process the 
> >>	whole TS packet */
> >>	DVB_DEMUX_PAYLOAD_ONLY    = (1 << 1), /*!< only deliver the payload 
> >>	(ie. strip off the TS header) */
> >>	DVB_DEMUX_ADAPTATION_ONLY = (1 << 2), /*!< only deliver the TS 
> >>	header and any adaptation fields if present */
> >>}; 
> 
> >If these enums aren't flags, then why the hell do you make them
> >look like flags?
> 
> I don't want to make them look like flags. Flags can only be used for 
> saying on/off. This is not true for the stuff above, they are selections. 

Why then the (1 << x) assignments? That's misleading.

> What about putting *all* capabilities into a separate struct that can be 
> queried at once instead of a lot small capabilities that need to be queried 
> individually? 

That makes it hard to extend the API without breaking
binary compatibility. (We could add some "reserved" fields
like the v4l2 API has, but it's ugly.)

Johannes



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux