[linux-dvb] [V4] Querying capabilities

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

 



On Thu, Sep 15, 2005 hunold@xxxxxxxxxxx wrote:
> struct dvb_demux_pid_filter_prop {
> 	enum dvb_demux_pid_filter_packet_selection packet;
> 	enum dvb_demux_pid_filter_prio_selection prio;
> 	int wait_for_pusi:1;
> 	int output_dupes:1;
> 	int output_errpkts:1;
> }; 

1-bit bitfields should be unsigned


> In order to have a clean solution, I'd like to replace the current 
> DVB_DEMUX_GET_CAPS implementation. Instead of returning one value at a time 
> that needs to be casted to the correct type by the application, I'd like to 
> return only one structure that will have all informations. This structure 
> could look like this: 

I think the current implementation is simpler, more extensible and
more consistent (same interface for video/audio/demux etc.).

But it's not big issue, I don't mind if you change it if you
think it works better.

> struct dvb_demux_capability
> {
> 	int num_pes_filters;,      /*!< number of available PES filters 
> 	(\ref DVB_DEMUX_SET_PES_FILTER) */
> 	int num_audio_dec_feeds;   /*!< number of available audio filters 
> 	(\ref DVB_DEMUX_SET_TS_DECODER_FEED) */
> 	int num_video_dec_feeds;   /*!< number of available video filters 
> 	(\ref DVB_DEMUX_SET_TS_DECODER_FEED) */
> 	int num_pcr_dec_feeds;     /*!< number of available pcr filters 
> 	(\ref DVB_DEMUX_SET_TS_DECODER_FEED) */
> 	int num_section_filters;   /*!< number of available section filters 
> 	(\ref DVB_DEMUX_SET_SECTION_FILTER) */
> 	int num_pid_filters;       /*!< number of available pid filters 
> 	(\ref DVB_DEMUX_SET_PID_FILTER)*/
> 	int num_recording_filters; /*!< number of available recording 
> 	filters (\ref DVB_DEMUX_SET_RECORDING_FILTER)*/
> 	int num_descr_key_pairs; 

should these be unsigned?

> 	int soure_format_ts:1;     /*!< can handle TS input */
> 	int soure_format_ps:1;     /*!< can handle PS input */
> 	int soure_format_pes:1;    /*!< can handle PES input */
> 	int soure_format_mpeg1:1;  /*!< can handle MPEG1 input */ 
> 
> 	int pid_filter_payload_only:1;          /*!< can strip off the TS 
> 	header */
> 	int pid_filter_adaptation_only:1;       /*!< can deliver TS header + 
> adaptation fields only */
> 	int pid_filter_prio_normal_selection:1; /*!< can deliver low 
> 	priority packets only */
> 	int pid_filter_prio_high_selection:1;   /*!< can deliver high 
> 	priority packets only */
> 	int pid_filter_wait_for_pusi:1;         /*!< can wait for pusi 
> 	before filtering */
> 	int pid_filter_output_dupes:1;          /*!< don't filter out 
> 	duplicated packets */
> 	int pid_filter_output_errpkts:1;        /*!< don't filter out 
> 	packets with errors */ 
> 
> 	int recording_event_logging:1;  /*!< recording units have event 
> 	logging support */

1-bit bitfields should be unsigned

> 	uint32_t recording_events;	/*!< bitfield, supported flags for 
> 	recording filters (\ref dvb_demux_recording_filter_flags) */ 
> 
> 	uint32_t priv[16]; /*!< reserved */
> }; 
> 
> #define DVB_DEMUX_GET_CAPS _IOWR(DVB_IOCTL_BASE, 0x20, struct 
> dvb_demux_capability) 
> 
> Comments?

Word-wrapped code sucks.

Johannes


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

  Powered by Linux