/usr/include/dvbpsi/demux.h is in libdvbpsi-dev 1.2.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | /*****************************************************************************
* demux.h
*
* Copyright (C) 2001-2011 VideoLAN
* $Id$
*
* Authors: Johan Bilien <jobi@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
*
* This library 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; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
/*!
* \file <demux.h>
* \author Johan Bilien <jobi@via.ecp.fr>
* \brief Subtable demutiplexor.
*
* Subtable demultiplexor structure
*/
#ifndef _DVBPSI_DEMUX_H_
#define _DVBPSI_DEMUX_H_
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************
* dvbpsi_demux_new_cb_t
*****************************************************************************/
/*!
* \typedef void(* dvbpsi_demux_new_cb_t) (dvbpsi_t *p_dvbpsi,
uint8_t i_table_id,
uint16_t i_extension,
void * p_cb_data);
* \brief Callback used in case of a new subtable detected.
*/
typedef void (*dvbpsi_demux_new_cb_t) (dvbpsi_t *p_dvbpsi, /*!< pointer to dvbpsi handle */
uint8_t i_table_id, /*!< table id to attach */
uint16_t i_extension,/*!< table extention to attach */
void * p_cb_data); /*!< pointer to callback data */
/*!
* \typedef void(*dvbpsi_demux_gather_cb_t)(dvbpsi_t *p_dvbpsi,
void *p_cb_data,
dvbpsi_psi_section_t *p_section);
* \brief Callback used for gathering psi sections on behalf of subtable decoders.
*/
typedef void (*dvbpsi_demux_gather_cb_t) (dvbpsi_t *p_dvbpsi, /*!< pointer to dvbpsi handle */
dvbpsi_decoder_t *p_decoder, /*!< pointer to decoder */
dvbpsi_psi_section_t *p_section); /*!< pointer to psi section */
/*!
* \typedef void (*dvbpsi_demux_detach_cb_t) (dvbpsi_t *p_dvbpsi,
uint8_t i_table_id,
uint16_t i_extension);
* \brief Callback used for detaching subtable decoder from demuxer
*/
typedef void (*dvbpsi_demux_detach_cb_t) (dvbpsi_t *p_dvbpsi, /*!< pointer to dvbpsi handle */
uint8_t i_table_id, /*!< table id to detach */
uint16_t i_extension); /*!< table extention to detach */
/*****************************************************************************
* dvbpsi_demux_subdec_t
*****************************************************************************/
/*!
* \struct dvbpsi_demux_subdec_s
* \brief Subtable decoder structure
*
* This structure contains the data specific to the decoding of one
* subtable.
*/
/*!
* \typedef struct dvbpsi_demux_subdec_s dvbpsi_demux_subdec_t
* \brief dvbpsi_demux_subdec_t type definition.
*/
typedef struct dvbpsi_demux_subdec_s
{
uint32_t i_id; /*!< subtable id */
dvbpsi_demux_gather_cb_t pf_gather; /*!< gather subdec callback */
dvbpsi_decoder_t *p_decoder; /*!< private decoder for this subdec */
dvbpsi_demux_detach_cb_t pf_detach; /*!< detach subdec callback */
struct dvbpsi_demux_subdec_s *p_next; /*!< next subdec */
} dvbpsi_demux_subdec_t;
/*****************************************************************************
* dvbpsi_demux_s
*****************************************************************************/
/*!
* \struct dvbpsi_demux_s
* \brief subtable demultiplexor structure
*
* This structure contains the subtables demultiplexor data, such as the
* decoders and new subtable callback.
*/
/*!
* \typedef struct dvbpsi_demux_s dvbpsi_demux_t
* \brief dvbpsi_demux_t type definition.
*/
typedef struct dvbpsi_demux_s dvbpsi_demux_t;
struct dvbpsi_demux_s
{
DVBPSI_DECODER_COMMON
dvbpsi_demux_subdec_t * p_first_subdec; /*!< First subtable decoder */
/* New subtable callback */
dvbpsi_demux_new_cb_t pf_new_callback; /*!< New subtable callback */
void * p_new_cb_data; /*!< Data provided to the
previous callback */
};
/*****************************************************************************
* dvbpsi_AttachDemux
*****************************************************************************/
/*!
* \fn bool dvbpsi_AttachDemux(dvbpsi_t *p_dvbpsi, dvbpsi_demux_new_cb_t pf_new_cb, void * p_new_cb_data)
* \brief Attaches a new demux structure on dvbpsi_t* handle.
* \param p_dvbpsi pointer to dvbpsi_t handle
* \param pf_new_cb A callcack called when a new type of subtable is found.
* \param p_new_cb_data Data given to the previous callback.
* \return true on success, false on failure
*/
bool dvbpsi_AttachDemux(dvbpsi_t * p_dvbpsi,
dvbpsi_demux_new_cb_t pf_new_cb,
void * p_new_cb_data);
/*****************************************************************************
* dvbpsi_DetachDemux
*****************************************************************************/
/*!
* \fn void dvbpsi_DetachDemux(dvbpsi_t *p_dvbpsi)
* \brief Destroys a demux structure.
* \param p_dvbpsi The handle of the demux to be destroyed.
* \return nothing
*/
void dvbpsi_DetachDemux(dvbpsi_t *p_dvbpsi);
/*****************************************************************************
* dvbpsi_demuxGetSubDec
*****************************************************************************/
/*!
* \fn dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t *, uint8_t, uint16_t)
* \brief Looks for a subtable decoder, given the subtable ID.
* \param p_demux Pointer to the demux structure.
* \param i_table_id Table ID of the wanted subtable.
* \param i_extension Table ID extension of the wanted subtable.
* \return a pointer to the found subdecoder, or NULL.
*
*/
dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t * p_demux,
uint8_t i_table_id,
uint16_t i_extension);
/*****************************************************************************
* dvbpsi_Demux
*****************************************************************************/
/*!
* \fn void dvbpsi_Demux(dvbpsi_t *p_dvbpsi,
dvbpsi_psi_section_t * p_section)
* \brief Sends the PSI sections to the right subtable decoder according to their table ID and extension.
* \param p_dvbpsi PSI decoder handle.
* \param p_section PSI section.
*/
void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section);
/*****************************************************************************
* dvbpsi_NewDemuxSubDecoder
*****************************************************************************/
/*!
* \fn 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)
* \brief Allocates a new demux sub table decoder and initializes it.
* \param i_table_id table id to create subtable decoder for
* \param i_extension table extension to create subtable decoder for
* \param pf_detach pointer to detach function for subtable decoder.
* \param pf_gather pointer to gather function for subtable decoder.
* \param p_decoder pointer to private decoder.
* \return pointer to demux subtable decoder.
*/
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);
/*****************************************************************************
* dvbpsi_DeleteDemuxSubDecoder
*****************************************************************************/
/*!
* \fn void dvbpsi_DeleteDemuxSubDecoder(dvbpsi_demux_subdec_t *p_subdec)
* \brief Releases memory allocated with @see dvbpsi_NewDemuxSubDecoder. It will
* also release p_cb_data pointer.
* \param p_subdec pointer to demux subtable decoder.
* \return nothing.
*/
void dvbpsi_DeleteDemuxSubDecoder(dvbpsi_demux_subdec_t *p_subdec);
/*****************************************************************************
* dvbpsi_AttachDemuxSubDecoder
*****************************************************************************/
/*!
* \fn void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
* \brief Attach a subtable decoder to the given demux handle.
* \param p_demux pointer to dvbpsi_demux_t
* \param p_subdec pointer to dvbpsi_demux_subdec_t
* \return nothing
*/
void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec);
/*****************************************************************************
* dvbpsi_DetachDemuxSubDecoder
*****************************************************************************/
/*!
* \fn void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
* \brief Detach a subtable decoder from the given demux pointer.
* \param p_demux pointer to dvbpsi_demux_t
* \param p_subdec pointer to dvbpsi_demux_subdec_t
* \return nothing
*/
void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec);
#ifdef __cplusplus
};
#endif
#else
#error "Multiple inclusions of demux.h"
#endif
|