libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
cat.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * cat.h
3  * Copyright (C) 2001-2011 VideoLAN
4  * $Id$
5  *
6  * Authors: Johann Hanne
7  * heavily based on pmt.h which was written by
8  * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
9  * Jean-Paul Saman <jpsaman@videolan.org>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24  *
25  *****************************************************************************/
26 
36 #ifndef _DVBPSI_CAT_H_
37 #define _DVBPSI_CAT_H_
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /*****************************************************************************
44  * dvbpsi_cat_t
45  *****************************************************************************/
57 typedef struct dvbpsi_cat_s
58 {
59  uint8_t i_version;
65 
66 /*****************************************************************************
67  * dvbpsi_cat_callback
68  *****************************************************************************/
74 typedef void (* dvbpsi_cat_callback)(void* p_priv, dvbpsi_cat_t* p_new_cat);
75 
76 /*****************************************************************************
77  * dvbpsi_cat_attach
78  *****************************************************************************/
90 bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
91  dvbpsi_cat_callback pf_callback, void* p_priv);
92 
93 /*****************************************************************************
94  * dvbpsi_cat_detach
95  *****************************************************************************/
106 void dvbpsi_cat_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
107 
108 /*****************************************************************************
109  * dvbpsi_cat_init/dvbpsi_cat_new
110  *****************************************************************************/
121  uint8_t i_version, bool b_current_next);
122 
131 dvbpsi_cat_t *dvbpsi_cat_new(uint8_t i_version, bool b_current_next);
132 
133 /*****************************************************************************
134  * dvbpsi_cat_empty/dvbpsi_cat_delete
135  *****************************************************************************/
143 
151 
152 /*****************************************************************************
153  * dvbpsi_cat_descriptor_add
154  *****************************************************************************/
168  uint8_t i_tag, uint8_t i_length,
169  uint8_t* p_data);
170 
171 /*****************************************************************************
172  * dvbpsi_cat_sections_generate
173  *****************************************************************************/
183 dvbpsi_psi_section_t* dvbpsi_cat_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_cat_t* p_cat);
184 
185 #ifdef __cplusplus
186 };
187 #endif
188 
189 #else
190 #error "Multiple inclusions of cat.h"
191 #endif
192 
dvbpsi_cat_t * dvbpsi_cat_new(uint8_t i_version, bool b_current_next)
Allocate and initialize a new dvbpsi_cat_t structure.
struct dvbpsi_cat_s dvbpsi_cat_t
dvbpsi_cat_t type definition.
void dvbpsi_cat_delete(dvbpsi_cat_t *p_cat)
Clean and free a dvbpsi_cat_t structure.
void dvbpsi_cat_init(dvbpsi_cat_t *p_cat, uint8_t i_version, bool b_current_next)
Initialize a user-allocated dvbpsi_cat_t structure.
void dvbpsi_cat_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Destroy a CAT decoder.
void dvbpsi_cat_empty(dvbpsi_cat_t *p_cat)
Clean a dvbpsi_cat_t structure.
dvbpsi_descriptor_t * dvbpsi_cat_descriptor_add(dvbpsi_cat_t *p_cat, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
Add a descriptor in the CAT.
void(* dvbpsi_cat_callback)(void *p_priv, dvbpsi_cat_t *p_new_cat)
Callback type definition.
Definition: cat.h:74
CAT structure.
Definition: cat.h:58
bool b_current_next
Definition: cat.h:60
dvbpsi_descriptor_t * p_first_descriptor
Definition: cat.h:62
uint8_t i_version
Definition: cat.h:59
Descriptor structure.
Definition: descriptor.h:83
PSI section structure.
Definition: psi.h:69
DVBPSI handle structure.
Definition: dvbpsi.h:143