libdvbv5: lib/include/libdvbv5/desc_extension.h Source File

libdvbv5 1.30.1 Library to work with Digital TV devices on Linux

desc_extension.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013-2014 - Mauro Carvalho Chehab <mchehab@kernel.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation version 2.1 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
17 *
18 */
19
38
39#ifndef _EXTENSION_DESC_H
40#define _EXTENSION_DESC_H
41
42#include <libdvbv5/descriptors.h>
43
44struct dvb_v5_fe_parms;
45
89 enum extension_descriptors {
90 image_icon_descriptor = 0x00,
91 cpcm_delivery_signalling_descriptor = 0x01,
92 CP_descriptor = 0x02,
93 CP_identifier_descriptor = 0x03,
94 T2_delivery_system_descriptor = 0x04,
95 SH_delivery_system_descriptor = 0x05,
96 supplementary_audio_descriptor = 0x06,
97 network_change_notify_descriptor = 0x07,
98 message_descriptor = 0x08,
99 target_region_descriptor = 0x09,
100 target_region_name_descriptor = 0x0a,
101 service_relocated_descriptor = 0x0b,
102};
103
115 struct dvb_extension_descriptor {
116 uint8_t type;
117 uint8_t length;
118 struct dvb_desc *next;
119
120 uint8_t extension_code;
121
122 struct dvb_desc *descriptor;
123} __attribute__((packed));
124
125
135 typedef int (*dvb_desc_ext_init_func) (struct dvb_v5_fe_parms *parms,
136 const uint8_t *buf,
137 struct dvb_extension_descriptor *ext,
138 void *desc);
147 typedef void (*dvb_desc_ext_print_func)(struct dvb_v5_fe_parms *parms,
148 const struct dvb_extension_descriptor *ext,
149 const void *desc);
156 typedef void (*dvb_desc_ext_free_func) (const void *desc);
157
170 struct dvb_ext_descriptor {
171 const char *name;
172 dvb_desc_ext_init_func init;
173 dvb_desc_ext_print_func print;
174 dvb_desc_ext_free_func free;
175 ssize_t size;
176};
177
178
179#ifdef __cplusplus
180extern "C" {
181#endif
182
198 int dvb_extension_descriptor_init(struct dvb_v5_fe_parms *parms,
199 const uint8_t *buf, struct dvb_desc *desc);
200
208 void dvb_extension_descriptor_print(struct dvb_v5_fe_parms *parms,
209 const struct dvb_desc *desc);
210
217 void dvb_extension_descriptor_free(struct dvb_desc *desc);
218
219#ifdef __cplusplus
220}
221#endif
222
223#endif
SH_delivery_system_descriptor
@ SH_delivery_system_descriptor
DVB-SH delivery system descriptor.
Definition desc_extension.h:95
supplementary_audio_descriptor
@ supplementary_audio_descriptor
supplementary audio descriptor
Definition desc_extension.h:96
target_region_name_descriptor
@ target_region_name_descriptor
target region name descriptor
Definition desc_extension.h:100
target_region_descriptor
@ target_region_descriptor
target region descriptor
Definition desc_extension.h:99
image_icon_descriptor
@ image_icon_descriptor
image icon descriptor
Definition desc_extension.h:90
T2_delivery_system_descriptor
@ T2_delivery_system_descriptor
DVB-T2 delivery system descriptor.
Definition desc_extension.h:94
message_descriptor
@ message_descriptor
message descriptor
Definition desc_extension.h:98
cpcm_delivery_signalling_descriptor
@ cpcm_delivery_signalling_descriptor
Content Protection/Copy Management (CPCM) delivery signalling descriptor.
Definition desc_extension.h:91
network_change_notify_descriptor
@ network_change_notify_descriptor
network change notify descriptor
Definition desc_extension.h:97
CP_identifier_descriptor
@ CP_identifier_descriptor
Content Protection identifier descriptor.
Definition desc_extension.h:93
CP_descriptor
@ CP_descriptor
Content Protection descriptor.
Definition desc_extension.h:92
service_relocated_descriptor
@ service_relocated_descriptor
service relocated descriptor
Definition desc_extension.h:101
descriptors.h
Provides a way to handle MPEG-TS descriptors found on Digital TV streams.
dvb_extension_descriptor_print
void dvb_extension_descriptor_print(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc)
Prints the content of the extended descriptor.
dvb_extension_descriptor_init
int dvb_extension_descriptor_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc)
Initializes and parses the extended descriptor.
extension_descriptors
extension_descriptors
List containing all extended descriptors used by Digital TV MPEG-TS as defined at ETSI EN 300 468 V1....
Definition desc_extension.h:89
dvb_extension_descriptor_free
void dvb_extension_descriptor_free(struct dvb_desc *desc)
Frees all data allocated by the extended descriptor.
dvb_desc_ext_print_func
void(* dvb_desc_ext_print_func)(struct dvb_v5_fe_parms *parms, const struct dvb_extension_descriptor *ext, const void *desc)
Function prototype for the extended descriptors parsing print code.
Definition desc_extension.h:147
dvb_desc_ext_init_func
int(* dvb_desc_ext_init_func)(struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_extension_descriptor *ext, void *desc)
Function prototype for the extended descriptors parsing init code.
Definition desc_extension.h:135
dvb_desc_ext_free_func
void(* dvb_desc_ext_free_func)(const void *desc)
Function prototype for the extended descriptors parsing free code.
Definition desc_extension.h:156
dvb_desc
Linked list containing the several descriptors found on a MPEG-TS table.
Definition descriptors.h:117
dvb_ext_descriptor
Structure that describes the parser functions for the extended descriptors.
Definition desc_extension.h:170
dvb_ext_descriptor::free
dvb_desc_ext_free_func free
Definition desc_extension.h:174
dvb_ext_descriptor::name
const char * name
Definition desc_extension.h:171
dvb_ext_descriptor::size
ssize_t size
Definition desc_extension.h:175
dvb_ext_descriptor::init
dvb_desc_ext_init_func init
Definition desc_extension.h:172
dvb_ext_descriptor::print
dvb_desc_ext_print_func print
Definition desc_extension.h:173
dvb_extension_descriptor
Structure containing the extended descriptors.
Definition desc_extension.h:115
dvb_extension_descriptor::extension_code
uint8_t extension_code
Definition desc_extension.h:120
dvb_extension_descriptor::next
struct dvb_desc * next
Definition desc_extension.h:118
dvb_extension_descriptor::descriptor
struct dvb_desc * descriptor
Definition desc_extension.h:122
dvb_extension_descriptor::type
uint8_t type
Definition desc_extension.h:116
dvb_extension_descriptor::length
uint8_t length
Definition desc_extension.h:117
dvb_v5_fe_parms
Keeps data needed to handle the DVB frontend.
Definition dvb-fe.h:117