libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
header.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 * Described at ISO/IEC 13818-1
20 */
21
22#ifndef _HEADER_H
23#define _HEADER_H
24
25#include <stdint.h>
26#include <unistd.h> /* ssize_t */
27
58 uint8_t sync_byte;
59 union {
60 uint16_t bitfield;
61 struct {
62 uint16_t pid:13;
66 } __attribute__((packed));
67 } __attribute__((packed));
71
72 /* Only if adaptation_field_control > 1 */
74 /* Only if adaptation_field_length >= 1 */
75 struct {
76 uint8_t extension:1;
77 uint8_t private_data:1;
78 uint8_t splicing_point:1;
79 uint8_t OPCR:1;
80 uint8_t PCR:1;
81 uint8_t priority:1;
82 uint8_t random_access:1;
83 uint8_t discontinued:1;
84 } __attribute__((packed));
85} __attribute__((packed));
86
104 uint8_t table_id;
105 union {
106 uint16_t bitfield;
107 struct {
108 uint16_t section_length:12;
109 uint8_t one:2;
110 uint8_t zero:1;
111 uint8_t syntax:1;
112 } __attribute__((packed));
113 } __attribute__((packed));
114 uint16_t id; /* TS ID */
115 uint8_t current_next:1;
116 uint8_t version:5;
117 uint8_t one2:2;
118
119 uint8_t section_id; /* section_number */
120 uint8_t last_section; /* last_section_number */
121} __attribute__((packed));
122
123struct dvb_v5_fe_parms;
124
125#ifdef __cplusplus
126extern "C" {
127#endif
128
144 const struct dvb_table_header *header);
145
146#ifdef __cplusplus
147}
148#endif
149
150#endif
void dvb_table_header_init(struct dvb_table_header *header)
Initializes and parses MPEG-TS table header.
void dvb_table_header_print(struct dvb_v5_fe_parms *parms, const struct dvb_table_header *header)
Prints the content of the MPEG-TS table header.
Header of a MPEG-TS table.
Definition: header.h:103
uint8_t section_id
Definition: header.h:119
uint8_t zero
Definition: header.h:110
uint8_t syntax
Definition: header.h:111
uint8_t version
Definition: header.h:116
uint16_t id
Definition: header.h:114
uint8_t one
Definition: header.h:109
uint16_t section_length
Definition: header.h:108
uint8_t one2
Definition: header.h:117
uint8_t table_id
Definition: header.h:104
uint8_t current_next
Definition: header.h:115
uint8_t last_section
Definition: header.h:120
uint16_t bitfield
Definition: header.h:106
Header of a MPEG-TS transport packet.
Definition: header.h:57
uint16_t pid
Definition: header.h:62
uint8_t sync_byte
Definition: header.h:58
uint8_t splicing_point
Definition: header.h:78
uint16_t transport_priority
Definition: header.h:63
uint8_t random_access
Definition: header.h:82
uint8_t transport_scrambling_control
Definition: header.h:70
uint16_t payload_unit_start_indicator
Definition: header.h:64
uint8_t extension
Definition: header.h:76
uint8_t priority
Definition: header.h:81
uint8_t adaptation_field_length
Definition: header.h:73
uint16_t transport_error_indicator
Definition: header.h:65
uint8_t discontinued
Definition: header.h:83
uint8_t adaptation_field_control
Definition: header.h:69
uint8_t continuity_counter
Definition: header.h:68
uint16_t bitfield
Definition: header.h:60
uint8_t private_data
Definition: header.h:77
Keeps data needed to handle the DVB frontend.
Definition: dvb-fe.h:117