libdvbpsi 1.3.2
demux.h
Go to the documentation of this file.
1/*****************************************************************************
2 * demux.h
3 *
4 * Copyright (C) 2001-2011 VideoLAN
5 * $Id$
6 *
7 * Authors: Johan Bilien <jobi@via.ecp.fr>
8 * Jean-Paul Saman <jpsaman@videolan.org>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 *
24 *****************************************************************************/
25
34#ifndef _DVBPSI_DEMUX_H_
35#define _DVBPSI_DEMUX_H_
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/*****************************************************************************
42 * dvbpsi_demux_new_cb_t
43 *****************************************************************************/
51typedef void (*dvbpsi_demux_new_cb_t) (dvbpsi_t *p_dvbpsi,
52 uint8_t i_table_id,
53 uint16_t i_extension,
54 void * p_cb_data);
62typedef void (*dvbpsi_demux_gather_cb_t) (dvbpsi_t *p_dvbpsi,
63 dvbpsi_decoder_t *p_decoder,
64 dvbpsi_psi_section_t *p_section);
72typedef void (*dvbpsi_demux_detach_cb_t) (dvbpsi_t *p_dvbpsi,
73 uint8_t i_table_id,
74 uint16_t i_extension);
76/*****************************************************************************
77 * dvbpsi_demux_subdec_t
78 *****************************************************************************/
101
102
103/*****************************************************************************
104 * dvbpsi_demux_s
105 *****************************************************************************/
118
130
131/*****************************************************************************
132 * dvbpsi_AttachDemux
133 *****************************************************************************/
143 dvbpsi_demux_new_cb_t pf_new_cb,
144 void * p_new_cb_data);
145
146/*****************************************************************************
147 * dvbpsi_DetachDemux
148 *****************************************************************************/
156
157/*****************************************************************************
158 * dvbpsi_demuxGetSubDec
159 *****************************************************************************/
170 uint8_t i_table_id,
171 uint16_t i_extension);
172
173/*****************************************************************************
174 * dvbpsi_Demux
175 *****************************************************************************/
183void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section);
184
185/*****************************************************************************
186 * dvbpsi_NewDemuxSubDecoder
187 *****************************************************************************/
203 const uint16_t i_extension,
204 dvbpsi_demux_detach_cb_t pf_detach,
205 dvbpsi_demux_gather_cb_t pf_gather,
206 dvbpsi_decoder_t *p_decoder);
207
208/*****************************************************************************
209 * dvbpsi_DeleteDemuxSubDecoder
210 *****************************************************************************/
219
220/*****************************************************************************
221 * dvbpsi_AttachDemuxSubDecoder
222 *****************************************************************************/
231
232/*****************************************************************************
233 * dvbpsi_DetachDemuxSubDecoder
234 *****************************************************************************/
243
244#ifdef __cplusplus
245};
246#endif
247
248#else
249#error "Multiple inclusions of demux.h"
250#endif
void(* dvbpsi_demux_detach_cb_t)(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Callback used for detaching subtable decoder from demuxer.
Definition demux.h:72
void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
Attach a subtable decoder to the given demux handle.
void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
Detach a subtable decoder from the given demux pointer.
dvbpsi_demux_subdec_t * dvbpsi_NewDemuxSubDecoder(const uint8_t i_table_id, const uint16_t i_extension, dvbpsi_demux_detach_cb_t pf_detach, dvbpsi_demux_gather_cb_t pf_gather, dvbpsi_decoder_t *p_decoder)
Allocates a new demux sub table decoder and initializes it.
dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t *p_demux, uint8_t i_table_id, uint16_t i_extension)
Looks for a subtable decoder, given the subtable ID.
bool dvbpsi_AttachDemux(dvbpsi_t *p_dvbpsi, dvbpsi_demux_new_cb_t pf_new_cb, void *p_new_cb_data)
Attaches a new demux structure on dvbpsi_t* handle.
void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section)
Sends the PSI sections to the right subtable decoder according to their table ID and extension.
struct dvbpsi_demux_subdec_s dvbpsi_demux_subdec_t
dvbpsi_demux_subdec_t type definition.
void(* dvbpsi_demux_gather_cb_t)(dvbpsi_t *p_dvbpsi, dvbpsi_decoder_t *p_decoder, dvbpsi_psi_section_t *p_section)
Callback used for gathering psi sections on behalf of subtable decoders.
Definition demux.h:62
void dvbpsi_DeleteDemuxSubDecoder(dvbpsi_demux_subdec_t *p_subdec)
Releases memory allocated with.
void(* dvbpsi_demux_new_cb_t)(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, void *p_cb_data)
Callback used in case of a new subtable detected.
Definition demux.h:51
void dvbpsi_DetachDemux(dvbpsi_t *p_dvbpsi)
Destroys a demux structure.
#define DVBPSI_DECODER_COMMON
Common members for all dvbpsi table decoders. These should be the first members of a table decoder st...
Definition dvbpsi.h:231
uint8_t i_table_id
Definition sis.h:1
uint16_t i_extension
Definition sis.h:2
PSI decoder structure.
Definition dvbpsi.h:258
subtable demultiplexor structure
Definition demux.h:120
dvbpsi_demux_new_cb_t pf_new_callback
Definition demux.h:126
DVBPSI_DECODER_COMMON dvbpsi_demux_subdec_t * p_first_subdec
Definition demux.h:123
void * p_new_cb_data
Definition demux.h:127
Subtable decoder structure.
Definition demux.h:91
struct dvbpsi_demux_subdec_s * p_next
Definition demux.h:99
dvbpsi_decoder_t * p_decoder
Definition demux.h:95
uint32_t i_id
Definition demux.h:92
dvbpsi_demux_gather_cb_t pf_gather
Definition demux.h:94
dvbpsi_demux_detach_cb_t pf_detach
Definition demux.h:97
PSI section structure.
Definition psi.h:69
DVBPSI handle structure.
Definition dvbpsi.h:143