Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux/dvb
File: dmx.h
/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* dmx.h
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
[4] Fix | Delete
* & Ralph Metzler <ralph@convergence.de>
[5] Fix | Delete
* for convergence integrated media GmbH
[6] Fix | Delete
*
[7] Fix | Delete
* This program is free software; you can redistribute it and/or
[8] Fix | Delete
* modify it under the terms of the GNU Lesser General Public License
[9] Fix | Delete
* as published by the Free Software Foundation; either version 2.1
[10] Fix | Delete
* of the License, or (at your option) any later version.
[11] Fix | Delete
*
[12] Fix | Delete
* This program is distributed in the hope that it will be useful,
[13] Fix | Delete
* but WITHOUT ANY WARRANTY; without even the implied warranty of
[14] Fix | Delete
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[15] Fix | Delete
* GNU General Public License for more details.
[16] Fix | Delete
*
[17] Fix | Delete
* You should have received a copy of the GNU Lesser General Public License
[18] Fix | Delete
* along with this program; if not, write to the Free Software
[19] Fix | Delete
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
[20] Fix | Delete
*
[21] Fix | Delete
*/
[22] Fix | Delete
[23] Fix | Delete
#ifndef _DVBDMX_H_
[24] Fix | Delete
#define _DVBDMX_H_
[25] Fix | Delete
[26] Fix | Delete
#include <linux/types.h>
[27] Fix | Delete
#include <time.h>
[28] Fix | Delete
[29] Fix | Delete
[30] Fix | Delete
#define DMX_FILTER_SIZE 16
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* enum dmx_output - Output for the demux.
[34] Fix | Delete
*
[35] Fix | Delete
* @DMX_OUT_DECODER:
[36] Fix | Delete
* Streaming directly to decoder.
[37] Fix | Delete
* @DMX_OUT_TAP:
[38] Fix | Delete
* Output going to a memory buffer (to be retrieved via the read command).
[39] Fix | Delete
* Delivers the stream output to the demux device on which the ioctl
[40] Fix | Delete
* is called.
[41] Fix | Delete
* @DMX_OUT_TS_TAP:
[42] Fix | Delete
* Output multiplexed into a new TS (to be retrieved by reading from the
[43] Fix | Delete
* logical DVR device). Routes output to the logical DVR device
[44] Fix | Delete
* ``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from all
[45] Fix | Delete
* filters for which @DMX_OUT_TS_TAP was specified.
[46] Fix | Delete
* @DMX_OUT_TSDEMUX_TAP:
[47] Fix | Delete
* Like @DMX_OUT_TS_TAP but retrieved from the DMX device.
[48] Fix | Delete
*/
[49] Fix | Delete
enum dmx_output {
[50] Fix | Delete
DMX_OUT_DECODER,
[51] Fix | Delete
DMX_OUT_TAP,
[52] Fix | Delete
DMX_OUT_TS_TAP,
[53] Fix | Delete
DMX_OUT_TSDEMUX_TAP
[54] Fix | Delete
};
[55] Fix | Delete
[56] Fix | Delete
[57] Fix | Delete
/**
[58] Fix | Delete
* enum dmx_input - Input from the demux.
[59] Fix | Delete
*
[60] Fix | Delete
* @DMX_IN_FRONTEND: Input from a front-end device.
[61] Fix | Delete
* @DMX_IN_DVR: Input from the logical DVR device.
[62] Fix | Delete
*/
[63] Fix | Delete
enum dmx_input {
[64] Fix | Delete
DMX_IN_FRONTEND,
[65] Fix | Delete
DMX_IN_DVR
[66] Fix | Delete
};
[67] Fix | Delete
[68] Fix | Delete
/**
[69] Fix | Delete
* enum dmx_ts_pes - type of the PES filter.
[70] Fix | Delete
*
[71] Fix | Delete
* @DMX_PES_AUDIO0: first audio PID. Also referred as @DMX_PES_AUDIO.
[72] Fix | Delete
* @DMX_PES_VIDEO0: first video PID. Also referred as @DMX_PES_VIDEO.
[73] Fix | Delete
* @DMX_PES_TELETEXT0: first teletext PID. Also referred as @DMX_PES_TELETEXT.
[74] Fix | Delete
* @DMX_PES_SUBTITLE0: first subtitle PID. Also referred as @DMX_PES_SUBTITLE.
[75] Fix | Delete
* @DMX_PES_PCR0: first Program Clock Reference PID.
[76] Fix | Delete
* Also referred as @DMX_PES_PCR.
[77] Fix | Delete
*
[78] Fix | Delete
* @DMX_PES_AUDIO1: second audio PID.
[79] Fix | Delete
* @DMX_PES_VIDEO1: second video PID.
[80] Fix | Delete
* @DMX_PES_TELETEXT1: second teletext PID.
[81] Fix | Delete
* @DMX_PES_SUBTITLE1: second subtitle PID.
[82] Fix | Delete
* @DMX_PES_PCR1: second Program Clock Reference PID.
[83] Fix | Delete
*
[84] Fix | Delete
* @DMX_PES_AUDIO2: third audio PID.
[85] Fix | Delete
* @DMX_PES_VIDEO2: third video PID.
[86] Fix | Delete
* @DMX_PES_TELETEXT2: third teletext PID.
[87] Fix | Delete
* @DMX_PES_SUBTITLE2: third subtitle PID.
[88] Fix | Delete
* @DMX_PES_PCR2: third Program Clock Reference PID.
[89] Fix | Delete
*
[90] Fix | Delete
* @DMX_PES_AUDIO3: fourth audio PID.
[91] Fix | Delete
* @DMX_PES_VIDEO3: fourth video PID.
[92] Fix | Delete
* @DMX_PES_TELETEXT3: fourth teletext PID.
[93] Fix | Delete
* @DMX_PES_SUBTITLE3: fourth subtitle PID.
[94] Fix | Delete
* @DMX_PES_PCR3: fourth Program Clock Reference PID.
[95] Fix | Delete
*
[96] Fix | Delete
* @DMX_PES_OTHER: any other PID.
[97] Fix | Delete
*/
[98] Fix | Delete
[99] Fix | Delete
enum dmx_ts_pes {
[100] Fix | Delete
DMX_PES_AUDIO0,
[101] Fix | Delete
DMX_PES_VIDEO0,
[102] Fix | Delete
DMX_PES_TELETEXT0,
[103] Fix | Delete
DMX_PES_SUBTITLE0,
[104] Fix | Delete
DMX_PES_PCR0,
[105] Fix | Delete
[106] Fix | Delete
DMX_PES_AUDIO1,
[107] Fix | Delete
DMX_PES_VIDEO1,
[108] Fix | Delete
DMX_PES_TELETEXT1,
[109] Fix | Delete
DMX_PES_SUBTITLE1,
[110] Fix | Delete
DMX_PES_PCR1,
[111] Fix | Delete
[112] Fix | Delete
DMX_PES_AUDIO2,
[113] Fix | Delete
DMX_PES_VIDEO2,
[114] Fix | Delete
DMX_PES_TELETEXT2,
[115] Fix | Delete
DMX_PES_SUBTITLE2,
[116] Fix | Delete
DMX_PES_PCR2,
[117] Fix | Delete
[118] Fix | Delete
DMX_PES_AUDIO3,
[119] Fix | Delete
DMX_PES_VIDEO3,
[120] Fix | Delete
DMX_PES_TELETEXT3,
[121] Fix | Delete
DMX_PES_SUBTITLE3,
[122] Fix | Delete
DMX_PES_PCR3,
[123] Fix | Delete
[124] Fix | Delete
DMX_PES_OTHER
[125] Fix | Delete
};
[126] Fix | Delete
[127] Fix | Delete
#define DMX_PES_AUDIO DMX_PES_AUDIO0
[128] Fix | Delete
#define DMX_PES_VIDEO DMX_PES_VIDEO0
[129] Fix | Delete
#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
[130] Fix | Delete
#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
[131] Fix | Delete
#define DMX_PES_PCR DMX_PES_PCR0
[132] Fix | Delete
[133] Fix | Delete
[134] Fix | Delete
[135] Fix | Delete
/**
[136] Fix | Delete
* struct dmx_filter - Specifies a section header filter.
[137] Fix | Delete
*
[138] Fix | Delete
* @filter: bit array with bits to be matched at the section header.
[139] Fix | Delete
* @mask: bits that are valid at the filter bit array.
[140] Fix | Delete
* @mode: mode of match: if bit is zero, it will match if equal (positive
[141] Fix | Delete
* match); if bit is one, it will match if the bit is negated.
[142] Fix | Delete
*
[143] Fix | Delete
* Note: All arrays in this struct have a size of DMX_FILTER_SIZE (16 bytes).
[144] Fix | Delete
*/
[145] Fix | Delete
struct dmx_filter {
[146] Fix | Delete
__u8 filter[DMX_FILTER_SIZE];
[147] Fix | Delete
__u8 mask[DMX_FILTER_SIZE];
[148] Fix | Delete
__u8 mode[DMX_FILTER_SIZE];
[149] Fix | Delete
};
[150] Fix | Delete
[151] Fix | Delete
/**
[152] Fix | Delete
* struct dmx_sct_filter_params - Specifies a section filter.
[153] Fix | Delete
*
[154] Fix | Delete
* @pid: PID to be filtered.
[155] Fix | Delete
* @filter: section header filter, as defined by &struct dmx_filter.
[156] Fix | Delete
* @timeout: maximum time to filter, in milliseconds.
[157] Fix | Delete
* @flags: extra flags for the section filter.
[158] Fix | Delete
*
[159] Fix | Delete
* Carries the configuration for a MPEG-TS section filter.
[160] Fix | Delete
*
[161] Fix | Delete
* The @flags can be:
[162] Fix | Delete
*
[163] Fix | Delete
* - %DMX_CHECK_CRC - only deliver sections where the CRC check succeeded;
[164] Fix | Delete
* - %DMX_ONESHOT - disable the section filter after one section
[165] Fix | Delete
* has been delivered;
[166] Fix | Delete
* - %DMX_IMMEDIATE_START - Start filter immediately without requiring a
[167] Fix | Delete
* :ref:`DMX_START`.
[168] Fix | Delete
*/
[169] Fix | Delete
struct dmx_sct_filter_params {
[170] Fix | Delete
__u16 pid;
[171] Fix | Delete
struct dmx_filter filter;
[172] Fix | Delete
__u32 timeout;
[173] Fix | Delete
__u32 flags;
[174] Fix | Delete
#define DMX_CHECK_CRC 1
[175] Fix | Delete
#define DMX_ONESHOT 2
[176] Fix | Delete
#define DMX_IMMEDIATE_START 4
[177] Fix | Delete
};
[178] Fix | Delete
[179] Fix | Delete
/**
[180] Fix | Delete
* struct dmx_pes_filter_params - Specifies Packetized Elementary Stream (PES)
[181] Fix | Delete
* filter parameters.
[182] Fix | Delete
*
[183] Fix | Delete
* @pid: PID to be filtered.
[184] Fix | Delete
* @input: Demux input, as specified by &enum dmx_input.
[185] Fix | Delete
* @output: Demux output, as specified by &enum dmx_output.
[186] Fix | Delete
* @pes_type: Type of the pes filter, as specified by &enum dmx_pes_type.
[187] Fix | Delete
* @flags: Demux PES flags.
[188] Fix | Delete
*/
[189] Fix | Delete
struct dmx_pes_filter_params {
[190] Fix | Delete
__u16 pid;
[191] Fix | Delete
enum dmx_input input;
[192] Fix | Delete
enum dmx_output output;
[193] Fix | Delete
enum dmx_ts_pes pes_type;
[194] Fix | Delete
__u32 flags;
[195] Fix | Delete
};
[196] Fix | Delete
[197] Fix | Delete
/**
[198] Fix | Delete
* struct dmx_stc - Stores System Time Counter (STC) information.
[199] Fix | Delete
*
[200] Fix | Delete
* @num: input data: number of the STC, from 0 to N.
[201] Fix | Delete
* @base: output: divisor for STC to get 90 kHz clock.
[202] Fix | Delete
* @stc: output: stc in @base * 90 kHz units.
[203] Fix | Delete
*/
[204] Fix | Delete
struct dmx_stc {
[205] Fix | Delete
unsigned int num;
[206] Fix | Delete
unsigned int base;
[207] Fix | Delete
__u64 stc;
[208] Fix | Delete
};
[209] Fix | Delete
[210] Fix | Delete
/**
[211] Fix | Delete
* enum dmx_buffer_flags - DMX memory-mapped buffer flags
[212] Fix | Delete
*
[213] Fix | Delete
* @DMX_BUFFER_FLAG_HAD_CRC32_DISCARD:
[214] Fix | Delete
* Indicates that the Kernel discarded one or more frames due to wrong
[215] Fix | Delete
* CRC32 checksum.
[216] Fix | Delete
* @DMX_BUFFER_FLAG_TEI:
[217] Fix | Delete
* Indicates that the Kernel has detected a Transport Error indicator
[218] Fix | Delete
* (TEI) on a filtered pid.
[219] Fix | Delete
* @DMX_BUFFER_PKT_COUNTER_MISMATCH:
[220] Fix | Delete
* Indicates that the Kernel has detected a packet counter mismatch
[221] Fix | Delete
* on a filtered pid.
[222] Fix | Delete
* @DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED:
[223] Fix | Delete
* Indicates that the Kernel has detected one or more frame discontinuity.
[224] Fix | Delete
* @DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR:
[225] Fix | Delete
* Received at least one packet with a frame discontinuity indicator.
[226] Fix | Delete
*/
[227] Fix | Delete
[228] Fix | Delete
enum dmx_buffer_flags {
[229] Fix | Delete
DMX_BUFFER_FLAG_HAD_CRC32_DISCARD = 1 << 0,
[230] Fix | Delete
DMX_BUFFER_FLAG_TEI = 1 << 1,
[231] Fix | Delete
DMX_BUFFER_PKT_COUNTER_MISMATCH = 1 << 2,
[232] Fix | Delete
DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED = 1 << 3,
[233] Fix | Delete
DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR = 1 << 4,
[234] Fix | Delete
};
[235] Fix | Delete
[236] Fix | Delete
/**
[237] Fix | Delete
* struct dmx_buffer - dmx buffer info
[238] Fix | Delete
*
[239] Fix | Delete
* @index: id number of the buffer
[240] Fix | Delete
* @bytesused: number of bytes occupied by data in the buffer (payload);
[241] Fix | Delete
* @offset: for buffers with memory == DMX_MEMORY_MMAP;
[242] Fix | Delete
* offset from the start of the device memory for this plane,
[243] Fix | Delete
* (or a "cookie" that should be passed to mmap() as offset)
[244] Fix | Delete
* @length: size in bytes of the buffer
[245] Fix | Delete
* @flags: bit array of buffer flags as defined by &enum dmx_buffer_flags.
[246] Fix | Delete
* Filled only at &DMX_DQBUF.
[247] Fix | Delete
* @count: monotonic counter for filled buffers. Helps to identify
[248] Fix | Delete
* data stream loses. Filled only at &DMX_DQBUF.
[249] Fix | Delete
*
[250] Fix | Delete
* Contains data exchanged by application and driver using one of the streaming
[251] Fix | Delete
* I/O methods.
[252] Fix | Delete
*
[253] Fix | Delete
* Please notice that, for &DMX_QBUF, only @index should be filled.
[254] Fix | Delete
* On &DMX_DQBUF calls, all fields will be filled by the Kernel.
[255] Fix | Delete
*/
[256] Fix | Delete
struct dmx_buffer {
[257] Fix | Delete
__u32 index;
[258] Fix | Delete
__u32 bytesused;
[259] Fix | Delete
__u32 offset;
[260] Fix | Delete
__u32 length;
[261] Fix | Delete
__u32 flags;
[262] Fix | Delete
__u32 count;
[263] Fix | Delete
};
[264] Fix | Delete
[265] Fix | Delete
/**
[266] Fix | Delete
* struct dmx_requestbuffers - request dmx buffer information
[267] Fix | Delete
*
[268] Fix | Delete
* @count: number of requested buffers,
[269] Fix | Delete
* @size: size in bytes of the requested buffer
[270] Fix | Delete
*
[271] Fix | Delete
* Contains data used for requesting a dmx buffer.
[272] Fix | Delete
* All reserved fields must be set to zero.
[273] Fix | Delete
*/
[274] Fix | Delete
struct dmx_requestbuffers {
[275] Fix | Delete
__u32 count;
[276] Fix | Delete
__u32 size;
[277] Fix | Delete
};
[278] Fix | Delete
[279] Fix | Delete
/**
[280] Fix | Delete
* struct dmx_exportbuffer - export of dmx buffer as DMABUF file descriptor
[281] Fix | Delete
*
[282] Fix | Delete
* @index: id number of the buffer
[283] Fix | Delete
* @flags: flags for newly created file, currently only O_CLOEXEC is
[284] Fix | Delete
* supported, refer to manual of open syscall for more details
[285] Fix | Delete
* @fd: file descriptor associated with DMABUF (set by driver)
[286] Fix | Delete
*
[287] Fix | Delete
* Contains data used for exporting a dmx buffer as DMABUF file descriptor.
[288] Fix | Delete
* The buffer is identified by a 'cookie' returned by DMX_QUERYBUF
[289] Fix | Delete
* (identical to the cookie used to mmap() the buffer to userspace). All
[290] Fix | Delete
* reserved fields must be set to zero. The field reserved0 is expected to
[291] Fix | Delete
* become a structure 'type' allowing an alternative layout of the structure
[292] Fix | Delete
* content. Therefore this field should not be used for any other extensions.
[293] Fix | Delete
*/
[294] Fix | Delete
struct dmx_exportbuffer {
[295] Fix | Delete
__u32 index;
[296] Fix | Delete
__u32 flags;
[297] Fix | Delete
__s32 fd;
[298] Fix | Delete
};
[299] Fix | Delete
[300] Fix | Delete
#define DMX_START _IO('o', 41)
[301] Fix | Delete
#define DMX_STOP _IO('o', 42)
[302] Fix | Delete
#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
[303] Fix | Delete
#define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
[304] Fix | Delete
#define DMX_SET_BUFFER_SIZE _IO('o', 45)
[305] Fix | Delete
#define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
[306] Fix | Delete
#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
[307] Fix | Delete
#define DMX_ADD_PID _IOW('o', 51, __u16)
[308] Fix | Delete
#define DMX_REMOVE_PID _IOW('o', 52, __u16)
[309] Fix | Delete
[310] Fix | Delete
[311] Fix | Delete
/* This is needed for legacy userspace support */
[312] Fix | Delete
typedef enum dmx_output dmx_output_t;
[313] Fix | Delete
typedef enum dmx_input dmx_input_t;
[314] Fix | Delete
typedef enum dmx_ts_pes dmx_pes_type_t;
[315] Fix | Delete
typedef struct dmx_filter dmx_filter_t;
[316] Fix | Delete
[317] Fix | Delete
[318] Fix | Delete
#define DMX_REQBUFS _IOWR('o', 60, struct dmx_requestbuffers)
[319] Fix | Delete
#define DMX_QUERYBUF _IOWR('o', 61, struct dmx_buffer)
[320] Fix | Delete
#define DMX_EXPBUF _IOWR('o', 62, struct dmx_exportbuffer)
[321] Fix | Delete
#define DMX_QBUF _IOWR('o', 63, struct dmx_buffer)
[322] Fix | Delete
#define DMX_DQBUF _IOWR('o', 64, struct dmx_buffer)
[323] Fix | Delete
[324] Fix | Delete
#endif /* _DVBDMX_H_ */
[325] Fix | Delete
[326] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function