desc_extension.h
Go to the documentation of this file.
/*
* Copyright (c) 2013-2014 - Mauro Carvalho Chehab <mchehab@kernel.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation version 2.1 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*/
#ifndef _EXTENSION_DESC_H
#define _EXTENSION_DESC_H
#include <libdvbv5/descriptors.h>
struct dvb_v5_fe_parms;
enum extension_descriptors {
image_icon_descriptor = 0x00,
cpcm_delivery_signalling_descriptor = 0x01,
CP_descriptor = 0x02,
CP_identifier_descriptor = 0x03,
T2_delivery_system_descriptor = 0x04,
SH_delivery_system_descriptor = 0x05,
supplementary_audio_descriptor = 0x06,
network_change_notify_descriptor = 0x07,
message_descriptor = 0x08,
target_region_descriptor = 0x09,
target_region_name_descriptor = 0x0a,
service_relocated_descriptor = 0x0b,
};
struct dvb_extension_descriptor {
uint8_t type;
uint8_t length;
struct dvb_desc *next;
uint8_t extension_code;
struct dvb_desc *descriptor;
} __attribute__((packed));
typedef int (*dvb_desc_ext_init_func) (struct dvb_v5_fe_parms *parms,
const uint8_t *buf,
struct dvb_extension_descriptor *ext,
void *desc);
typedef void (*dvb_desc_ext_print_func)(struct dvb_v5_fe_parms *parms,
const struct dvb_extension_descriptor *ext,
const void *desc);
typedef void (*dvb_desc_ext_free_func) (const void *desc);
struct dvb_ext_descriptor {
const char *name;
dvb_desc_ext_init_func init;
dvb_desc_ext_print_func print;
dvb_desc_ext_free_func free;
ssize_t size;
};
#ifdef __cplusplus
extern "C" {
#endif
int dvb_extension_descriptor_init(struct dvb_v5_fe_parms *parms,
const uint8_t *buf, struct dvb_desc *desc);
void dvb_extension_descriptor_print(struct dvb_v5_fe_parms *parms,
const struct dvb_desc *desc);
void dvb_extension_descriptor_free(struct dvb_desc *desc);
#ifdef __cplusplus
}
#endif
#endif
extension_descriptors
extension_descriptors
Definition desc_extension.h:89
service_relocated_descriptor
@ service_relocated_descriptor
service relocated descriptor
Definition desc_extension.h:101
supplementary_audio_descriptor
@ supplementary_audio_descriptor
supplementary audio descriptor
Definition desc_extension.h:96
CP_identifier_descriptor
@ CP_identifier_descriptor
Content Protection identifier descriptor.
Definition desc_extension.h:93
cpcm_delivery_signalling_descriptor
@ cpcm_delivery_signalling_descriptor
Content Protection/Copy Management (CPCM) delivery signalling descriptor.
Definition desc_extension.h:91
CP_descriptor
@ CP_descriptor
Content Protection descriptor.
Definition desc_extension.h:92
SH_delivery_system_descriptor
@ SH_delivery_system_descriptor
DVB-SH delivery system descriptor.
Definition desc_extension.h:95
image_icon_descriptor
@ image_icon_descriptor
image icon descriptor
Definition desc_extension.h:90
network_change_notify_descriptor
@ network_change_notify_descriptor
network change notify descriptor
Definition desc_extension.h:97
T2_delivery_system_descriptor
@ T2_delivery_system_descriptor
DVB-T2 delivery system descriptor.
Definition desc_extension.h:94
target_region_descriptor
@ target_region_descriptor
target region descriptor
Definition desc_extension.h:99
message_descriptor
@ message_descriptor
message descriptor
Definition desc_extension.h:98
target_region_name_descriptor
@ target_region_name_descriptor
target region name descriptor
Definition desc_extension.h:100
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.
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