libdvbpsi  2.0.0-git
descriptor.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * descriptor.h
3  * Copyright (C) 2001-2010 VideoLAN
4  * $Id: descriptor.h,v 1.5 2002/05/08 13:00:40 bozo Exp $
5  *
6  * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  *****************************************************************************/
23 
35 #ifndef _DVBPSI_DESCRIPTOR_H_
36 #define _DVBPSI_DESCRIPTOR_H_
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #ifdef HAVE_SYS_TYPES_H
43 #include <sys/types.h>
44 #endif
45 
46 /*****************************************************************************
47  * common definitions
48  *****************************************************************************/
53 typedef uint8_t iso_639_language_code_t[3];
54 
55 /*****************************************************************************
56  * dvbpsi_descriptor_t
57  *****************************************************************************/
82 typedef struct dvbpsi_descriptor_s
83 {
84  uint8_t i_tag;
85  uint8_t i_length;
87  uint8_t * p_data;
92  void * p_decoded;
95 
96 /*****************************************************************************
97  * dvbpsi_NewDescriptor
98  *****************************************************************************/
110  uint8_t* p_data);
111 
112 
113 /*****************************************************************************
114  * dvbpsi_DeleteDescriptors
115  *****************************************************************************/
124 
125 /*****************************************************************************
126  * dvbpsi_AddDescriptor
127  *****************************************************************************/
137  dvbpsi_descriptor_t *p_descriptor);
138 
139 /*****************************************************************************
140  * dvbpsi_CanDecodeAsDescriptor
141  *****************************************************************************/
149 bool dvbpsi_CanDecodeAsDescriptor(dvbpsi_descriptor_t *p_descriptor, const uint8_t i_tag);
150 
151 /*****************************************************************************
152  * dvbpsi_IsDescriptorDecoded
153  *****************************************************************************/
161 
162 /*****************************************************************************
163  * dvbpsi_DuplicateDecodedDescriptor
164  *****************************************************************************/
172 void *dvbpsi_DuplicateDecodedDescriptor(void *p_decoded, ssize_t i_size);
173 
174 #ifdef __cplusplus
175 };
176 #endif
177 
178 #else
179 #error "Multiple inclusions of descriptor.h"
180 #endif
181 
uint8_t * p_data
Definition: descriptor.h:87
struct dvbpsi_descriptor_s dvbpsi_descriptor_t
dvbpsi_descriptor_t type definition.
void * dvbpsi_DuplicateDecodedDescriptor(void *p_decoded, ssize_t i_size)
Duplicate a decoded descriptor. The caller is responsible for releasing the associated memory...
bool dvbpsi_CanDecodeAsDescriptor(dvbpsi_descriptor_t *p_descriptor, const uint8_t i_tag)
Checks if descriptor tag matches.
dvbpsi_descriptor_t * dvbpsi_AddDescriptor(dvbpsi_descriptor_t *p_list, dvbpsi_descriptor_t *p_descriptor)
Add a descriptor to the end of descriptor list.
bool dvbpsi_IsDescriptorDecoded(dvbpsi_descriptor_t *p_descriptor)
Checks if descriptor was already decoded.
uint8_t iso_639_language_code_t[3]
ISO639 three letter language codes.
Definition: descriptor.h:53
void * p_decoded
Definition: descriptor.h:92
struct dvbpsi_descriptor_s * p_next
Definition: descriptor.h:89
uint8_t i_tag
Definition: descriptor.h:84
void dvbpsi_DeleteDescriptors(dvbpsi_descriptor_t *p_descriptor)
Destruction of a dvbpsi_descriptor_t structure together with the decoded descriptor, if present.
uint8_t i_length
Definition: descriptor.h:85
Descriptor structure.
Definition: descriptor.h:82
dvbpsi_descriptor_t * dvbpsi_NewDescriptor(uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
Creation of a new dvbpsi_descriptor_t structure.