libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
vct.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013 - Mauro Carvalho Chehab <mchehab@kernel.org>
3 * Copyright (c) 2013 - 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
40#ifndef _VCT_H
41#define _VCT_H
42
43#include <stdint.h>
44#include <unistd.h> /* ssize_t */
45
47
59#define ATSC_TABLE_TVCT 0xc8
60#define ATSC_TABLE_CVCT 0xc9
61#define ATSC_TABLE_VCT_PID 0x1ffb
62
102 uint16_t __short_name[7];
103
104 union {
105 uint32_t bitfield1;
106 struct {
107 uint32_t modulation_mode:8;
110 uint32_t reserved1:4;
111 } __attribute__((packed));
112 } __attribute__((packed));
113
115 uint16_t channel_tsid;
117 union {
118 uint16_t bitfield2;
119 struct {
120 uint16_t service_type:6;
121 uint16_t reserved2:3;
122 uint16_t hide_guide:1;
123 uint16_t out_of_band:1; /* CVCT only */
124 uint16_t path_select:1; /* CVCT only */
125 uint16_t hidden:1;
127 uint16_t ETM_location:2;
128
129 } __attribute__((packed));
130 } __attribute__((packed));
131
132 uint16_t source_id;
133 union {
134 uint16_t bitfield3;
135 struct {
137 uint16_t reserved3:6;
138 } __attribute__((packed));
139 } __attribute__((packed));
140
141 /*
142 * Everything after atsc_table_vct_channel::descriptor (including it)
143 * won't be bit-mapped to the data parsed from the MPEG TS. So,
144 * metadata are added there
145 */
148
149 /* The channel_short_name is converted to locale charset by vct.c */
150
151 char short_name[32];
152} __attribute__((packed));
153
171
173
176} __attribute__((packed));
177
188 uint16_t bitfield;
189 struct {
190 uint16_t descriptor_length:10;
191 uint16_t reserved:6;
192 } __attribute__((packed));
193} __attribute__((packed));
194
202 #define atsc_vct_channel_foreach(_channel, _vct) \
203 if (_vct && _vct->channel) \
204 for (struct atsc_table_vct_channel *_channel = _vct->channel; _channel; _channel = _channel->next) \
205
206struct dvb_v5_fe_parms;
207
208#ifdef __cplusplus
209extern "C" {
210#endif
211
228ssize_t atsc_table_vct_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
229 ssize_t buflen, struct atsc_table_vct **table);
245 struct atsc_table_vct *table);
246
247#ifdef __cplusplus
248}
249#endif
250
251#endif
Provides some common ATSC stuff.
void atsc_table_vct_free(struct atsc_table_vct *table)
Frees all data allocated by the VCT table parser.
void atsc_table_vct_print(struct dvb_v5_fe_parms *parms, struct atsc_table_vct *table)
Prints the content of the VCT table.
ssize_t atsc_table_vct_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct atsc_table_vct **table)
Initializes and parses VCT table.
ATSC VCT channel table (covers both CVCT and TVCT)
Definition: vct.h:101
uint16_t program_number
Definition: vct.h:116
uint16_t reserved2
Definition: vct.h:121
uint16_t access_controlled
Definition: vct.h:126
uint16_t reserved3
Definition: vct.h:137
struct atsc_table_vct_channel * next
Definition: vct.h:147
uint16_t bitfield2
Definition: vct.h:118
uint32_t reserved1
Definition: vct.h:110
struct dvb_desc * descriptor
Definition: vct.h:146
uint16_t __short_name[7]
Definition: vct.h:102
char short_name[32]
Definition: vct.h:151
uint16_t service_type
Definition: vct.h:120
uint16_t out_of_band
Definition: vct.h:123
uint32_t modulation_mode
Definition: vct.h:107
uint16_t hide_guide
Definition: vct.h:122
uint32_t minor_channel_number
Definition: vct.h:108
uint16_t ETM_location
Definition: vct.h:127
uint32_t major_channel_number
Definition: vct.h:109
uint16_t path_select
Definition: vct.h:124
uint16_t hidden
Definition: vct.h:125
uint16_t channel_tsid
Definition: vct.h:115
uint16_t source_id
Definition: vct.h:132
uint16_t bitfield3
Definition: vct.h:134
uint16_t descriptors_length
Definition: vct.h:136
uint32_t bitfield1
Definition: vct.h:105
uint32_t carrier_frequency
Definition: vct.h:114
ATSC VCT table (covers both CVCT and TVCT)
Definition: vct.h:168
uint8_t protocol_version
Definition: vct.h:170
struct dvb_table_header header
Definition: vct.h:169
struct atsc_table_vct_channel * channel
Definition: vct.h:174
uint8_t num_channels_in_section
Definition: vct.h:172
struct dvb_desc * descriptor
Definition: vct.h:175
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
Keeps data needed to handle the DVB frontend.
Definition: dvb-fe.h:117
ATSC VCT descriptor length.
Definition: vct.h:187