3.1. Demux Data Types

3.1.1. dmx_output_t

 typedef enum
 {
	 DMX_OUT_DECODER,
	 DMX_OUT_TAP,
	 DMX_OUT_TS_TAP
 } dmx_output_t;

DMX_OUT_TAP delivers the stream output to the demux device on which the ioctl is called.

DMX_OUT_TS_TAP routes output to the logical DVR device /dev/dvb/adapter0/dvr0, which delivers a TS multiplexed from all filters for which DMX_OUT_TS_TAP was specified.

3.1.2. dmx_input_t

 typedef enum
 {
	 DMX_IN_FRONTEND,
	 DMX_IN_DVR
 } dmx_input_t;

3.1.3. dmx_pes_type_t

 typedef enum
 {
	 DMX_PES_AUDIO,
	 DMX_PES_VIDEO,
	 DMX_PES_TELETEXT,
	 DMX_PES_SUBTITLE,
	 DMX_PES_PCR,
	 DMX_PES_OTHER
 } dmx_pes_type_t;

3.1.4. dmx_event_t

 typedef enum
 {
	 DMX_SCRAMBLING_EV,
	 DMX_FRONTEND_EV
 } dmx_event_t;

3.1.5. dmx_scrambling_status_t

 typedef enum
 {
	 DMX_SCRAMBLING_OFF,
	 DMX_SCRAMBLING_ON
 } dmx_scrambling_status_t;

3.1.6. struct dmx_filter

 typedef struct dmx_filter
 {
	 uint8_t         filter[DMX_FILTER_SIZE];
	 uint8_t         mask[DMX_FILTER_SIZE];
 } dmx_filter_t;

3.1.7. struct dmx_sct_filter_params

 struct dmx_sct_filter_params
 {
	 uint16_t            pid;
	 dmx_filter_t        filter;
	 uint32_t            timeout;
	 uint32_t            flags;
 #define DMX_CHECK_CRC       1
 #define DMX_ONESHOT         2
 #define DMX_IMMEDIATE_START 4
 };

3.1.8. struct dmx_pes_filter_params

 struct dmx_pes_filter_params
 {
	 uint16_t            pid;
	 dmx_input_t         input;
	 dmx_output_t        output;
	 dmx_pes_type_t      pes_type;
	 uint32_t            flags;
 };

3.1.9. struct dmx_event

 struct dmx_event
 {
	 dmx_event_t          event;
	 time_t               timeStamp;
	 union
	 {
		 dmx_scrambling_status_t scrambling;
	 } u;
 };

3.1.10. struct dmx_stc

 struct dmx_stc {
	 unsigned int num;       /⋆ input : which STC? 0..N ⋆/
	 unsigned int base;      /⋆ output: divisor for stc to get 90 kHz clock ⋆/
	 uint64_t stc;           /⋆ output: stc in 'base'⋆90 kHz units ⋆/
 };