libdvbpsi 1.3.2
pmt.h
Go to the documentation of this file.
1/*****************************************************************************
2 * pmt.h
3 * Copyright (C) 2001-2011 VideoLAN
4 * $Id$
5 *
6 * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
7 * Jean-Paul Saman <jpsaman@videolan.org>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 *
23 *****************************************************************************/
24
34#ifndef _DVBPSI_PMT_H_
35#define _DVBPSI_PMT_H_
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/*****************************************************************************
42 * dvbpsi_pmt_es_t
43 *****************************************************************************/
66
67/*****************************************************************************
68 * dvbpsi_pmt_t
69 *****************************************************************************/
94
95/*****************************************************************************
96 * dvbpsi_pmt_callback
97 *****************************************************************************/
103typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_pmt);
104
105/*****************************************************************************
106 * dvbpsi_pmt_attach
107 *****************************************************************************/
121bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint16_t i_program_number,
122 dvbpsi_pmt_callback pf_callback, void* p_cb_data);
123
124/*****************************************************************************
125 * dvbpsi_pmt_detach
126 *****************************************************************************/
136
137/*****************************************************************************
138 * dvbpsi_pmt_init/dvbpsi_pmt_new
139 *****************************************************************************/
152void dvbpsi_pmt_init(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number,
153 uint8_t i_version, bool b_current_next, uint16_t i_pcr_pid);
154
166dvbpsi_pmt_t* dvbpsi_pmt_new(uint16_t i_program_number, uint8_t i_version,
167 bool b_current_next, uint16_t i_pcr_pid);
168
169/*****************************************************************************
170 * dvbpsi_pmt_empty/dvbpsi_pmt_delete
171 *****************************************************************************/
179
187
188/*****************************************************************************
189 * dvbpsi_pmt_descriptor_add
190 *****************************************************************************/
204 uint8_t i_tag, uint8_t i_length,
205 uint8_t* p_data);
206
207/*****************************************************************************
208 * dvbpsi_pmt_es_add
209 *****************************************************************************/
220 uint8_t i_type, uint16_t i_pid);
221
222/*****************************************************************************
223 * dvbpsi_pmt_es_descriptor_add
224 *****************************************************************************/
238 uint8_t i_tag, uint8_t i_length,
239 uint8_t* p_data);
240
241/*****************************************************************************
242 * dvbpsi_pmt_sections_generate
243 *****************************************************************************/
255
256#ifdef __cplusplus
257};
258#endif
259
260#else
261#error "Multiple inclusions of pmt.h"
262#endif
void(* dvbpsi_pmt_callback)(void *p_cb_data, dvbpsi_pmt_t *p_new_pmt)
Callback type definition.
Definition pmt.h:103
void dvbpsi_pmt_init(dvbpsi_pmt_t *p_pmt, uint16_t i_program_number, uint8_t i_version, bool b_current_next, uint16_t i_pcr_pid)
Initialize a user-allocated dvbpsi_pmt_t structure.
dvbpsi_descriptor_t * dvbpsi_pmt_descriptor_add(dvbpsi_pmt_t *p_pmt, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
Add a descriptor in the PMT.
void dvbpsi_pmt_empty(dvbpsi_pmt_t *p_pmt)
Clean a dvbpsi_pmt_t structure.
bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint16_t i_program_number, dvbpsi_pmt_callback pf_callback, void *p_cb_data)
Creates and initialization of a PMT decoder and attaches it to dvbpsi_t handle.
struct dvbpsi_pmt_es_s dvbpsi_pmt_es_t
dvbpsi_pmt_es_t type definition.
dvbpsi_psi_section_t * dvbpsi_pmt_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_pmt_t *p_pmt)
PMT generator.
dvbpsi_pmt_es_t * dvbpsi_pmt_es_add(dvbpsi_pmt_t *p_pmt, uint8_t i_type, uint16_t i_pid)
Add an ES in the PMT.
void dvbpsi_pmt_detach(dvbpsi_t *p_dvbpsi)
Destroy a PMT decoder.
struct dvbpsi_pmt_s dvbpsi_pmt_t
dvbpsi_pmt_t type definition.
dvbpsi_descriptor_t * dvbpsi_pmt_es_descriptor_add(dvbpsi_pmt_es_t *p_es, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
Add a descriptor in the PMT ES.
dvbpsi_pmt_t * dvbpsi_pmt_new(uint16_t i_program_number, uint8_t i_version, bool b_current_next, uint16_t i_pcr_pid)
Allocate and initialize a new dvbpsi_pmt_t structure.
void dvbpsi_pmt_delete(dvbpsi_pmt_t *p_pmt)
Clean and free a dvbpsi_pmt_t structure.
uint8_t i_version
Definition sis.h:5
bool b_current_next
Definition sis.h:8
Descriptor structure.
Definition descriptor.h:83
PMT ES structure.
Definition pmt.h:56
dvbpsi_descriptor_t * p_first_descriptor
Definition pmt.h:60
uint8_t i_type
Definition pmt.h:57
struct dvbpsi_pmt_es_s * p_next
Definition pmt.h:62
uint16_t i_pid
Definition pmt.h:58
PMT structure.
Definition pmt.h:82
uint8_t i_version
Definition pmt.h:84
dvbpsi_descriptor_t * p_first_descriptor
Definition pmt.h:89
dvbpsi_pmt_es_t * p_first_es
Definition pmt.h:91
bool b_current_next
Definition pmt.h:85
uint16_t i_program_number
Definition pmt.h:83
uint16_t i_pcr_pid
Definition pmt.h:87
PSI section structure.
Definition psi.h:69
DVBPSI handle structure.
Definition dvbpsi.h:143