Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1 | .. -*- coding: utf-8; mode: rst -*- |
| 2 | |
| 3 | .. _dmx_fcalls: |
| 4 | |
| 5 | ******************** |
| 6 | Demux Function Calls |
| 7 | ******************** |
| 8 | |
| 9 | |
| 10 | .. _dmx_fopen: |
| 11 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 12 | DVB demux open() |
| 13 | ================ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 14 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 15 | Description |
| 16 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 17 | |
| 18 | This system call, used with a device name of /dev/dvb/adapter0/demux0, |
| 19 | allocates a new filter and returns a handle which can be used for |
| 20 | subsequent control of that filter. This call has to be made for each |
| 21 | filter to be used, i.e. every returned file descriptor is a reference to |
| 22 | a single filter. /dev/dvb/adapter0/dvr0 is a logical device to be used |
| 23 | for retrieving Transport Streams for digital video recording. When |
| 24 | reading from this device a transport stream containing the packets from |
| 25 | all PES filters set in the corresponding demux device |
| 26 | (/dev/dvb/adapter0/demux0) having the output set to DMX_OUT_TS_TAP. A |
| 27 | recorded Transport Stream is replayed by writing to this device. |
| 28 | |
| 29 | The significance of blocking or non-blocking mode is described in the |
| 30 | documentation for functions where there is a difference. It does not |
| 31 | affect the semantics of the open() call itself. A device opened in |
| 32 | blocking mode can later be put into non-blocking mode (and vice versa) |
| 33 | using the F_SETFL command of the fcntl system call. |
| 34 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 35 | Synopsis |
| 36 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 37 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 38 | .. c:function:: int open(const char *deviceName, int flags) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 39 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 40 | Arguments |
| 41 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 42 | |
| 43 | |
| 44 | |
| 45 | .. flat-table:: |
| 46 | :header-rows: 0 |
| 47 | :stub-columns: 0 |
| 48 | |
| 49 | |
| 50 | - .. row 1 |
| 51 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 52 | - const char \*deviceName |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 53 | |
| 54 | - Name of demux device. |
| 55 | |
| 56 | - .. row 2 |
| 57 | |
| 58 | - int flags |
| 59 | |
| 60 | - A bit-wise OR of the following flags: |
| 61 | |
| 62 | - .. row 3 |
| 63 | |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 64 | - |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 65 | - O_RDWR read/write access |
| 66 | |
| 67 | - .. row 4 |
| 68 | |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 69 | - |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 70 | - O_NONBLOCK open in non-blocking mode |
| 71 | |
| 72 | - .. row 5 |
| 73 | |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 74 | - |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 75 | - (blocking mode is the default) |
| 76 | |
| 77 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 78 | Return Value |
| 79 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 80 | |
| 81 | |
| 82 | |
| 83 | .. flat-table:: |
| 84 | :header-rows: 0 |
| 85 | :stub-columns: 0 |
| 86 | |
| 87 | |
| 88 | - .. row 1 |
| 89 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 90 | - ``ENODEV`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 91 | |
| 92 | - Device driver not loaded/available. |
| 93 | |
| 94 | - .. row 2 |
| 95 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 96 | - ``EINVAL`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 97 | |
| 98 | - Invalid argument. |
| 99 | |
| 100 | - .. row 3 |
| 101 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 102 | - ``EMFILE`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 103 | |
| 104 | - “Too many open files”, i.e. no more filters available. |
| 105 | |
| 106 | - .. row 4 |
| 107 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 108 | - ``ENOMEM`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 109 | |
| 110 | - The driver failed to allocate enough memory. |
| 111 | |
| 112 | |
| 113 | |
| 114 | .. _dmx_fclose: |
| 115 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 116 | DVB demux close() |
| 117 | ================= |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 118 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 119 | Description |
| 120 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 121 | |
| 122 | This system call deactivates and deallocates a filter that was |
| 123 | previously allocated via the open() call. |
| 124 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 125 | Synopsis |
| 126 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 127 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 128 | .. c:function:: int close(int fd) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 129 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 130 | Arguments |
| 131 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 132 | |
| 133 | |
| 134 | |
| 135 | .. flat-table:: |
| 136 | :header-rows: 0 |
| 137 | :stub-columns: 0 |
| 138 | |
| 139 | |
| 140 | - .. row 1 |
| 141 | |
| 142 | - int fd |
| 143 | |
| 144 | - File descriptor returned by a previous call to open(). |
| 145 | |
| 146 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 147 | Return Value |
| 148 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 149 | |
| 150 | |
| 151 | |
| 152 | .. flat-table:: |
| 153 | :header-rows: 0 |
| 154 | :stub-columns: 0 |
| 155 | |
| 156 | |
| 157 | - .. row 1 |
| 158 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 159 | - ``EBADF`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 160 | |
| 161 | - fd is not a valid open file descriptor. |
| 162 | |
| 163 | |
| 164 | |
| 165 | .. _dmx_fread: |
| 166 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 167 | DVB demux read() |
| 168 | ================ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 169 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 170 | Description |
| 171 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 172 | |
| 173 | This system call returns filtered data, which might be section or PES |
| 174 | data. The filtered data is transferred from the driver’s internal |
| 175 | circular buffer to buf. The maximum amount of data to be transferred is |
| 176 | implied by count. |
| 177 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 178 | Synopsis |
| 179 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 180 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 181 | .. c:function:: size_t read(int fd, void *buf, size_t count) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 182 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 183 | Arguments |
| 184 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 185 | |
| 186 | |
| 187 | |
| 188 | .. flat-table:: |
| 189 | :header-rows: 0 |
| 190 | :stub-columns: 0 |
| 191 | |
| 192 | |
| 193 | - .. row 1 |
| 194 | |
| 195 | - int fd |
| 196 | |
| 197 | - File descriptor returned by a previous call to open(). |
| 198 | |
| 199 | - .. row 2 |
| 200 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 201 | - void \*buf |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 202 | |
| 203 | - Pointer to the buffer to be used for returned filtered data. |
| 204 | |
| 205 | - .. row 3 |
| 206 | |
| 207 | - size_t count |
| 208 | |
| 209 | - Size of buf. |
| 210 | |
| 211 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 212 | Return Value |
| 213 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 214 | |
| 215 | |
| 216 | |
| 217 | .. flat-table:: |
| 218 | :header-rows: 0 |
| 219 | :stub-columns: 0 |
| 220 | |
| 221 | |
| 222 | - .. row 1 |
| 223 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 224 | - ``EWOULDBLOCK`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 225 | |
| 226 | - No data to return and O_NONBLOCK was specified. |
| 227 | |
| 228 | - .. row 2 |
| 229 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 230 | - ``EBADF`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 231 | |
| 232 | - fd is not a valid open file descriptor. |
| 233 | |
| 234 | - .. row 3 |
| 235 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 236 | - ``ECRC`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 237 | |
| 238 | - Last section had a CRC error - no data returned. The buffer is |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 239 | flushed. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 240 | |
| 241 | - .. row 4 |
| 242 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 243 | - ``EOVERFLOW`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 244 | |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 245 | - |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 246 | |
| 247 | - .. row 5 |
| 248 | |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 249 | - |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 250 | - The filtered data was not read from the buffer in due time, |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 251 | resulting in non-read data being lost. The buffer is flushed. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 252 | |
| 253 | - .. row 6 |
| 254 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 255 | - ``ETIMEDOUT`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 256 | |
| 257 | - The section was not loaded within the stated timeout period. See |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 258 | ioctl DMX_SET_FILTER for how to set a timeout. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 259 | |
| 260 | - .. row 7 |
| 261 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 262 | - ``EFAULT`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 263 | |
| 264 | - The driver failed to write to the callers buffer due to an invalid |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 265 | \*buf pointer. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 266 | |
| 267 | |
| 268 | |
| 269 | .. _dmx_fwrite: |
| 270 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 271 | DVB demux write() |
| 272 | ================= |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 273 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 274 | Description |
| 275 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 276 | |
| 277 | This system call is only provided by the logical device |
| 278 | /dev/dvb/adapter0/dvr0, associated with the physical demux device that |
| 279 | provides the actual DVR functionality. It is used for replay of a |
| 280 | digitally recorded Transport Stream. Matching filters have to be defined |
| 281 | in the corresponding physical demux device, /dev/dvb/adapter0/demux0. |
| 282 | The amount of data to be transferred is implied by count. |
| 283 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 284 | Synopsis |
| 285 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 286 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 287 | .. c:function:: ssize_t write(int fd, const void *buf, size_t count) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 288 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 289 | Arguments |
| 290 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 291 | |
| 292 | |
| 293 | |
| 294 | .. flat-table:: |
| 295 | :header-rows: 0 |
| 296 | :stub-columns: 0 |
| 297 | |
| 298 | |
| 299 | - .. row 1 |
| 300 | |
| 301 | - int fd |
| 302 | |
| 303 | - File descriptor returned by a previous call to open(). |
| 304 | |
| 305 | - .. row 2 |
| 306 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 307 | - void \*buf |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 308 | |
| 309 | - Pointer to the buffer containing the Transport Stream. |
| 310 | |
| 311 | - .. row 3 |
| 312 | |
| 313 | - size_t count |
| 314 | |
| 315 | - Size of buf. |
| 316 | |
| 317 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 318 | Return Value |
| 319 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 320 | |
| 321 | |
| 322 | |
| 323 | .. flat-table:: |
| 324 | :header-rows: 0 |
| 325 | :stub-columns: 0 |
| 326 | |
| 327 | |
| 328 | - .. row 1 |
| 329 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 330 | - ``EWOULDBLOCK`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 331 | |
| 332 | - No data was written. This might happen if O_NONBLOCK was |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 333 | specified and there is no more buffer space available (if |
| 334 | O_NONBLOCK is not specified the function will block until buffer |
| 335 | space is available). |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 336 | |
| 337 | - .. row 2 |
| 338 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 339 | - ``EBUSY`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 340 | |
| 341 | - This error code indicates that there are conflicting requests. The |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 342 | corresponding demux device is setup to receive data from the |
| 343 | front- end. Make sure that these filters are stopped and that the |
| 344 | filters with input set to DMX_IN_DVR are started. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 345 | |
| 346 | - .. row 3 |
| 347 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 348 | - ``EBADF`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 349 | |
| 350 | - fd is not a valid open file descriptor. |
| 351 | |
| 352 | |
| 353 | |
| 354 | .. _DMX_START: |
| 355 | |
| 356 | DMX_START |
| 357 | ========= |
| 358 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 359 | Description |
| 360 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 361 | |
| 362 | This ioctl call is used to start the actual filtering operation defined |
| 363 | via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER. |
| 364 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 365 | Synopsis |
| 366 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 367 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 368 | .. c:function:: int ioctl( int fd, int request = DMX_START) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 369 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 370 | Arguments |
| 371 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 372 | |
| 373 | |
| 374 | |
| 375 | .. flat-table:: |
| 376 | :header-rows: 0 |
| 377 | :stub-columns: 0 |
| 378 | |
| 379 | |
| 380 | - .. row 1 |
| 381 | |
| 382 | - int fd |
| 383 | |
| 384 | - File descriptor returned by a previous call to open(). |
| 385 | |
| 386 | - .. row 2 |
| 387 | |
| 388 | - int request |
| 389 | |
| 390 | - Equals DMX_START for this command. |
| 391 | |
| 392 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 393 | Return Value |
| 394 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 395 | |
| 396 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 397 | appropriately. The generic error codes are described at the |
| 398 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 399 | |
| 400 | |
| 401 | |
| 402 | .. flat-table:: |
| 403 | :header-rows: 0 |
| 404 | :stub-columns: 0 |
| 405 | |
| 406 | |
| 407 | - .. row 1 |
| 408 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 409 | - ``EINVAL`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 410 | |
| 411 | - Invalid argument, i.e. no filtering parameters provided via the |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 412 | DMX_SET_FILTER or DMX_SET_PES_FILTER functions. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 413 | |
| 414 | - .. row 2 |
| 415 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 416 | - ``EBUSY`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 417 | |
| 418 | - This error code indicates that there are conflicting requests. |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 419 | There are active filters filtering data from another input source. |
| 420 | Make sure that these filters are stopped before starting this |
| 421 | filter. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 422 | |
| 423 | |
| 424 | |
| 425 | .. _DMX_STOP: |
| 426 | |
| 427 | DMX_STOP |
| 428 | ======== |
| 429 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 430 | Description |
| 431 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 432 | |
| 433 | This ioctl call is used to stop the actual filtering operation defined |
| 434 | via the ioctl calls DMX_SET_FILTER or DMX_SET_PES_FILTER and |
| 435 | started via the DMX_START command. |
| 436 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 437 | Synopsis |
| 438 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 439 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 440 | .. c:function:: int ioctl( int fd, int request = DMX_STOP) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 441 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 442 | Arguments |
| 443 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 444 | |
| 445 | |
| 446 | |
| 447 | .. flat-table:: |
| 448 | :header-rows: 0 |
| 449 | :stub-columns: 0 |
| 450 | |
| 451 | |
| 452 | - .. row 1 |
| 453 | |
| 454 | - int fd |
| 455 | |
| 456 | - File descriptor returned by a previous call to open(). |
| 457 | |
| 458 | - .. row 2 |
| 459 | |
| 460 | - int request |
| 461 | |
| 462 | - Equals DMX_STOP for this command. |
| 463 | |
| 464 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 465 | Return Value |
| 466 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 467 | |
| 468 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 469 | appropriately. The generic error codes are described at the |
| 470 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 471 | |
| 472 | |
| 473 | .. _DMX_SET_FILTER: |
| 474 | |
| 475 | DMX_SET_FILTER |
| 476 | ============== |
| 477 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 478 | Description |
| 479 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 480 | |
| 481 | This ioctl call sets up a filter according to the filter and mask |
| 482 | parameters provided. A timeout may be defined stating number of seconds |
| 483 | to wait for a section to be loaded. A value of 0 means that no timeout |
| 484 | should be applied. Finally there is a flag field where it is possible to |
| 485 | state whether a section should be CRC-checked, whether the filter should |
| 486 | be a ”one-shot” filter, i.e. if the filtering operation should be |
| 487 | stopped after the first section is received, and whether the filtering |
| 488 | operation should be started immediately (without waiting for a |
| 489 | DMX_START ioctl call). If a filter was previously set-up, this filter |
| 490 | will be canceled, and the receive buffer will be flushed. |
| 491 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 492 | Synopsis |
| 493 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 494 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 495 | .. c:function:: int ioctl( int fd, int request = DMX_SET_FILTER, struct dmx_sct_filter_params *params) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 496 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 497 | Arguments |
| 498 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 499 | |
| 500 | |
| 501 | |
| 502 | .. flat-table:: |
| 503 | :header-rows: 0 |
| 504 | :stub-columns: 0 |
| 505 | |
| 506 | |
| 507 | - .. row 1 |
| 508 | |
| 509 | - int fd |
| 510 | |
| 511 | - File descriptor returned by a previous call to open(). |
| 512 | |
| 513 | - .. row 2 |
| 514 | |
| 515 | - int request |
| 516 | |
| 517 | - Equals DMX_SET_FILTER for this command. |
| 518 | |
| 519 | - .. row 3 |
| 520 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 521 | - struct dmx_sct_filter_params \*params |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 522 | |
| 523 | - Pointer to structure containing filter parameters. |
| 524 | |
| 525 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 526 | Return Value |
| 527 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 528 | |
| 529 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 530 | appropriately. The generic error codes are described at the |
| 531 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 532 | |
| 533 | |
| 534 | .. _DMX_SET_PES_FILTER: |
| 535 | |
| 536 | DMX_SET_PES_FILTER |
| 537 | ================== |
| 538 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 539 | Description |
| 540 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 541 | |
| 542 | This ioctl call sets up a PES filter according to the parameters |
| 543 | provided. By a PES filter is meant a filter that is based just on the |
| 544 | packet identifier (PID), i.e. no PES header or payload filtering |
| 545 | capability is supported. |
| 546 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 547 | Synopsis |
| 548 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 549 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 550 | .. c:function:: int ioctl( int fd, int request = DMX_SET_PES_FILTER, struct dmx_pes_filter_params *params) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 551 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 552 | Arguments |
| 553 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 554 | |
| 555 | |
| 556 | |
| 557 | .. flat-table:: |
| 558 | :header-rows: 0 |
| 559 | :stub-columns: 0 |
| 560 | |
| 561 | |
| 562 | - .. row 1 |
| 563 | |
| 564 | - int fd |
| 565 | |
| 566 | - File descriptor returned by a previous call to open(). |
| 567 | |
| 568 | - .. row 2 |
| 569 | |
| 570 | - int request |
| 571 | |
| 572 | - Equals DMX_SET_PES_FILTER for this command. |
| 573 | |
| 574 | - .. row 3 |
| 575 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 576 | - struct dmx_pes_filter_params \*params |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 577 | |
| 578 | - Pointer to structure containing filter parameters. |
| 579 | |
| 580 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 581 | Return Value |
| 582 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 583 | |
| 584 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 585 | appropriately. The generic error codes are described at the |
| 586 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 587 | |
| 588 | |
| 589 | |
| 590 | .. flat-table:: |
| 591 | :header-rows: 0 |
| 592 | :stub-columns: 0 |
| 593 | |
| 594 | |
| 595 | - .. row 1 |
| 596 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 597 | - ``EBUSY`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 598 | |
| 599 | - This error code indicates that there are conflicting requests. |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame^] | 600 | There are active filters filtering data from another input source. |
| 601 | Make sure that these filters are stopped before starting this |
| 602 | filter. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 603 | |
| 604 | |
| 605 | |
| 606 | .. _DMX_SET_BUFFER_SIZE: |
| 607 | |
| 608 | DMX_SET_BUFFER_SIZE |
| 609 | =================== |
| 610 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 611 | Description |
| 612 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 613 | |
| 614 | This ioctl call is used to set the size of the circular buffer used for |
| 615 | filtered data. The default size is two maximum sized sections, i.e. if |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 616 | this function is not called a buffer size of 2 \* 4096 bytes will be |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 617 | used. |
| 618 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 619 | Synopsis |
| 620 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 621 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 622 | .. c:function:: int ioctl( int fd, int request = DMX_SET_BUFFER_SIZE, unsigned long size) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 623 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 624 | Arguments |
| 625 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 626 | |
| 627 | |
| 628 | |
| 629 | .. flat-table:: |
| 630 | :header-rows: 0 |
| 631 | :stub-columns: 0 |
| 632 | |
| 633 | |
| 634 | - .. row 1 |
| 635 | |
| 636 | - int fd |
| 637 | |
| 638 | - File descriptor returned by a previous call to open(). |
| 639 | |
| 640 | - .. row 2 |
| 641 | |
| 642 | - int request |
| 643 | |
| 644 | - Equals DMX_SET_BUFFER_SIZE for this command. |
| 645 | |
| 646 | - .. row 3 |
| 647 | |
| 648 | - unsigned long size |
| 649 | |
| 650 | - Size of circular buffer. |
| 651 | |
| 652 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 653 | Return Value |
| 654 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 655 | |
| 656 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 657 | appropriately. The generic error codes are described at the |
| 658 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 659 | |
| 660 | |
| 661 | .. _DMX_GET_EVENT: |
| 662 | |
| 663 | DMX_GET_EVENT |
| 664 | ============= |
| 665 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 666 | Description |
| 667 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 668 | |
| 669 | This ioctl call returns an event if available. If an event is not |
| 670 | available, the behavior depends on whether the device is in blocking or |
| 671 | non-blocking mode. In the latter case, the call fails immediately with |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 672 | errno set to ``EWOULDBLOCK``. In the former case, the call blocks until an |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 673 | event becomes available. |
| 674 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 675 | Synopsis |
| 676 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 677 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 678 | .. c:function:: int ioctl( int fd, int request = DMX_GET_EVENT, struct dmx_event *ev) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 679 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 680 | Arguments |
| 681 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 682 | |
| 683 | |
| 684 | |
| 685 | .. flat-table:: |
| 686 | :header-rows: 0 |
| 687 | :stub-columns: 0 |
| 688 | |
| 689 | |
| 690 | - .. row 1 |
| 691 | |
| 692 | - int fd |
| 693 | |
| 694 | - File descriptor returned by a previous call to open(). |
| 695 | |
| 696 | - .. row 2 |
| 697 | |
| 698 | - int request |
| 699 | |
| 700 | - Equals DMX_GET_EVENT for this command. |
| 701 | |
| 702 | - .. row 3 |
| 703 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 704 | - struct dmx_event \*ev |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 705 | |
| 706 | - Pointer to the location where the event is to be stored. |
| 707 | |
| 708 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 709 | Return Value |
| 710 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 711 | |
| 712 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 713 | appropriately. The generic error codes are described at the |
| 714 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 715 | |
| 716 | |
| 717 | |
| 718 | .. flat-table:: |
| 719 | :header-rows: 0 |
| 720 | :stub-columns: 0 |
| 721 | |
| 722 | |
| 723 | - .. row 1 |
| 724 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 725 | - ``EWOULDBLOCK`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 726 | |
| 727 | - There is no event pending, and the device is in non-blocking mode. |
| 728 | |
| 729 | |
| 730 | |
| 731 | .. _DMX_GET_STC: |
| 732 | |
| 733 | DMX_GET_STC |
| 734 | =========== |
| 735 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 736 | Description |
| 737 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 738 | |
| 739 | This ioctl call returns the current value of the system time counter |
| 740 | (which is driven by a PES filter of type DMX_PES_PCR). Some hardware |
| 741 | supports more than one STC, so you must specify which one by setting the |
| 742 | num field of stc before the ioctl (range 0...n). The result is returned |
| 743 | in form of a ratio with a 64 bit numerator and a 32 bit denominator, so |
| 744 | the real 90kHz STC value is stc->stc / stc->base . |
| 745 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 746 | Synopsis |
| 747 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 748 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 749 | .. c:function:: int ioctl( int fd, int request = DMX_GET_STC, struct dmx_stc *stc) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 750 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 751 | Arguments |
| 752 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 753 | |
| 754 | |
| 755 | |
| 756 | .. flat-table:: |
| 757 | :header-rows: 0 |
| 758 | :stub-columns: 0 |
| 759 | |
| 760 | |
| 761 | - .. row 1 |
| 762 | |
| 763 | - int fd |
| 764 | |
| 765 | - File descriptor returned by a previous call to open(). |
| 766 | |
| 767 | - .. row 2 |
| 768 | |
| 769 | - int request |
| 770 | |
| 771 | - Equals DMX_GET_STC for this command. |
| 772 | |
| 773 | - .. row 3 |
| 774 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 775 | - struct dmx_stc \*stc |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 776 | |
| 777 | - Pointer to the location where the stc is to be stored. |
| 778 | |
| 779 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 780 | Return Value |
| 781 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 782 | |
| 783 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 784 | appropriately. The generic error codes are described at the |
| 785 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 786 | |
| 787 | |
| 788 | |
| 789 | .. flat-table:: |
| 790 | :header-rows: 0 |
| 791 | :stub-columns: 0 |
| 792 | |
| 793 | |
| 794 | - .. row 1 |
| 795 | |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 796 | - ``EINVAL`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 797 | |
| 798 | - Invalid stc number. |
| 799 | |
| 800 | |
| 801 | |
| 802 | .. _DMX_GET_PES_PIDS: |
| 803 | |
| 804 | DMX_GET_PES_PIDS |
| 805 | ================ |
| 806 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 807 | Description |
| 808 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 809 | |
| 810 | This ioctl is undocumented. Documentation is welcome. |
| 811 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 812 | Synopsis |
| 813 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 814 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 815 | .. c:function:: int ioctl(fd, int request = DMX_GET_PES_PIDS, __u16[5]) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 816 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 817 | Arguments |
| 818 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 819 | |
| 820 | |
| 821 | |
| 822 | .. flat-table:: |
| 823 | :header-rows: 0 |
| 824 | :stub-columns: 0 |
| 825 | |
| 826 | |
| 827 | - .. row 1 |
| 828 | |
| 829 | - int fd |
| 830 | |
| 831 | - File descriptor returned by a previous call to open(). |
| 832 | |
| 833 | - .. row 2 |
| 834 | |
| 835 | - int request |
| 836 | |
| 837 | - Equals DMX_GET_PES_PIDS for this command. |
| 838 | |
| 839 | - .. row 3 |
| 840 | |
| 841 | - __u16[5] |
| 842 | |
| 843 | - Undocumented. |
| 844 | |
| 845 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 846 | Return Value |
| 847 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 848 | |
| 849 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 850 | appropriately. The generic error codes are described at the |
| 851 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 852 | |
| 853 | |
| 854 | .. _DMX_GET_CAPS: |
| 855 | |
| 856 | DMX_GET_CAPS |
| 857 | ============ |
| 858 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 859 | Description |
| 860 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 861 | |
| 862 | This ioctl is undocumented. Documentation is welcome. |
| 863 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 864 | Synopsis |
| 865 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 866 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 867 | .. c:function:: int ioctl(fd, int request = DMX_GET_CAPS, dmx_caps_t *) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 868 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 869 | Arguments |
| 870 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 871 | |
| 872 | |
| 873 | |
| 874 | .. flat-table:: |
| 875 | :header-rows: 0 |
| 876 | :stub-columns: 0 |
| 877 | |
| 878 | |
| 879 | - .. row 1 |
| 880 | |
| 881 | - int fd |
| 882 | |
| 883 | - File descriptor returned by a previous call to open(). |
| 884 | |
| 885 | - .. row 2 |
| 886 | |
| 887 | - int request |
| 888 | |
| 889 | - Equals DMX_GET_CAPS for this command. |
| 890 | |
| 891 | - .. row 3 |
| 892 | |
| 893 | - dmx_caps_t * |
| 894 | |
| 895 | - Undocumented. |
| 896 | |
| 897 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 898 | Return Value |
| 899 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 900 | |
| 901 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 902 | appropriately. The generic error codes are described at the |
| 903 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 904 | |
| 905 | |
| 906 | .. _DMX_SET_SOURCE: |
| 907 | |
| 908 | DMX_SET_SOURCE |
| 909 | ============== |
| 910 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 911 | Description |
| 912 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 913 | |
| 914 | This ioctl is undocumented. Documentation is welcome. |
| 915 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 916 | Synopsis |
| 917 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 918 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 919 | .. c:function:: int ioctl(fd, int request = DMX_SET_SOURCE, dmx_source_t *) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 920 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 921 | Arguments |
| 922 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 923 | |
| 924 | |
| 925 | |
| 926 | .. flat-table:: |
| 927 | :header-rows: 0 |
| 928 | :stub-columns: 0 |
| 929 | |
| 930 | |
| 931 | - .. row 1 |
| 932 | |
| 933 | - int fd |
| 934 | |
| 935 | - File descriptor returned by a previous call to open(). |
| 936 | |
| 937 | - .. row 2 |
| 938 | |
| 939 | - int request |
| 940 | |
| 941 | - Equals DMX_SET_SOURCE for this command. |
| 942 | |
| 943 | - .. row 3 |
| 944 | |
| 945 | - dmx_source_t * |
| 946 | |
| 947 | - Undocumented. |
| 948 | |
| 949 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 950 | Return Value |
| 951 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 952 | |
| 953 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 954 | appropriately. The generic error codes are described at the |
| 955 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 956 | |
| 957 | |
| 958 | .. _DMX_ADD_PID: |
| 959 | |
| 960 | DMX_ADD_PID |
| 961 | =========== |
| 962 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 963 | Description |
| 964 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 965 | |
| 966 | This ioctl call allows to add multiple PIDs to a transport stream filter |
| 967 | previously set up with DMX_SET_PES_FILTER and output equal to |
| 968 | DMX_OUT_TSDEMUX_TAP. |
| 969 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 970 | Synopsis |
| 971 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 972 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 973 | .. c:function:: int ioctl(fd, int request = DMX_ADD_PID, __u16 *) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 974 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 975 | Arguments |
| 976 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 977 | |
| 978 | |
| 979 | |
| 980 | .. flat-table:: |
| 981 | :header-rows: 0 |
| 982 | :stub-columns: 0 |
| 983 | |
| 984 | |
| 985 | - .. row 1 |
| 986 | |
| 987 | - int fd |
| 988 | |
| 989 | - File descriptor returned by a previous call to open(). |
| 990 | |
| 991 | - .. row 2 |
| 992 | |
| 993 | - int request |
| 994 | |
| 995 | - Equals DMX_ADD_PID for this command. |
| 996 | |
| 997 | - .. row 3 |
| 998 | |
| 999 | - __u16 * |
| 1000 | |
| 1001 | - PID number to be filtered. |
| 1002 | |
| 1003 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 1004 | Return Value |
| 1005 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1006 | |
| 1007 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 1008 | appropriately. The generic error codes are described at the |
| 1009 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 1010 | |
| 1011 | |
| 1012 | .. _DMX_REMOVE_PID: |
| 1013 | |
| 1014 | DMX_REMOVE_PID |
| 1015 | ============== |
| 1016 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 1017 | Description |
| 1018 | ----------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1019 | |
| 1020 | This ioctl call allows to remove a PID when multiple PIDs are set on a |
| 1021 | transport stream filter, e. g. a filter previously set up with output |
| 1022 | equal to DMX_OUT_TSDEMUX_TAP, created via either |
| 1023 | DMX_SET_PES_FILTER or DMX_ADD_PID. |
| 1024 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 1025 | Synopsis |
| 1026 | -------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1027 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 1028 | .. c:function:: int ioctl(fd, int request = DMX_REMOVE_PID, __u16 *) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1029 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 1030 | Arguments |
| 1031 | ---------- |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1032 | |
| 1033 | |
| 1034 | |
| 1035 | .. flat-table:: |
| 1036 | :header-rows: 0 |
| 1037 | :stub-columns: 0 |
| 1038 | |
| 1039 | |
| 1040 | - .. row 1 |
| 1041 | |
| 1042 | - int fd |
| 1043 | |
| 1044 | - File descriptor returned by a previous call to open(). |
| 1045 | |
| 1046 | - .. row 2 |
| 1047 | |
| 1048 | - int request |
| 1049 | |
| 1050 | - Equals DMX_REMOVE_PID for this command. |
| 1051 | |
| 1052 | - .. row 3 |
| 1053 | |
| 1054 | - __u16 * |
| 1055 | |
| 1056 | - PID of the PES filter to be removed. |
| 1057 | |
| 1058 | |
Mauro Carvalho Chehab | 94fff0dc | 2016-07-04 11:29:35 -0300 | [diff] [blame] | 1059 | Return Value |
| 1060 | ------------ |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1061 | |
| 1062 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 1063 | appropriately. The generic error codes are described at the |
| 1064 | :ref:`Generic Error Codes <gen-errors>` chapter. |