libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
pmt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2012 - Mauro Carvalho Chehab
3 * Copyright (c) 2012 - Andre Roth <neolynx@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation version 2.1 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18 *
19 */
20
39#ifndef _PMT_H
40#define _PMT_H
41
42#include <stdint.h>
43#include <unistd.h> /* ssize_t */
44
45#include <libdvbv5/header.h>
46
52#define DVB_TABLE_PMT 0x02
53
141};
142
147extern const char *pmt_stream_name[];
148
173 uint8_t type;
174 union {
175 uint16_t bitfield;
176 struct {
177 uint16_t elementary_pid:13;
178 uint16_t reserved:3;
179 } __attribute__((packed));
180 } __attribute__((packed));
181 union {
182 uint16_t bitfield2;
183 struct {
184 uint16_t desc_length:10;
185 uint16_t zero:2;
186 uint16_t reserved2:4;
187 } __attribute__((packed));
188 } __attribute__((packed));
191} __attribute__((packed));
192
216 union {
217 uint16_t bitfield;
218 struct {
219 uint16_t pcr_pid:13;
220 uint16_t reserved2:3;
221 } __attribute__((packed));
222 } __attribute__((packed));
223
224 union {
225 uint16_t bitfield2;
226 struct {
227 uint16_t desc_length:10;
228 uint16_t zero3:2;
229 uint16_t reserved3:4;
230 } __attribute__((packed));
231 } __attribute__((packed));
234} __attribute__((packed));
235
237#define dvb_pmt_field_first header
238
240#define dvb_pmt_field_last descriptor
241
249#define dvb_pmt_stream_foreach(_stream, _pmt) \
250 if (_pmt && _pmt->stream) \
251 for (struct dvb_table_pmt_stream *_stream = _pmt->stream; _stream; _stream = _stream->next) \
252
253struct dvb_v5_fe_parms;
254
255#ifdef __cplusplus
256extern "C" {
257#endif
258
275ssize_t dvb_table_pmt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf,
276 ssize_t buflen, struct dvb_table_pmt **table);
277
285
294 const struct dvb_table_pmt *table);
295
296#ifdef __cplusplus
297}
298#endif
299
300#endif
const char * pmt_stream_name[]
Converts from enum dvb_streams into a string.
dvb_streams
Add support for MPEG-TS Stream types.
Definition: pmt.h:106
void dvb_table_pmt_print(struct dvb_v5_fe_parms *parms, const struct dvb_table_pmt *table)
Prints the content of the PAT table.
void dvb_table_pmt_free(struct dvb_table_pmt *table)
Frees all data allocated by the PMT table parser.
ssize_t dvb_table_pmt_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_pmt **table)
Initializes and parses PMT table.
Provides the MPEG TS table headers.
@ stream_audio_a52_vls
Definition: pmt.h:138
@ stream_14496_1_iso
ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC14496_sections.
Definition: pmt.h:125
@ stream_audio_dts
Definition: pmt.h:137
@ stream_h222
ITU-T Rec.
Definition: pmt.h:114
@ stream_audio_latm
ISO/IEC 14496-3 Audio with the LATM transport syntax as defined in ISO/IEC 14496-3 / AMD 1.
Definition: pmt.h:123
@ stream_13818_6_C
ISO/IEC 13818-6 type C.
Definition: pmt.h:118
@ stream_audio_sdds
Definition: pmt.h:134
@ stream_14496_1_pes
ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets.
Definition: pmt.h:124
@ stream_download
ISO/IEC 13818-6 Synchronized Download Protocol.
Definition: pmt.h:126
@ stream_video_moto
Definition: pmt.h:131
@ stream_h222_aux
ITU-T Rec.
Definition: pmt.h:120
@ stream_audio_adts
ISO/IEC 13818-7 Audio with ADTS transport syntax.
Definition: pmt.h:121
@ stream_video_h264
Definition: pmt.h:127
@ stream_audio_13818_3
ISO/IEC 13818-3 Audio.
Definition: pmt.h:110
@ stream_audio_14496_3
Definition: pmt.h:128
@ stream_audio_dts_hdmv
Definition: pmt.h:135
@ stream_scte_27
Definition: pmt.h:133
@ stream_13818_6_A
ISO/IEC 13818-6 type A.
Definition: pmt.h:116
@ stream_13818_6_B
ISO/IEC 13818-6 type B.
Definition: pmt.h:117
@ stream_audio_e_ac3
Definition: pmt.h:136
@ stream_private_sections
ITU-T Rec.
Definition: pmt.h:111
@ stream_video_cavs
Definition: pmt.h:130
@ stream_audio_a52
Definition: pmt.h:132
@ stream_private_data
ITU-T Rec.
Definition: pmt.h:112
@ stream_h222_1
ITU-T Rec.
Definition: pmt.h:115
@ stream_spu_vls
Definition: pmt.h:139
@ stream_video_hevc
Definition: pmt.h:129
@ stream_audio_sdds2
Definition: pmt.h:140
@ stream_video_h262
ITU-T Rec.
Definition: pmt.h:108
@ stream_video_14496_2
ISO/IEC 14496-2 Visual.
Definition: pmt.h:122
@ stream_mheg
ISO/IEC 13522 MHEG.
Definition: pmt.h:113
@ stream_audio
ISO/IEC 11172 Audio.
Definition: pmt.h:109
@ stream_13818_6_D
ISO/IEC 13818-6 type D.
Definition: pmt.h:119
@ stream_video
ISO/IEC 11172 Video.
Definition: pmt.h:107
Linked list containing the several descriptors found on a MPEG-TS table.
Definition: descriptors.h:117
Header of a MPEG-TS table.
Definition: header.h:103
MPEG-TS PMT stream table.
Definition: pmt.h:172
uint16_t reserved2
Definition: pmt.h:186
struct dvb_desc * descriptor
Definition: pmt.h:189
uint16_t reserved
Definition: pmt.h:178
uint16_t elementary_pid
Definition: pmt.h:177
uint16_t zero
Definition: pmt.h:185
uint16_t bitfield2
Definition: pmt.h:182
struct dvb_table_pmt_stream * next
Definition: pmt.h:190
uint8_t type
Definition: pmt.h:173
uint16_t bitfield
Definition: pmt.h:175
uint16_t desc_length
Definition: pmt.h:184
MPEG-TS PMT table.
Definition: pmt.h:214
uint16_t reserved2
Definition: pmt.h:220
struct dvb_table_pmt_stream * stream
Definition: pmt.h:233
uint16_t bitfield2
Definition: pmt.h:225
uint16_t zero3
Definition: pmt.h:228
uint16_t bitfield
Definition: pmt.h:217
struct dvb_desc * descriptor
Definition: pmt.h:232
struct dvb_table_header header
Definition: pmt.h:215
uint16_t reserved3
Definition: pmt.h:229
uint16_t pcr_pid
Definition: pmt.h:219
uint16_t desc_length
Definition: pmt.h:227
Keeps data needed to handle the DVB frontend.
Definition: dvb-fe.h:117