• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_DVBDMX_H_
8 #define _UAPI_DVBDMX_H_
9 #include <linux/types.h>
10 #include <time.h>
11 #define DMX_FILTER_SIZE 16
12 enum dmx_output {
13   DMX_OUT_DECODER,
14   DMX_OUT_TAP,
15   DMX_OUT_TS_TAP,
16   DMX_OUT_TSDEMUX_TAP
17 };
18 enum dmx_input {
19   DMX_IN_FRONTEND,
20   DMX_IN_DVR
21 };
22 enum dmx_ts_pes {
23   DMX_PES_AUDIO0,
24   DMX_PES_VIDEO0,
25   DMX_PES_TELETEXT0,
26   DMX_PES_SUBTITLE0,
27   DMX_PES_PCR0,
28   DMX_PES_AUDIO1,
29   DMX_PES_VIDEO1,
30   DMX_PES_TELETEXT1,
31   DMX_PES_SUBTITLE1,
32   DMX_PES_PCR1,
33   DMX_PES_AUDIO2,
34   DMX_PES_VIDEO2,
35   DMX_PES_TELETEXT2,
36   DMX_PES_SUBTITLE2,
37   DMX_PES_PCR2,
38   DMX_PES_AUDIO3,
39   DMX_PES_VIDEO3,
40   DMX_PES_TELETEXT3,
41   DMX_PES_SUBTITLE3,
42   DMX_PES_PCR3,
43   DMX_PES_OTHER
44 };
45 #define DMX_PES_AUDIO DMX_PES_AUDIO0
46 #define DMX_PES_VIDEO DMX_PES_VIDEO0
47 #define DMX_PES_TELETEXT DMX_PES_TELETEXT0
48 #define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
49 #define DMX_PES_PCR DMX_PES_PCR0
50 struct dmx_filter {
51   __u8 filter[DMX_FILTER_SIZE];
52   __u8 mask[DMX_FILTER_SIZE];
53   __u8 mode[DMX_FILTER_SIZE];
54 };
55 struct dmx_sct_filter_params {
56   __u16 pid;
57   struct dmx_filter filter;
58   __u32 timeout;
59   __u32 flags;
60 #define DMX_CHECK_CRC 1
61 #define DMX_ONESHOT 2
62 #define DMX_IMMEDIATE_START 4
63 };
64 struct dmx_pes_filter_params {
65   __u16 pid;
66   enum dmx_input input;
67   enum dmx_output output;
68   enum dmx_ts_pes pes_type;
69   __u32 flags;
70 };
71 struct dmx_stc {
72   unsigned int num;
73   unsigned int base;
74   __u64 stc;
75 };
76 enum dmx_buffer_flags {
77   DMX_BUFFER_FLAG_HAD_CRC32_DISCARD = 1 << 0,
78   DMX_BUFFER_FLAG_TEI = 1 << 1,
79   DMX_BUFFER_PKT_COUNTER_MISMATCH = 1 << 2,
80   DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED = 1 << 3,
81   DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR = 1 << 4,
82 };
83 struct dmx_buffer {
84   __u32 index;
85   __u32 bytesused;
86   __u32 offset;
87   __u32 length;
88   __u32 flags;
89   __u32 count;
90 };
91 struct dmx_requestbuffers {
92   __u32 count;
93   __u32 size;
94 };
95 struct dmx_exportbuffer {
96   __u32 index;
97   __u32 flags;
98   __s32 fd;
99 };
100 #define DMX_START _IO('o', 41)
101 #define DMX_STOP _IO('o', 42)
102 #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
103 #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
104 #define DMX_SET_BUFFER_SIZE _IO('o', 45)
105 #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
106 #define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
107 #define DMX_ADD_PID _IOW('o', 51, __u16)
108 #define DMX_REMOVE_PID _IOW('o', 52, __u16)
109 typedef enum dmx_output dmx_output_t;
110 typedef enum dmx_input dmx_input_t;
111 typedef enum dmx_ts_pes dmx_pes_type_t;
112 typedef struct dmx_filter dmx_filter_t;
113 #define DMX_REQBUFS _IOWR('o', 60, struct dmx_requestbuffers)
114 #define DMX_QUERYBUF _IOWR('o', 61, struct dmx_buffer)
115 #define DMX_EXPBUF _IOWR('o', 62, struct dmx_exportbuffer)
116 #define DMX_QBUF _IOWR('o', 63, struct dmx_buffer)
117 #define DMX_DQBUF _IOWR('o', 64, struct dmx_buffer)
118 #endif
119