bat.h   bat.h 
/************************************************************************** *** /************************************************************************** ***
* bat.h * bat.h
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id: bat.h $ * $Id: bat.h $
* *
* Authors: Zhu zhenglu <zhuzlu@gmail.com> * Authors: Zhu zhenglu <zhuzlu@gmail.com>
* heavily based on nit.h which was written by * heavily based on nit.h which was written by
* Johann Hanne * Johann Hanne
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 34 skipping to change at line 35
* *
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \file bat.h * \file bat.h
* \author Zhu zhenglu <zhuzlu@gmail.com> * \author Zhu zhenglu <zhuzlu@gmail.com>
* \brief Application interface for the BAT decoder. * \brief Application interface for the BAT decoder.
* *
* Application interface for the BAT decoder. New * Application interface for the BAT decoder. New
* decoded BAT are sent by callback to the application. If a table * decoded BAT are sent by callback to the application. If a table
* wasn't active (b_current_next == 0) and the next is the same but active * wasn't active (b_current_next == false) and the next is the same but act
* (b_current_next == 1) then the service description list is empty and sho ive
uld * (b_current_next == true) then the service description list is empty and
should
* be caught from the previous structure. * be caught from the previous structure.
* This is a simulation to sdt.h * This is a simulation to sdt.h
*/ */
#ifndef _DVBPSI_BAT_H_ #ifndef _DVBPSI_BAT_H_
#define _DVBPSI_BAT_H_ #define _DVBPSI_BAT_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
skipping to change at line 63 skipping to change at line 64
* *
* This structure is used to store a decoded BAT service description. * This structure is used to store a decoded BAT service description.
* (ETSI EN 300 468 V1.5.1 section 5.2.2). * (ETSI EN 300 468 V1.5.1 section 5.2.2).
*/ */
/*! /*!
* \typedef struct dvbpsi_bat_ts_s dvbpsi_bat_ts_t * \typedef struct dvbpsi_bat_ts_s dvbpsi_bat_ts_t
* \brief dvbpsi_bat_ts_t type definition. * \brief dvbpsi_bat_ts_t type definition.
*/ */
typedef struct dvbpsi_bat_ts_s typedef struct dvbpsi_bat_ts_s
{ {
uint16_t i_ts_id; /*!< transport stre uint16_t i_ts_id; /*!< transport stream id */
am id */ uint16_t i_orig_network_id; /*!< original network id */
uint16_t i_orig_network_id; /*!< original netwo
rk id */
dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor lis t */ dvbpsi_descriptor_t *p_first_descriptor; /*!< descriptor list */
struct dvbpsi_bat_ts_s * p_next; /*!< next element of struct dvbpsi_bat_ts_s *p_next; /*!< next element of
the list */ the list */
} dvbpsi_bat_ts_t; } dvbpsi_bat_ts_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_bat_t * dvbpsi_bat_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_bat_s * \struct dvbpsi_bat_s
* \brief BAT structure. * \brief BAT structure.
* *
* This structure is used to store a decoded BAT. * This structure is used to store a decoded BAT.
* (ETSI EN 300 468 V1.5.1 section 5.2.2). * (ETSI EN 300 468 V1.5.1 section 5.2.2).
*/ */
/*! /*!
* \typedef struct dvbpsi_bat_s dvbpsi_bat_t * \typedef struct dvbpsi_bat_s dvbpsi_bat_t
* \brief dvbpsi_bat_t type definition. * \brief dvbpsi_bat_t type definition.
*/ */
typedef struct dvbpsi_bat_s typedef struct dvbpsi_bat_s
{ {
uint16_t i_bouquet_id; /*!< bouquet_id */ uint8_t i_table_id; /*!< table id */
uint8_t i_version; /*!< version_number */ uint16_t i_extension; /*!< subtable id (here bouq
int b_current_next; /*!< current_next_indicator uet id) */
*/
dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */ uint8_t i_version; /*!< version_number */
bool b_current_next; /*!< current_next_indicator
*/
dvbpsi_bat_ts_t * p_first_ts; /*!< transport stream descriptio dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */
n
list */ dvbpsi_bat_ts_t * p_first_ts; /*!< transport stream
description list */
} dvbpsi_bat_t; } dvbpsi_bat_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_bat_callback * dvbpsi_bat_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_bat_callback)(void* p_cb_data, * \typedef void (* dvbpsi_bat_callback)(void* p_cb_data,
dvbpsi_bat_t* p_new_bat) dvbpsi_bat_t* p_new_bat)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_bat_callback)(void* p_cb_data, dvbpsi_bat_t* p_new_b at); typedef void (* dvbpsi_bat_callback)(void* p_cb_data, dvbpsi_bat_t* p_new_b at);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachBAT * dvbpsi_bat_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_AttachBAT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_bat_callback pf_callback, uint16_t i_extension, dvbpsi_bat_callback pf_callback, void* p_cb
void* p_cb_data) _data)
* \brief Creation and initialization of a BAT decoder. * \brief Creation and initialization of a BAT decoder. It will be attached
* \param p_demux Subtable demultiplexor to which the decoder is attached. to p_dvbpsi.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the dec
oder is attached.
* \param i_table_id Table ID, 0x4a. * \param i_table_id Table ID, 0x4a.
* \param i_extension Table ID extension, here bouquet ID. * \param i_extension Table ID extension, here bouquet ID.
* \param pf_callback function to call back on new BAT. * \param pf_callback function to call back on new BAT.
* \param p_cb_data private data given in argument to the callback. * \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
int dvbpsi_AttachBAT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id, xtension,
uint16_t i_extension, dvbpsi_bat_callback pf_callback, dvbpsi_bat_callback pf_callback, void* p_cb_data);
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachBAT * dvbpsi_bat_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachBAT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn void dvbpsi_bat_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension) uint16_t i_extension)
* \brief Destroy a BAT decoder. * \brief Destroy a BAT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the dec oder is attached.
* \param i_table_id Table ID, 0x4a. * \param i_table_id Table ID, 0x4a.
* \param i_extension Table ID extension, here bouquet ID. * \param i_extension Table ID extension, here bouquet ID.
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_bat_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
void dvbpsi_DetachBAT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, xtension);
uint16_t i_extension);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitBAT/dvbpsi_NewBAT * dvbpsi_bat_init/dvbpsi_bat_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitBAT(dvbpsi_bat_t *p_bat, uint16_t i_bouquet_id, uint * \fn void dvbpsi_bat_init(dvbpsi_bat_t *p_bat, uint8_t i_table_id, uint16
8_t i_version, _t i_extension,
int b_current_next) uint8_t i_version, bool b_current_next)
* \brief Initialize a user-allocated dvbpsi_bat_t structure. * \brief Initialize a user-allocated dvbpsi_bat_t structure.
* \param p_bat pointer to the BAT structure * \param p_bat pointer to the BAT structure
* \param i_bouquet_id bouquet ID * \param i_table_id Table ID, 0x4a.
* \param i_extension Table ID extension, here bouquet ID.
* \param i_version BAT version * \param i_version BAT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_network_id original network id
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_bat_init(dvbpsi_bat_t *p_bat, uint8_t i_table_id, uint16_t i_ex
void dvbpsi_InitBAT(dvbpsi_bat_t *p_bat, uint16_t i_bouquet_id, uint8_t i_v tension,
ersion, uint8_t i_version, bool b_current_next);
int b_current_next);
/*! /*!
* \def dvbpsi_NewBAT(p_bat, i_bouquet_id, i_version, b_current_next) * \fn dvbpsi_bat_t *dvbpsi_bat_new(uint8_t i_table_id, uint16_t i_extensio
n,
* uint8_t i_version, bool b_current_next)
* \brief Allocate and initialize a new dvbpsi_bat_t structure. * \brief Allocate and initialize a new dvbpsi_bat_t structure.
* \param p_bat pointer to the BAT structure * \param i_table_id Table ID, 0x4a.
* \param i_bouquet_id bouquet ID * \param i_extension Table ID extension, here bouquet ID.
* \param i_version BAT version * \param i_version BAT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_network_id original network id * \return p_bat pointer to the BAT structure
* \return nothing.
*/ */
#define dvbpsi_NewBAT(p_bat, i_bouquet_id, i_version, b_current_next) \ dvbpsi_bat_t *dvbpsi_bat_new(uint8_t i_table_id, uint16_t i_extension,
do { \ uint8_t i_version, bool b_current_next);
p_bat = (dvbpsi_bat_t*)malloc(sizeof(dvbpsi_bat_t)); \
if(p_bat != NULL) \
dvbpsi_InitBAT(p_bat, i_bouquet_id, i_version, b_current_next); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptyBAT/dvbpsi_DeleteBAT * dvbpsi_bat_empty/dvbpsi_bat_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptyBAT(dvbpsi_bat_t* p_bat) * \fn void dvbpsi_bat_empty(dvbpsi_bat_t* p_bat)
* \brief Clean a dvbpsi_bat_t structure. * \brief Clean a dvbpsi_bat_t structure.
* \param p_bat pointer to the BAT structure * \param p_bat pointer to the BAT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_bat_empty(dvbpsi_bat_t *p_bat);
void dvbpsi_EmptyBAT(dvbpsi_bat_t *p_bat);
/*! /*!
* \def dvbpsi_DeleteBAT(p_bat) * \fn dvbpsi_bat_delete(dvbpsi_bat_t *p_bat)
* \brief Clean and free a dvbpsi_bat_t structure. * \brief Clean and free a dvbpsi_bat_t structure.
* \param p_bat pointer to the BAT structure * \param p_bat pointer to the BAT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeleteBAT(p_bat) \ void dvbpsi_bat_delete(dvbpsi_bat_t *p_bat);
do { \
dvbpsi_EmptyBAT(p_bat); \ /**************************************************************************
free(p_bat); \ ***
} while(0); * dvbpsi_bat_descriptor_add
**************************************************************************
***/
/*!
* \fn dvbpsi_descriptor_t* dvbpsi_bat_bouquet_descriptor_add(dvbpsi_bat_t*
p_bat,
uint8_t i_tag
,
uint8_t i_len
gth,
uint8_t* p_da
ta)
* \brief Add a descriptor in the BAT.
* \param p_bat pointer to the BAT structure
* \param i_tag descriptor's tag
* \param i_length descriptor's length
* \param p_data descriptor's data
* \return a pointer to the added descriptor.
*/
dvbpsi_descriptor_t* dvbpsi_bat_bouquet_descriptor_add(dvbpsi_bat_t* p_bat,
uint8_t i_tag, uint8
_t i_length,
uint8_t* p_data);
/**************************************************************************
***
* dvbpsi_bat_ts_add
**************************************************************************
***/
/*!
* \fn dvbpsi_descriptor_t* dvbpsi_bat_ts_add(dvbpsi_bat_t* p_bat,
uint16_t i_ts_id,
uint16_t i_orig_network_id)
* \brief Add a TS description at the end of the BAT.
* \param p_bat pointer to the BAT structure
* \param i_ts_id descriptor's transport stream id
* \param i_orig_network_id descriptor's original network id
* \return a pointer to the added descriptor.
*/
dvbpsi_bat_ts_t *dvbpsi_bat_ts_add(dvbpsi_bat_t* p_bat,
uint16_t i_ts_id, uint16_t i_orig_network_
id);
/**************************************************************************
***
* dvbpsi_bat_ts_descriptor_add
**************************************************************************
***/
/*!
* \fn dvbpsi_descriptor_t* dvbpsi_bat_ts_descriptor_add(dvbpsi_bat_ts_t *p
_bat,
uint8_t i_tag,
uint8_t i_length,
uint8_t *p_data)
* \brief Add a descriptor in the BAT TS descriptors.
* \param p_bat pointer to the BAT structure
* \param i_tag descriptor number
* \param i_length length of descriptor in bytes
* \param p_data pointer to descriptor data
* \return a pointer to the added descriptor.
*/
dvbpsi_descriptor_t *dvbpsi_bat_ts_descriptor_add(dvbpsi_bat_ts_t *p_bat,
uint8_t i_tag, uint8_t i_len
gth,
uint8_t *p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenBATSections * dvbpsi_bat_sections_generate
************************************************************************** **************************************************************************
*** ***/
/*! /*!
* \fn dvbpsi_psi_section_t* dvbpsi_GenBATSections(dvbpsi_bat_t* p_bat) * \fn dvbpsi_psi_section_t* dvbpsi_bat_sections_generate(dvbpsi_t *p_dvbps i, dvbpsi_bat_t* p_bat)
* \brief BAT generator * \brief BAT generator
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_bat BAT structure * \param p_bat BAT structure
* \return a pointer to the list of generated PSI sections. * \return a pointer to the list of generated PSI sections.
* *
* Generate BAT sections based on the dvbpsi_bat_t structure. * Generate BAT sections based on the dvbpsi_bat_t structure.
************************************************************************** ***/ ************************************************************************** ***/
dvbpsi_psi_section_t *dvbpsi_bat_sections_generate(dvbpsi_t *p_dvbpsi, dvbp
si_bat_t * p_bat);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
int dvbpsi_AttachBAT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_bat_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachBAT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension);
__attribute__((deprecated))
void dvbpsi_InitBAT(dvbpsi_bat_t *p_bat, uint16_t i_bouquet_id, uint8_t i_v
ersion,
int b_current_next);
__attribute__((deprecated))
void dvbpsi_EmptyBAT(dvbpsi_bat_t *p_bat);
__attribute__((deprecated))
dvbpsi_psi_section_t *dvbpsi_GenBATSections(dvbpsi_bat_t *p_bat);
__attribute__((deprecated))
dvbpsi_bat_ts_t *dvbpsi_BATAddTS(dvbpsi_bat_t* p_bat,
uint16_t i_ts_id, uint16_t i_orig_network_
id);
__attribute__((deprecated))
dvbpsi_descriptor_t *dvbpsi_BATBouquetAddDescriptor(
dvbpsi_bat_t *p_bat,
uint8_t i_tag, uint8_t i_len
gth,
uint8_t *p_data);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t *dvbpsi_GenBATSections(dvbpsi_bat_t * p_bat); dvbpsi_descriptor_t *dvbpsi_BATTSAddDescriptor(
dvbpsi_bat_ts_t *p_ts,
uint8_t i_tag, uint8_t i_len
gth,
uint8_t *p_data);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of bat.h" #error "Multiple inclusions of bat.h"
#endif #endif
 End of changes. 35 change blocks. 
70 lines changed or deleted 170 lines changed or added


 cat.h   cat.h 
/************************************************************************** *** /************************************************************************** ***
* cat.h * cat.h
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id$ * $Id$
* *
* Authors: Johann Hanne * Authors: Johann Hanne
* heavily based on pmt.h which was written by * heavily based on pmt.h which was written by
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 59 skipping to change at line 60
* This structure is used to store a decoded CAT. * This structure is used to store a decoded CAT.
* (ISO/IEC 13818-1 section 2.4.4.6). * (ISO/IEC 13818-1 section 2.4.4.6).
*/ */
/*! /*!
* \typedef struct dvbpsi_cat_s dvbpsi_cat_t * \typedef struct dvbpsi_cat_s dvbpsi_cat_t
* \brief dvbpsi_cat_t type definition. * \brief dvbpsi_cat_t type definition.
*/ */
typedef struct dvbpsi_cat_s typedef struct dvbpsi_cat_s
{ {
uint8_t i_version; /*!< version_number */ uint8_t i_version; /*!< version_number */
int b_current_next; /*!< current_next_indicator */ bool b_current_next; /*!< current_next_indicator */
dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */ dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */
} dvbpsi_cat_t; } dvbpsi_cat_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_cat_callback * dvbpsi_cat_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_cat_callback)(void* p_cb_data, * \typedef void (* dvbpsi_cat_callback)(void* p_cb_data,
dvbpsi_cat_t* p_new_cat) dvbpsi_cat_t* p_new_cat)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_cat_callback)(void* p_cb_data, dvbpsi_cat_t* p_new_c at); typedef void (* dvbpsi_cat_callback)(void* p_cb_data, dvbpsi_cat_t* p_new_c at);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachCAT * dvbpsi_cat_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_handle dvbpsi_AttachCAT(dvbpsi_cat_callback pf_callback, * \fn bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi,
void* p_cb_data) dvbpsi_cat_callback pf_callback, void* p_cb_dat
* \brief Creation and initialization of a CAT decoder. a)
* \brief Creation and initialization of a CAT decoder. It will be attached
to p_dvbpsi
* \param p_dvbpsi is a pointer to dvbpsi_t which holds a pointer to the de
coder
* \param pf_callback function to call back on new CAT * \param pf_callback function to call back on new CAT
* \param p_cb_data private data given in argument to the callback * \param p_cb_data private data given in argument to the callback
* \return a pointer to the decoder for future calls. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, dvbpsi_cat_callback pf_callback,
dvbpsi_handle dvbpsi_AttachCAT(dvbpsi_cat_callback pf_callback, void* p_cb_data);
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachCAT * dvbpsi_cat_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachCAT(dvbpsi_handle h_dvbpsi) * \fn void dvbpsi_cat_detach(dvbpsi_t *p_dvbpsi)
* \brief Destroy a CAT decoder. * \brief Destroy a CAT decoder.
* \param h_dvbpsi handle to the decoder * \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_dvbpsi handle holds the decoder pointer
* \return nothing. * \return nothing.
* *
* The handle isn't valid any more. * The handle isn't valid any more.
*/ */
__attribute__((deprecated)) void dvbpsi_cat_detach(dvbpsi_t *p_dvbpsi);
void dvbpsi_DetachCAT(dvbpsi_handle h_dvbpsi);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitCAT/dvbpsi_NewCAT * dvbpsi_cat_init/dvbpsi_cat_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitCAT(dvbpsi_cat_t* p_cat, * \fn void dvbpsi_cat_init(dvbpsi_cat_t* p_cat,
uint8_t i_version, int b_current_next) uint8_t i_version, bool b_current_next)
* \brief Initialize a user-allocated dvbpsi_cat_t structure. * \brief Initialize a user-allocated dvbpsi_cat_t structure.
* \param p_cat pointer to the CAT structure * \param p_cat pointer to the CAT structure
* \param i_version CAT version * \param i_version CAT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_cat_init(dvbpsi_cat_t* p_cat,
void dvbpsi_InitCAT(dvbpsi_cat_t* p_cat, uint8_t i_version, bool b_current_next);
uint8_t i_version, int b_current_next);
/*! /*!
* \def dvbpsi_NewCAT(p_cat, * \fn dvbpsi_cat_t *dvbpsi_cat_new(uint8_t i_version,
i_version, b_current_next) * bool b_current_next)
* \brief Allocate and initialize a new dvbpsi_cat_t structure. * \brief Allocate and initialize a new dvbpsi_cat_t structure.
* \param p_cat pointer to the CAT structure
* \param i_version CAT version * \param i_version CAT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \return nothing. * \return p_cat pointer to the CAT structure
*/ */
#define dvbpsi_NewCAT(p_cat, \ dvbpsi_cat_t *dvbpsi_cat_new(uint8_t i_version, bool b_current_next);
i_version, b_current_next) \
do { \
p_cat = (dvbpsi_cat_t*)malloc(sizeof(dvbpsi_cat_t)); \
if(p_cat != NULL) \
dvbpsi_InitCAT(p_cat, i_version, b_current_next); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptyCAT/dvbpsi_DeleteCAT * dvbpsi_cat_empty/dvbpsi_cat_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptyCAT(dvbpsi_cat_t* p_cat) * \fn void dvbpsi_cat_empty(dvbpsi_cat_t* p_cat)
* \brief Clean a dvbpsi_cat_t structure. * \brief Clean a dvbpsi_cat_t structure.
* \param p_cat pointer to the CAT structure * \param p_cat pointer to the CAT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_cat_empty(dvbpsi_cat_t* p_cat);
void dvbpsi_EmptyCAT(dvbpsi_cat_t* p_cat);
/*! /*!
* \def dvbpsi_DeleteCAT(p_cat) * \fn void dvbpsi_cat_delete(dvbpsi_cat_t *p_cat)
* \brief Clean and free a dvbpsi_cat_t structure. * \brief Clean and free a dvbpsi_cat_t structure.
* \param p_cat pointer to the CAT structure * \param p_cat pointer to the CAT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeleteCAT(p_cat) \ void dvbpsi_cat_delete(dvbpsi_cat_t *p_cat);
do { \
dvbpsi_EmptyCAT(p_cat); \
free(p_cat); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_CATAddDescriptor * dvbpsi_cat_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t* dvbpsi_CATAddDescriptor(dvbpsi_cat_t* p_cat, * \fn dvbpsi_descriptor_t* dvbpsi_cat_descriptor_add(dvbpsi_cat_t* p_cat,
uint8_t i_tag, uint8_t i_tag,
uint8_t i_length, uint8_t i_length,
uint8_t* p_data) uint8_t* p_data)
* \brief Add a descriptor in the CAT. * \brief Add a descriptor in the CAT.
* \param p_cat pointer to the CAT structure * \param p_cat pointer to the CAT structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t* dvbpsi_cat_descriptor_add(dvbpsi_cat_t* p_cat,
dvbpsi_descriptor_t* dvbpsi_CATAddDescriptor(dvbpsi_cat_t* p_cat, uint8_t i_tag, uint8_t i_len
uint8_t i_tag, uint8_t i_lengt gth,
h, uint8_t* p_data);
uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenCATSections * dvbpsi_cat_sections_generate
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_psi_section_t* dvbpsi_GenCATSections(dvbpsi_cat_t* p_cat) * \fn dvbpsi_psi_section_t* dvbpsi_cat_sections_generate(dvbpsi_t *p_dvbps i, dvbpsi_cat_t* p_cat)
* \brief CAT generator * \brief CAT generator
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_cat CAT structure * \param p_cat CAT structure
* \return a pointer to the list of generated PSI sections. * \return a pointer to the list of generated PSI sections.
* *
* Generate CAT sections based on the dvbpsi_cat_t structure. * Generate CAT sections based on the dvbpsi_cat_t structure.
*/ */
dvbpsi_psi_section_t* dvbpsi_cat_sections_generate(dvbpsi_t *p_dvbpsi, dvbp
si_cat_t* p_cat);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
dvbpsi_handle dvbpsi_AttachCAT(dvbpsi_cat_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachCAT(dvbpsi_handle h_dvbpsi);
__attribute__((deprecated))
void dvbpsi_InitCAT(dvbpsi_cat_t* p_cat,
uint8_t i_version, int b_current_next);
__attribute__((deprecated))
void dvbpsi_EmptyCAT(dvbpsi_cat_t* p_cat);
__attribute__((deprecated))
dvbpsi_descriptor_t* dvbpsi_CATAddDescriptor(dvbpsi_cat_t* p_cat,
uint8_t i_tag, uint8_t i_lengt
h,
uint8_t* p_data);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenCATSections(dvbpsi_cat_t* p_cat); dvbpsi_psi_section_t* dvbpsi_GenCATSections(dvbpsi_cat_t* p_cat);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of cat.h" #error "Multiple inclusions of cat.h"
#endif #endif
 End of changes. 29 change blocks. 
53 lines changed or deleted 67 lines changed or added


 demux.h   demux.h 
/************************************************************************** *** /************************************************************************** ***
* demux.h * demux.h
* *
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id$ * $Id$
* *
* Authors: Johan Bilien <jobi@via.ecp.fr> * Authors: Johan Bilien <jobi@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 44 skipping to change at line 45
#define _DVBPSI_DEMUX_H_ #define _DVBPSI_DEMUX_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_demux_new_cb_t * dvbpsi_demux_new_cb_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void(* dvbpsi_demux_new_cb_t) (void * p_cb_data, * \typedef void(* dvbpsi_demux_new_cb_t) (dvbpsi_t *p_dvbpsi,
dvbpsi_handle h_dvbpsi,
uint8_t i_table_id, uint8_t i_table_id,
uint16_t i_extension); uint16_t i_extension,
void * p_cb_data);
* \brief Callback used in case of a new subtable detected. * \brief Callback used in case of a new subtable detected.
*/ */
typedef void (*dvbpsi_demux_new_cb_t) (void * p_cb_data, typedef void (*dvbpsi_demux_new_cb_t) (dvbpsi_t *p_dvbpsi, /*!< pointer to
dvbpsi_handle h_dvbpsi, dvbpsi handle */
uint8_t i_table_id, uint8_t i_table_id, /*!< table id t
uint16_t i_extension); o attach */
uint16_t i_extension,/*!< table exte
/************************************************************************** ntion to attach */
*** void * p_cb_data); /*!< pointer to
* dvbpsi_demux_subdec_cb_t callback data */
**************************************************************************
***/ /*!
/*! * \typedef void(*dvbpsi_demux_gather_cb_t)(dvbpsi_t *p_dvbpsi,
* \typedef void (*dvbpsi_demux_subdec_cb_t) void *p_cb_data,
(dvbpsi_decoder_t* p_psi_decoder, dvbpsi_psi_section_t *p_section
void* p_private_decoder, );
dvbpsi_psi_section_t* p_section); * \brief Callback used for gathering psi sections on behalf of subtable de
* \brief Subtable specific decoder. coders.
*/ */
typedef void (*dvbpsi_demux_subdec_cb_t) typedef void (*dvbpsi_demux_gather_cb_t) (dvbpsi_t *p_dvbpsi, /*!< pointer
(dvbpsi_decoder_t* p_psi_decoder, to dvbpsi handle */
void* p_private_decoder, dvbpsi_decoder_t *p_decoder, /*!<
dvbpsi_psi_section_t* p_section); 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, /*!< point
er to dvbpsi handle */
uint8_t i_table_id, /*!< table
id to detach */
uint16_t i_extension); /*!< table
extention to detach */
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_demux_subdec_t * dvbpsi_demux_subdec_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_demux_subdec_s * \struct dvbpsi_demux_subdec_s
* \brief Subtable decoder structure * \brief Subtable decoder structure
* *
* This structure contains the data specific to the decoding of one * This structure contains the data specific to the decoding of one
* subtable. * subtable.
*/ */
/*! /*!
* \typedef struct dvbpsi_demux_subdec_s dvbpsi_demux_subdec_t * \typedef struct dvbpsi_demux_subdec_s dvbpsi_demux_subdec_t
* \brief dvbpsi_demux_subdec_t type definition. * \brief dvbpsi_demux_subdec_t type definition.
*/ */
struct dvbpsi_demux_s;
typedef struct dvbpsi_demux_subdec_s typedef struct dvbpsi_demux_subdec_s
{ {
uint32_t i_id; uint32_t i_id; /*!< subtable id */
dvbpsi_demux_subdec_cb_t pf_callback;
void * p_cb_data; dvbpsi_demux_gather_cb_t pf_gather; /*!< gather subdec callback */
struct dvbpsi_demux_subdec_s * p_next; dvbpsi_decoder_t *p_decoder; /*!< private decoder for this su
bdec */
void (*pf_detach)(struct dvbpsi_demux_s *, uint8_t, uint16_t); 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_subdec_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_demux_t * dvbpsi_demux_s
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_demux_s * \struct dvbpsi_demux_s
* \brief subtable demultiplexor structure * \brief subtable demultiplexor structure
* *
* This structure contains the subtables demultiplexor data, such as the * This structure contains the subtables demultiplexor data, such as the
* decoders and new subtable callback. * decoders and new subtable callback.
*/ */
/*! /*!
* \typedef struct dvbpsi_demux_s dvbpsi_demux_t * \typedef struct dvbpsi_demux_s dvbpsi_demux_t
* \brief dvbpsi_demux_t type definition. * \brief dvbpsi_demux_t type definition.
*/ */
typedef struct dvbpsi_demux_s typedef struct dvbpsi_demux_s dvbpsi_demux_t;
struct dvbpsi_demux_s
{ {
dvbpsi_handle p_decoder; /*!< Parent PSI Decoder */ DVBPSI_DECODER_COMMON
dvbpsi_demux_subdec_t * p_first_subdec; /*!< First subtable decoder
*/ dvbpsi_demux_subdec_t * p_first_subdec; /*!< First subtable decod
/* New subtable callback */ er */
dvbpsi_demux_new_cb_t pf_new_callback; /*!< New subtable callback
*/
void * p_new_cb_data; /*!< Data provided to the
previous callback */
} dvbpsi_demux_t; /* New subtable callback */
dvbpsi_demux_new_cb_t pf_new_callback; /*!< New subtable callbac
k */
void * p_new_cb_data; /*!< Data provided to the
previous callback */
};
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachDemux * dvbpsi_AttachDemux
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_handle_t dvbpsi_NewPSISection(dvbpsi_demux_new_cb_t pf_new_cb * \fn bool dvbpsi_AttachDemux(dvbpsi_t *p_dvbpsi, dvbpsi_demux_new_cb_t pf
, void * p_new_cb_data) _new_cb, void * p_new_cb_data)
* \brief Creates a new demux structure. * \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 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. * \param p_new_cb_data Data given to the previous callback.
* \return a handle to the new demux structure. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_AttachDemux(dvbpsi_t * p_dvbpsi,
dvbpsi_handle dvbpsi_AttachDemux(dvbpsi_demux_new_cb_t pf_new_cb, dvbpsi_demux_new_cb_t pf_new_cb,
void * p_new_cb_data); void * p_new_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachDemux * dvbpsi_DetachDemux
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachDemux(dvbpsi_handle h_dvbpsi) * \fn void dvbpsi_DetachDemux(dvbpsi_t *p_dvbpsi)
* \brief Destroys a demux structure. * \brief Destroys a demux structure.
* \param h_dvbpsi The handle of the demux to be destroyed. * \param p_dvbpsi The handle of the demux to be destroyed.
* \return nothing
*/ */
__attribute__((deprecated)) void dvbpsi_DetachDemux(dvbpsi_t *p_dvbpsi);
void dvbpsi_DetachDemux(dvbpsi_handle h_dvbpsi);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_demuxGetSubDec * dvbpsi_demuxGetSubDec
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t *, uint 8_t, uint16_t) * \fn dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t *, uint 8_t, uint16_t)
* \brief Looks for a subtable decoder, given the subtable ID. * \brief Looks for a subtable decoder, given the subtable ID.
* \param p_demux Pointer to the demux structure. * \param p_demux Pointer to the demux structure.
* \param i_table_id Table ID of the wanted subtable. * \param i_table_id Table ID of the wanted subtable.
* \param i_extension Table ID extension of the wanted subtable. * \param i_extension Table ID extension of the wanted subtable.
* \return a pointer to the found subdecoder, or NULL. * \return a pointer to the found subdecoder, or NULL.
* *
*/ */
__attribute__((deprecated))
dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t * p_demux, dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t * p_demux,
uint8_t i_table_id, uint8_t i_table_id,
uint16_t i_extension) ; uint16_t i_extension) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_Demux * dvbpsi_Demux
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_Demux(dvbpsi_handle h_dvbpsi, * \fn void dvbpsi_Demux(dvbpsi_t *p_dvbpsi,
dvbpsi_psi_section_t * p_section) dvbpsi_psi_section_t * p_section)
* \brief Sends the PSI sections to the right subtable decoder according to their table ID and extension. * \brief Sends the PSI sections to the right subtable decoder according to their table ID and extension.
* \param h_dvbpsi PSI decoder handle. * \param p_dvbpsi PSI decoder handle.
* \param p_section PSI section. * \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_tab
le_id,
const uint16_t i_extension
,
dvbpsi_demux_detach_cb_t p
f_detach,
dvbpsi_demux_gather_cb_t p
f_gather,
dvbpsi_decoder_t *p_decode
r)
* \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 p
f_detach,
dvbpsi_demux_gather_cb_t p
f_gather,
dvbpsi_decoder_t *p_decode
r);
/**************************************************************************
***
* 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_de
mux_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_sub
dec_t *p_subdec);
/**************************************************************************
***
* dvbpsi_DetachDemuxSubDecoder
**************************************************************************
***/
/*!
* \fn void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_de
mux_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_sub
dec_t *p_subdec);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
#if 0
__attribute__((deprecated))
dvbpsi_handle dvbpsi_AttachDemux(dvbpsi_demux_new_cb_t pf_new_cb,
void * p_new_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachDemux(dvbpsi_handle h_dvbpsi);
__attribute__((deprecated))
dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t * p_demux,
uint8_t i_table_id,
uint16_t i_extension)
;
__attribute__((deprecated)) __attribute__((deprecated))
void dvbpsi_Demux(dvbpsi_handle h_dvbpsi, void dvbpsi_Demux(dvbpsi_handle h_dvbpsi, dvbpsi_psi_section_t * p_section)
dvbpsi_psi_section_t * p_section); ;
#endif
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of demux.h" #error "Multiple inclusions of demux.h"
#endif #endif
 End of changes. 24 change blocks. 
57 lines changed or deleted 178 lines changed or added


 descriptor.h   descriptor.h 
skipping to change at line 30 skipping to change at line 30
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA
* *
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \file <descriptor.h> * \file <descriptor.h>
* \author Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * \author Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* \brief Common descriptor tools. * \brief Common descriptor tools.
* *
* Descriptor structure and its Manipulation tools. * Descriptor structure and its Manipulation tools.
*
* NOTE: Descriptor generators and decoder functions return a pointer on su
ccess
* and NULL on error. They do not use a dvbpsi_t handle as first argument.
*/ */
#ifndef _DVBPSI_DESCRIPTOR_H_ #ifndef _DVBPSI_DESCRIPTOR_H_
#define _DVBPSI_DESCRIPTOR_H_ #define _DVBPSI_DESCRIPTOR_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
* common definitions
**************************************************************************
***/
/*!
* \typedef uint8_t iso_639_language_code_t[3]
* \brief ISO639 three letter language codes
*/
typedef uint8_t iso_639_language_code_t[3];
/**************************************************************************
***
* dvbpsi_descriptor_t * dvbpsi_descriptor_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_descriptor_s * \struct dvbpsi_descriptor_s
* \brief Descriptor structure. * \brief Descriptor structure.
* *
* This structure is used to store a descriptor. * This structure is used to store a descriptor.
* (ISO/IEC 13818-1 section 2.6). * (ISO/IEC 13818-1 section 2.6).
*/ */
/*! /*!
* \typedef struct dvbpsi_descriptor_s dvbpsi_descriptor_t * \typedef struct dvbpsi_descriptor_s dvbpsi_descriptor_t
* \brief dvbpsi_descriptor_t type definition. * \brief dvbpsi_descriptor_t type definition.
*
* The common descriptor header and its payload is contained in this
* structure. The payload is the raw descriptor data and its interpretation
* depends on the the p_descriptor::i_tag value.
*
* After passing the descriptor to a dvbpsi_DecodeXXXXDr function the raw
* descriptor data is interpreted and decoded into a descriptor specific
* structure. This structure is stored in the p_descriptor::p_decoded membe
r
* by the dvbpsi_DecodeXXXXDr function.
*
* NOTE: It is mandatory to add a decoded descriptor to the 'p_decoded' mem
ber
* of this struct. Failing to do so will result in memory leakage when
* deleting descriptor with @see dvbpsi_DeleteDescriptor.
*/ */
typedef struct dvbpsi_descriptor_s typedef struct dvbpsi_descriptor_s
{ {
uint8_t i_tag; /*!< descriptor_tag */ uint8_t i_tag; /*!< descriptor_tag */
uint8_t i_length; /*!< descriptor_length */ uint8_t i_length; /*!< descriptor_length */
uint8_t * p_data; /*!< content */ uint8_t * p_data; /*!< content */
struct dvbpsi_descriptor_s * p_next; /*!< next element of struct dvbpsi_descriptor_s * p_next; /*!< next element of
the list */ the list */
skipping to change at line 88 skipping to change at line 113
* \return a pointer to the descriptor. * \return a pointer to the descriptor.
*/ */
dvbpsi_descriptor_t* dvbpsi_NewDescriptor(uint8_t i_tag, uint8_t i_length, dvbpsi_descriptor_t* dvbpsi_NewDescriptor(uint8_t i_tag, uint8_t i_length,
uint8_t* p_data); uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DeleteDescriptors * dvbpsi_DeleteDescriptors
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DeleteDescriptors(dvbpsi_descriptor_t* p_descriptor) * \fn void dvbpsi_DeleteDescriptors(dvbpsi_descriptor_t* p_descriptor)
* \brief Destruction of a dvbpsi_descriptor_t structure. * \brief Destruction of a dvbpsi_descriptor_t structure together with the
decoded
* descriptor, if present.
* \param p_descriptor pointer to the first descriptor structure * \param p_descriptor pointer to the first descriptor structure
* \return nothing. * \return nothing.
*/ */
void dvbpsi_DeleteDescriptors(dvbpsi_descriptor_t* p_descriptor); void dvbpsi_DeleteDescriptors(dvbpsi_descriptor_t* p_descriptor);
/**************************************************************************
***
* dvbpsi_AddDescriptor
**************************************************************************
***/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_AddDescriptor(dvbpsi_descriptor_t *p_li
st,
dvbpsi_descriptor_t *p_descriptor
);
* \brief Add a descriptor to the end of descriptor list.
* \param p_list the first descriptor in the descriptor list.
* \param p_descriptor the descriptor to add to the list
* \return a pointer to the first element in the descriptor list.
*/
dvbpsi_descriptor_t *dvbpsi_AddDescriptor(dvbpsi_descriptor_t *p_list,
dvbpsi_descriptor_t *p_descriptor
);
/**************************************************************************
***
* dvbpsi_CanDecodeAsDescriptor
**************************************************************************
***/
/*!
* \fn bool dvbpsi_CanDecodeAsDescriptor(dvbpsi_descriptor_t *p_descriptor,
const uint8_t i_tag);
* \brief Checks if descriptor tag matches.
* \param p_descriptor pointer to descriptor allocated with @see dvbpsi_New
Descriptor
* \param i_tag descriptor tag to evaluate against
* \return true if descriptor can be decoded, false if not.
*/
bool dvbpsi_CanDecodeAsDescriptor(dvbpsi_descriptor_t *p_descriptor, const
uint8_t i_tag);
/**************************************************************************
***
* dvbpsi_IsDescriptorDecoded
**************************************************************************
***/
/*!
* \fn bool dvbpsi_IsDescriptorDecoded(dvbpsi_descriptor_t *p_descriptor);
* \brief Checks if descriptor was already decoded.
* \param p_descriptor pointer to descriptor allocated with @see dvbpsi_New
Descriptor
* \return true if descriptor can be decoded, false if already decoded.
*/
bool dvbpsi_IsDescriptorDecoded(dvbpsi_descriptor_t *p_descriptor);
/**************************************************************************
***
* dvbpsi_DuplicateDecodedDescriptor
**************************************************************************
***/
/*!
* \fn void *dvbpsi_DuplicateDecodedDescriptor(void *p_decoded, ssize_t i_s
ize);
* \brief Duplicate a decoded descriptor. The caller is responsible for rel
easing the associated memory.
* \param p_decoded pointer to decoded descriptor obtained with dvbpsi_Deco
de* function
* \param i_size the sizeof decoded descriptor
* \return pointer to duplicated descriptor, NULL on error.
*/
void *dvbpsi_DuplicateDecodedDescriptor(void *p_decoded, ssize_t i_size);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of descriptor.h" #error "Multiple inclusions of descriptor.h"
#endif #endif
 End of changes. 5 change blocks. 
1 lines changed or deleted 100 lines changed or added


 dr.h   dr.h 
skipping to change at line 49 skipping to change at line 49
#include "dr_06.h" #include "dr_06.h"
#include "dr_07.h" #include "dr_07.h"
#include "dr_08.h" #include "dr_08.h"
#include "dr_09.h" #include "dr_09.h"
#include "dr_0a.h" #include "dr_0a.h"
#include "dr_0b.h" #include "dr_0b.h"
#include "dr_0c.h" #include "dr_0c.h"
#include "dr_0d.h" #include "dr_0d.h"
#include "dr_0e.h" #include "dr_0e.h"
#include "dr_0f.h" #include "dr_0f.h"
#include "dr_13.h"
#include "dr_14.h"
#include "dr_40.h"
#include "dr_41.h"
#include "dr_42.h" #include "dr_42.h"
#include "dr_43.h" #include "dr_43.h"
#include "dr_44.h" #include "dr_44.h"
#include "dr_45.h" #include "dr_45.h"
#include "dr_47.h" #include "dr_47.h"
#include "dr_48.h" #include "dr_48.h"
#include "dr_49.h"
#include "dr_4a.h"
#include "dr_4b.h"
#include "dr_4d.h" #include "dr_4d.h"
#include "dr_4e.h" #include "dr_4e.h"
#include "dr_4f.h"
#include "dr_50.h"
#include "dr_52.h" #include "dr_52.h"
#include "dr_55.h" #include "dr_55.h"
#include "dr_56.h" #include "dr_56.h"
#include "dr_58.h" #include "dr_58.h"
#include "dr_59.h" #include "dr_59.h"
#include "dr_5a.h" #include "dr_5a.h"
#include "dr_62.h"
#include "dr_66.h"
#include "dr_69.h" #include "dr_69.h"
#include "dr_7c.h"
#include "dr_73.h"
#include "dr_76.h"
#include "dr_83.h"
#include "dr_8a.h" #include "dr_8a.h"
#else #else
#error "Multiple inclusions of dr.h" #error "Multiple inclusions of dr.h"
#endif #endif
 End of changes. 5 change blocks. 
0 lines changed or deleted 15 lines changed or added


 dr_02.h   dr_02.h 
skipping to change at line 58 skipping to change at line 58
* *
* This structure is used to store a decoded "video stream" descriptor. * This structure is used to store a decoded "video stream" descriptor.
* (ISO/IEC 13818-1 section 2.6.2). * (ISO/IEC 13818-1 section 2.6.2).
*/ */
/*! /*!
* \typedef struct dvbpsi_vstream_dr_s dvbpsi_vstream_dr_t * \typedef struct dvbpsi_vstream_dr_s dvbpsi_vstream_dr_t
* \brief dvbpsi_vstream_dr_t type definition. * \brief dvbpsi_vstream_dr_t type definition.
*/ */
typedef struct dvbpsi_vstream_dr_s typedef struct dvbpsi_vstream_dr_s
{ {
int b_multiple_frame_rate; /*!< multiple_frame_rate_flag */ bool b_multiple_frame_rate; /*!< multiple_frame_rate_flag */
uint8_t i_frame_rate_code; /*!< frame_rate_code */ uint8_t i_frame_rate_code; /*!< frame_rate_code */
int b_mpeg2; /*!< MPEG_2_flag */ bool b_mpeg2; /*!< MPEG_2_flag */
int b_constrained_parameter; /*!< constrained_parameter_flag */ bool b_constrained_parameter; /*!< constrained_parameter_flag */
int b_still_picture; /*!< still_picture_flag */ bool b_still_picture; /*!< still_picture_flag */
/* used if b_mpeg2 is true */ /* used if b_mpeg2 is true */
uint8_t i_profile_level_indication; /*!< profile_and_level_indication * / uint8_t i_profile_level_indication; /*!< profile_and_level_indication * /
uint8_t i_chroma_format; /*!< chroma_format */ uint8_t i_chroma_format; /*!< chroma_format */
int b_frame_rate_extension; /*!< frame_rate_extension_flag */ bool b_frame_rate_extension; /*!< frame_rate_extension_flag */
} dvbpsi_vstream_dr_t; } dvbpsi_vstream_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeVStreamDr * dvbpsi_DecodeVStreamDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_vstream_dr_t * dvbpsi_DecodeVStreamDr( * \fn dvbpsi_vstream_dr_t * dvbpsi_DecodeVStreamDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "video stream" descriptor decoder. * \brief "video stream" descriptor decoder.
skipping to change at line 89 skipping to change at line 89
* \return a pointer to a new "video stream" descriptor structure which * \return a pointer to a new "video stream" descriptor structure which
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_vstream_dr_t* dvbpsi_DecodeVStreamDr(dvbpsi_descriptor_t * p_descrip tor); dvbpsi_vstream_dr_t* dvbpsi_DecodeVStreamDr(dvbpsi_descriptor_t * p_descrip tor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenVStreamDr * dvbpsi_GenVStreamDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenVStreamDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(
dvbpsi_vstream_dr_t * p_decoded, int b_duplicate) dvbpsi_vstream_dr_t * p_decoded, bool b_duplicate)
* \brief "video stream" descriptor generator. * \brief "video stream" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structur e * \param p_decoded pointer to a decoded "video stream" descriptor structur e
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded, dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_02.h" #error "Multiple inclusions of dr_02.h"
#endif #endif
 End of changes. 6 change blocks. 
8 lines changed or deleted 8 lines changed or added


 dr_03.h   dr_03.h 
/************************************************************************** *** /************************************************************************** ***
* dr_03.h * dr_03.h
* Copyright (C) 2001-2010 VideoLAN * Copyright (C) 2001-2012 VideoLAN
* $Id: dr_03.h,v 1.2 2002/05/10 23:50:36 bozo Exp $ * $Id: dr_03.h,v 1.2 2002/05/10 23:50:36 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
skipping to change at line 58 skipping to change at line 58
* *
* This structure is used to store a decoded "audio stream" descriptor. * This structure is used to store a decoded "audio stream" descriptor.
* (ISO/IEC 13818-1 section 2.6.4). * (ISO/IEC 13818-1 section 2.6.4).
*/ */
/*! /*!
* \typedef struct dvbpsi_astream_dr_s dvbpsi_astream_dr_t * \typedef struct dvbpsi_astream_dr_s dvbpsi_astream_dr_t
* \brief dvbpsi_astream_dr_t type definition. * \brief dvbpsi_astream_dr_t type definition.
*/ */
typedef struct dvbpsi_astream_dr_s typedef struct dvbpsi_astream_dr_s
{ {
int b_free_format; /*!< free_format_flag */ bool b_free_format; /*!< free_format_fla
uint8_t i_id; /*!< ID */ g */
uint8_t i_layer; /*!< layer */ uint8_t i_id; /*!< ID */
uint8_t i_layer; /*!< layer */
bool b_variable_rate_audio_indicator; /*!< variable_rate_a
udio_indicator */
} dvbpsi_astream_dr_t; } dvbpsi_astream_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeAStreamDr * dvbpsi_DecodeAStreamDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_astream_dr_t * dvbpsi_DecodeAStreamDr( * \fn dvbpsi_astream_dr_t * dvbpsi_DecodeAStreamDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "audio stream" descriptor decoder. * \brief "audio stream" descriptor decoder.
skipping to change at line 82 skipping to change at line 83
* \return a pointer to a new "audio stream" descriptor structure which * \return a pointer to a new "audio stream" descriptor structure which
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_astream_dr_t* dvbpsi_DecodeAStreamDr(dvbpsi_descriptor_t * p_descrip tor); dvbpsi_astream_dr_t* dvbpsi_DecodeAStreamDr(dvbpsi_descriptor_t * p_descrip tor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenAStreamDr * dvbpsi_GenAStreamDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenAStreamDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenAStreamDr(
dvbpsi_astream_dr_t * p_decoded, int b_duplicate) dvbpsi_astream_dr_t * p_decoded, bool b_duplicate)
* \brief "audio stream" descriptor generator. * \brief "audio stream" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structur e * \param p_decoded pointer to a decoded "video stream" descriptor structur e
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenAStreamDr(dvbpsi_astream_dr_t * p_decoded, dvbpsi_descriptor_t * dvbpsi_GenAStreamDr(dvbpsi_astream_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_03.h" #error "Multiple inclusions of dr_03.h"
#endif #endif
 End of changes. 5 change blocks. 
7 lines changed or deleted 10 lines changed or added


 dr_04.h   dr_04.h 
skipping to change at line 84 skipping to change at line 84
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_hierarchy_dr_t* dvbpsi_DecodeHierarchyDr( dvbpsi_hierarchy_dr_t* dvbpsi_DecodeHierarchyDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenHierarchyDr * dvbpsi_GenHierarchyDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenHierarchyDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenHierarchyDr(
dvbpsi_hierarchy_dr_t * p_decoded, int b_duplicate) dvbpsi_hierarchy_dr_t * p_decoded, bool b_duplicate )
* \brief "hierarchy" descriptor generator. * \brief "hierarchy" descriptor generator.
* \param p_decoded pointer to a decoded "hierarchy" descriptor structure * \param p_decoded pointer to a decoded "hierarchy" descriptor structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenHierarchyDr(dvbpsi_hierarchy_dr_t * p_decod ed, dvbpsi_descriptor_t * dvbpsi_GenHierarchyDr(dvbpsi_hierarchy_dr_t * p_decod ed,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_04.h" #error "Multiple inclusions of dr_04.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_05.h   dr_05.h 
skipping to change at line 84 skipping to change at line 84
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_registration_dr_t* dvbpsi_DecodeRegistrationDr( dvbpsi_registration_dr_t* dvbpsi_DecodeRegistrationDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenRegistrationDr * dvbpsi_GenRegistrationDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr(
dvbpsi_registration_dr_t * p_decoded, int b_duplica te) dvbpsi_registration_dr_t * p_decoded, bool b_duplic ate)
* \brief "registration" descriptor generator. * \brief "registration" descriptor generator.
* \param p_decoded pointer to a decoded "registration" descriptor structur e * \param p_decoded pointer to a decoded "registration" descriptor structur e
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr( dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr(
dvbpsi_registration_dr_t * p_decode d, dvbpsi_registration_dr_t * p_decode d,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_05.h" #error "Multiple inclusions of dr_05.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_06.h   dr_06.h 
skipping to change at line 81 skipping to change at line 81
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_ds_alignment_dr_t* dvbpsi_DecodeDSAlignmentDr( dvbpsi_ds_alignment_dr_t* dvbpsi_DecodeDSAlignmentDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenDSAlignmentDr * dvbpsi_GenDSAlignmentDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr(
dvbpsi_ds_alignment_dr_t * p_decoded, int b_duplica te) dvbpsi_ds_alignment_dr_t * p_decoded, bool b_duplic ate)
* \brief "data stream alignment" descriptor generator. * \brief "data stream alignment" descriptor generator.
* \param p_decoded pointer to a decoded "data stream alignment" descriptor * \param p_decoded pointer to a decoded "data stream alignment" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr( dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr(
dvbpsi_ds_alignment_dr_t * p_decode d, dvbpsi_ds_alignment_dr_t * p_decode d,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_06.h" #error "Multiple inclusions of dr_06.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_07.h   dr_07.h 
skipping to change at line 83 skipping to change at line 83
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_target_bg_grid_dr_t* dvbpsi_DecodeTargetBgGridDr( dvbpsi_target_bg_grid_dr_t* dvbpsi_DecodeTargetBgGridDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenTargetBgGridDr * dvbpsi_GenTargetBgGridDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
dvbpsi_target_bg_grid_dr_t * p_decoded, int b_duplicate) dvbpsi_target_bg_grid_dr_t * p_decoded, bool b_duplicate)
* \brief "target background grid" descriptor generator. * \brief "target background grid" descriptor generator.
* \param p_decoded pointer to a decoded "target background grid" descripto r * \param p_decoded pointer to a decoded "target background grid" descripto r
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr( dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
dvbpsi_target_bg_grid_dr_t * p_deco ded, dvbpsi_target_bg_grid_dr_t * p_deco ded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_07.h" #error "Multiple inclusions of dr_07.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_08.h   dr_08.h 
skipping to change at line 82 skipping to change at line 82
* \return a pointer to a new "video window" descriptor structure which * \return a pointer to a new "video window" descriptor structure which
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_vwindow_dr_t* dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descrip tor); dvbpsi_vwindow_dr_t* dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descrip tor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenVWindowDr * dvbpsi_GenVWindowDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenVWindowDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(
dvbpsi_vwindow_dr_t * p_decoded, int b_duplicate) dvbpsi_vwindow_dr_t * p_decoded, bool b_duplicate)
* \brief "video window" descriptor generator. * \brief "video window" descriptor generator.
* \param p_decoded pointer to a decoded "video window" descriptor structur e * \param p_decoded pointer to a decoded "video window" descriptor structur e
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(dvbpsi_vwindow_dr_t * p_decoded, dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(dvbpsi_vwindow_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_08.h" #error "Multiple inclusions of dr_08.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_09.h   dr_09.h 
skipping to change at line 84 skipping to change at line 84
* \return a pointer to a new "conditional access" descriptor structure whi ch * \return a pointer to a new "conditional access" descriptor structure whi ch
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_ca_dr_t* dvbpsi_DecodeCADr(dvbpsi_descriptor_t * p_descriptor); dvbpsi_ca_dr_t* dvbpsi_DecodeCADr(dvbpsi_descriptor_t * p_descriptor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenCADr * dvbpsi_GenCADr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenCADr( * \fn dvbpsi_descriptor_t * dvbpsi_GenCADr(
dvbpsi_ca_dr_t * p_decoded, int b_duplicate ) dvbpsi_ca_dr_t * p_decoded, bool b_duplicat e)
* \brief "conditional access" descriptor generator. * \brief "conditional access" descriptor generator.
* \param p_decoded pointer to a decoded "conditional access" descriptor * \param p_decoded pointer to a decoded "conditional access" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenCADr(dvbpsi_ca_dr_t * p_decoded, dvbpsi_descriptor_t * dvbpsi_GenCADr(dvbpsi_ca_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_09.h" #error "Multiple inclusions of dr_09.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_0a.h   dr_0a.h 
skipping to change at line 42 skipping to change at line 42
* ISO/IEC 13818-1 section 2.6.18. * ISO/IEC 13818-1 section 2.6.18.
*/ */
#ifndef _DVBPSI_DR_0A_H_ #ifndef _DVBPSI_DR_0A_H_
#define _DVBPSI_DR_0A_H_ #define _DVBPSI_DR_0A_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define DR_0A_API_VER 2 #define DR_0A_API_VER 2 /*!< descriptor 0a API version
typedef uint8_t iso_639_language_code_t[3]; */
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_iso639_dr_t * dvbpsi_iso639_dr_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_iso639_dr_s * \struct dvbpsi_iso639_dr_s
* \brief "ISO 639 language" descriptor structure. * \brief "ISO 639 language" descriptor structure.
* *
* This structure is used to store a decoded "ISO 639 language" * This structure is used to store a decoded "ISO 639 language"
* descriptor. (ISO/IEC 13818-1 section 2.6.18). * descriptor. (ISO/IEC 13818-1 section 2.6.18).
*/ */
/*! /*!
* \typedef struct dvbpsi_iso639_dr_s dvbpsi_iso639_dr_t * \typedef struct dvbpsi_iso639_dr_s dvbpsi_iso639_dr_t
* \brief dvbpsi_iso639_dr_t type definition. * \brief dvbpsi_iso639_dr_t type definition.
*/ */
typedef struct dvbpsi_iso639_dr_s typedef struct dvbpsi_iso639_dr_s
{ {
uint8_t i_code_count; /*!< length of the i_iso_639_code uint8_t i_code_count; /*!< length of the i_iso_639_code
array */ array */
struct { struct {
iso_639_language_code_t iso_639_code; /*!< ISO_639_language_code */ iso_639_language_code_t iso_639_code; /*!< ISO_639_language_code */
uint8_t i_audio_type; /*!< audio_type */ uint8_t i_audio_type; /*!< audio_type */
} code[64]; } code[64]; /*!< list of ISO 639 codes */
} dvbpsi_iso639_dr_t; } dvbpsi_iso639_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeISO639Dr * dvbpsi_DecodeISO639Dr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_iso639_dr_t * dvbpsi_DecodeISO639Dr( * \fn dvbpsi_iso639_dr_t * dvbpsi_DecodeISO639Dr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "ISO 639 language" descriptor decoder. * \brief "ISO 639 language" descriptor decoder.
skipping to change at line 88 skipping to change at line 87
* \return a pointer to a new "ISO 639 language" descriptor structure which * \return a pointer to a new "ISO 639 language" descriptor structure which
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_iso639_dr_t* dvbpsi_DecodeISO639Dr(dvbpsi_descriptor_t * p_descripto r); dvbpsi_iso639_dr_t* dvbpsi_DecodeISO639Dr(dvbpsi_descriptor_t * p_descripto r);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenISO639Dr * dvbpsi_GenISO639Dr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenISO639Dr( * \fn dvbpsi_descriptor_t * dvbpsi_GenISO639Dr(
dvbpsi_iso639_dr_t * p_decoded, int b_duplicate) dvbpsi_iso639_dr_t * p_decoded, bool b_duplicate)
* \brief "ISO 639 language" descriptor generator. * \brief "ISO 639 language" descriptor generator.
* \param p_decoded pointer to a decoded "ISO 639 language" descriptor * \param p_decoded pointer to a decoded "ISO 639 language" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenISO639Dr(dvbpsi_iso639_dr_t * p_decoded, dvbpsi_descriptor_t * dvbpsi_GenISO639Dr(dvbpsi_iso639_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_0a.h" #error "Multiple inclusions of dr_0a.h"
#endif #endif
 End of changes. 5 change blocks. 
8 lines changed or deleted 8 lines changed or added


 dr_0b.h   dr_0b.h 
skipping to change at line 58 skipping to change at line 58
* *
* This structure is used to store a decoded "system clock" * This structure is used to store a decoded "system clock"
* descriptor. (ISO/IEC 13818-1 section 2.6.20). * descriptor. (ISO/IEC 13818-1 section 2.6.20).
*/ */
/*! /*!
* \typedef struct dvbpsi_system_clock_dr_s dvbpsi_system_clock_dr_t * \typedef struct dvbpsi_system_clock_dr_s dvbpsi_system_clock_dr_t
* \brief dvbpsi_system_clock_dr_t type definition. * \brief dvbpsi_system_clock_dr_t type definition.
*/ */
typedef struct dvbpsi_system_clock_dr_s typedef struct dvbpsi_system_clock_dr_s
{ {
int b_external_clock_ref; /*!< external_clock_reference_indic ator bool b_external_clock_ref; /*!< external_clock_reference_indic ator
*/ */
uint8_t i_clock_accuracy_integer; /*!< clock_accuracy_integer */ uint8_t i_clock_accuracy_integer; /*!< clock_accuracy_integer */
uint8_t i_clock_accuracy_exponent; /*!< clock_accuracy_exponent */ uint8_t i_clock_accuracy_exponent; /*!< clock_accuracy_exponent */
} dvbpsi_system_clock_dr_t; } dvbpsi_system_clock_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeSystemClockDr * dvbpsi_DecodeSystemClockDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
skipping to change at line 84 skipping to change at line 84
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_system_clock_dr_t* dvbpsi_DecodeSystemClockDr( dvbpsi_system_clock_dr_t* dvbpsi_DecodeSystemClockDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenSystemClockDr * dvbpsi_GenSystemClockDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr(
dvbpsi_system_clock_dr_t * p_decoded, int b_duplica te) dvbpsi_system_clock_dr_t * p_decoded, bool b_duplic ate)
* \brief "system clock" descriptor generator. * \brief "system clock" descriptor generator.
* \param p_decoded pointer to a decoded "system clock" descriptor * \param p_decoded pointer to a decoded "system clock" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr( dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr(
dvbpsi_system_clock_dr_t * p_decode d, dvbpsi_system_clock_dr_t * p_decode d,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_0b.h" #error "Multiple inclusions of dr_0b.h"
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 dr_0c.h   dr_0c.h 
skipping to change at line 58 skipping to change at line 58
* *
* This structure is used to store a decoded "multiplex buffer utilization" * This structure is used to store a decoded "multiplex buffer utilization"
* descriptor. (ISO/IEC 13818-1 section 2.6.22). * descriptor. (ISO/IEC 13818-1 section 2.6.22).
*/ */
/*! /*!
* \typedef struct dvbpsi_mx_buff_utilization_dr_s dvbpsi_mx_buff_utilizati on_dr_t * \typedef struct dvbpsi_mx_buff_utilization_dr_s dvbpsi_mx_buff_utilizati on_dr_t
* \brief dvbpsi_systemclock_dr_t type definition. * \brief dvbpsi_systemclock_dr_t type definition.
*/ */
typedef struct dvbpsi_mx_buff_utilization_dr_s typedef struct dvbpsi_mx_buff_utilization_dr_s
{ {
int b_mdv_valid; /*!< mdv_valid_flag */ bool b_mdv_valid; /*!< mdv_valid_flag */
uint16_t i_mx_delay_variation; /*!< multiplex_delay_variation */ uint16_t i_mx_delay_variation; /*!< multiplex_delay_variation */
uint8_t i_mx_strategy; /*!< multiplex_strategy */ uint8_t i_mx_strategy; /*!< multiplex_strategy */
} dvbpsi_mx_buff_utilization_dr_t; } dvbpsi_mx_buff_utilization_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeMxBuffUtilizationDr * dvbpsi_DecodeMxBuffUtilizationDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_mx_buff_utilization_dr_t * dvbpsi_DecodeMxBuffUtilizationDr( * \fn dvbpsi_mx_buff_utilization_dr_t * dvbpsi_DecodeMxBuffUtilizationDr(
skipping to change at line 83 skipping to change at line 83
* structure which contains the decoded data. * structure which contains the decoded data.
*/ */
dvbpsi_mx_buff_utilization_dr_t* dvbpsi_DecodeMxBuffUtilizationDr( dvbpsi_mx_buff_utilization_dr_t* dvbpsi_DecodeMxBuffUtilizationDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenMxBuffUtilizationDr * dvbpsi_GenMxBuffUtilizationDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenMxBuffUtilizationDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenMxBuffUtilizationDr(
dvbpsi_mx_buff_utilization_dr_t * p_decoded, int b_duplicat e) dvbpsi_mx_buff_utilization_dr_t * p_decoded, bool b_duplica te)
* \brief "multiplex buffer utilization" descriptor generator. * \brief "multiplex buffer utilization" descriptor generator.
* \param p_decoded pointer to a decoded "system clock" descriptor * \param p_decoded pointer to a decoded "system clock" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenMxBuffUtilizationDr( dvbpsi_descriptor_t * dvbpsi_GenMxBuffUtilizationDr(
dvbpsi_mx_buff_utilization_dr_t * p_decoded , dvbpsi_mx_buff_utilization_dr_t * p_decoded ,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_0c.h" #error "Multiple inclusions of dr_0c.h"
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 dr_0d.h   dr_0d.h 
skipping to change at line 84 skipping to change at line 84
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_copyright_dr_t* dvbpsi_DecodeCopyrightDr( dvbpsi_copyright_dr_t* dvbpsi_DecodeCopyrightDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenCopyrightDr * dvbpsi_GenCopyrightDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr(
dvbpsi_copyright_dr_t * p_decoded, int b_duplicate) dvbpsi_copyright_dr_t * p_decoded, bool b_duplicate )
* \brief "copyright" descriptor generator. * \brief "copyright" descriptor generator.
* \param p_decoded pointer to a decoded "copyright" descriptor structure * \param p_decoded pointer to a decoded "copyright" descriptor structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr( dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr(
dvbpsi_copyright_dr_t * p_decoded, dvbpsi_copyright_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_0d.h" #error "Multiple inclusions of dr_0d.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_0e.h   dr_0e.h 
skipping to change at line 81 skipping to change at line 81
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_max_bitrate_dr_t* dvbpsi_DecodeMaxBitrateDr( dvbpsi_max_bitrate_dr_t* dvbpsi_DecodeMaxBitrateDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenMaxBitrateDr * dvbpsi_GenMaxBitrateDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr(
dvbpsi_max_bitrate_dr_t * p_decoded, int b_duplicat e) dvbpsi_max_bitrate_dr_t * p_decoded, bool b_duplica te)
* \brief "maximum bitrate" descriptor generator. * \brief "maximum bitrate" descriptor generator.
* \param p_decoded pointer to a decoded "maximum bitrate" descriptor struc ture * \param p_decoded pointer to a decoded "maximum bitrate" descriptor struc ture
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr( dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr(
dvbpsi_max_bitrate_dr_t * p_decoded , dvbpsi_max_bitrate_dr_t * p_decoded ,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_0e.h" #error "Multiple inclusions of dr_0e.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_0f.h   dr_0f.h 
skipping to change at line 81 skipping to change at line 81
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_private_data_dr_t* dvbpsi_DecodePrivateDataDr( dvbpsi_private_data_dr_t* dvbpsi_DecodePrivateDataDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenPrivateDataDr * dvbpsi_GenPrivateDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenPrivateDataDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenPrivateDataDr(
dvbpsi_private_data_dr_t * p_decoded, int b_duplica te) dvbpsi_private_data_dr_t * p_decoded, bool b_duplic ate)
* \brief "private data indicator" descriptor generator. * \brief "private data indicator" descriptor generator.
* \param p_decoded pointer to a decoded "private data indicator" descripto r * \param p_decoded pointer to a decoded "private data indicator" descripto r
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenPrivateDataDr( dvbpsi_descriptor_t * dvbpsi_GenPrivateDataDr(
dvbpsi_private_data_dr_t * p_decode d, dvbpsi_private_data_dr_t * p_decode d,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_0f.h" #error "Multiple inclusions of dr_0f.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_42.h   dr_42.h 
skipping to change at line 84 skipping to change at line 84
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_stuffing_dr_t* dvbpsi_DecodeStuffingDr( dvbpsi_stuffing_dr_t* dvbpsi_DecodeStuffingDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenStuffingDr * dvbpsi_GenStuffingDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenStuffingDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenStuffingDr(
dvbpsi_stuffing_data_dr_t * p_decoded, int b_duplic ate) dvbpsi_stuffing_dr_t *p_decoded, bool b_duplicate)
* \brief "stuffing" descriptor generator. * \brief "stuffing" descriptor generator.
* \param p_decoded pointer to a decoded "stuffing" descriptor * \param p_decoded pointer to a decoded "stuffing" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenStuffingDr( dvbpsi_descriptor_t * dvbpsi_GenStuffingDr(
dvbpsi_stuffing_dr_t * p_decoded, dvbpsi_stuffing_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_42.h" #error "Multiple inclusions of dr_42.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_43.h   dr_43.h 
skipping to change at line 89 skipping to change at line 89
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_sat_deliv_sys_dr_t* dvbpsi_DecodeSatDelivSysDr( dvbpsi_sat_deliv_sys_dr_t* dvbpsi_DecodeSatDelivSysDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenSatDelivSysDr * dvbpsi_GenSatDelivSysDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenSatDelivSysDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenSatDelivSysDr(
dvbpsi_sat_deliv_sys_dr_t * p_decoded, int b_duplic ate) dvbpsi_sat_deliv_sys_dr_t * p_decoded, bool b_dupli cate)
* \brief satellite delivery system descriptor generator. * \brief satellite delivery system descriptor generator.
* \param p_decoded pointer to a decoded satellite delivery system descript or * \param p_decoded pointer to a decoded satellite delivery system descript or
* descriptor structure * descriptor structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenSatDelivSysDr( dvbpsi_descriptor_t * dvbpsi_GenSatDelivSysDr(
dvbpsi_sat_deliv_sys_dr_t * p_decod ed, dvbpsi_sat_deliv_sys_dr_t * p_decod ed,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_43.h" #error "Multiple inclusions of dr_43.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_44.h   dr_44.h 
skipping to change at line 86 skipping to change at line 86
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_cable_deliv_sys_dr_t* dvbpsi_DecodeCableDelivSysDr( dvbpsi_cable_deliv_sys_dr_t* dvbpsi_DecodeCableDelivSysDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenCableDelivSysDr * dvbpsi_GenCableDelivSysDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
dvbpsi_cable_deliv_sys_dr_t * p_decoded, int b_dupl icate) dvbpsi_cable_deliv_sys_dr_t * p_decoded, bool b_dup licate)
* \brief cable delivery system descriptor generator. * \brief cable delivery system descriptor generator.
* \param p_decoded pointer to a decoded cable delivery system descriptor * \param p_decoded pointer to a decoded cable delivery system descriptor
* descriptor structure * descriptor structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if non zero then duplicate the p_decoded structure in to
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr( dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
dvbpsi_cable_deliv_sys_dr_t * p_dec oded, dvbpsi_cable_deliv_sys_dr_t * p_dec oded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_44.h" #error "Multiple inclusions of dr_44.h"
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 dr_45.h   dr_45.h 
skipping to change at line 26 skipping to change at line 26
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA
* *
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \file <dr_45.h> * \file <dr_45.h>
* \author Jean-Paul Saman <jpsaman at videolan dot org> * \author Jean-Paul Saman <jpsaman@videolan.org>
* \brief VBI data descriptor parsing. * \brief VBI data descriptor parsing.
* *
* DVB VBI data descriptor parsing, according to ETSI EN 300 468 * DVB VBI data descriptor parsing, according to ETSI EN 300 468
* version 1.7.1 section 6.2.46 * version 1.7.1 section 6.2.46
* *
* NOTE: this descriptor is known by tag value 0x45 * NOTE: this descriptor is known by tag value 0x45
*/ */
#ifndef _DVBPSI_DR_45_H_ #ifndef _DVBPSI_DR_45_H_
#define _DVBPSI_DR_45_H_ #define _DVBPSI_DR_45_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_vbidata_line_t * dvbpsi_vbidata_line_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_vbidata_line_t * \struct dvbpsi_vbidata_line_s
* \brief one VBI Data line structure. * \brief one VBI Data line structure.
* *
* This structure is used since vbidata_t structure will contain several * This structure is used since vbidata_t structure will contain several
* of these structures * of these structures
*/ */
/*! /*!
* \typedef struct dvbpsi_vbidata_line_s dvbpsi_vbidata_line_t * \typedef struct dvbpsi_vbidata_line_s dvbpsi_vbidata_line_t
* \brief dvbpsi_vbidata_line_t type definition. * \brief dvbpsi_vbidata_line_t type definition.
*/ */
typedef struct dvbpsi_vbidata_line_s typedef struct dvbpsi_vbidata_line_s
{ {
uint8_t i_parity; /* 1 bits */ uint8_t i_parity; /*!< parity bit (1 bits) */
uint8_t i_line_offset; /* 5 bits */ uint8_t i_line_offset; /*!< line offset (5 bits) */
} dvbpsi_vbidata_line_t; } dvbpsi_vbidata_line_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_vbidata_t * dvbpsi_vbidata_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_vbidata_t * \struct dvbpsi_vbidata_s
* \brief one VBI data structure. * \brief one VBI data structure.
* *
* This structure is used since vbi_descriptor will contain several * This structure is used since vbi_descriptor will contain several
* of these structures * of these structures
*/ */
/*! /*!
* \typedef struct dvbpsi_vbidata_s dvbpsi_vbidata_t * \typedef struct dvbpsi_vbidata_s dvbpsi_vbidata_t
* \brief dvbpsi_vbidata_t type definition. * \brief dvbpsi_vbidata_t type definition.
*/ */
typedef struct dvbpsi_vbidata_s typedef struct dvbpsi_vbidata_s
{ {
uint8_t i_data_service_id; /* 8 bits */ uint8_t i_data_service_id; /*!< data service id (8 bits) *
uint8_t i_lines; /
dvbpsi_vbidata_line_t p_lines[255]; uint8_t i_lines; /*!< number of lines */
dvbpsi_vbidata_line_t p_lines[255]; /*!< VBI lines data */
} dvbpsi_vbidata_t; } dvbpsi_vbidata_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_vbi_dr_t * dvbpsi_vbi_dr_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_vbi_dr_s * \struct dvbpsi_vbi_dr_s
* \brief "teletext" descriptor structure. * \brief "teletext" descriptor structure.
* *
* This structure is used to store a decoded "VBI data" * This structure is used to store a decoded "VBI data"
* descriptor. (ETSI EN 300 468 version 1.7.1 section 6.2.46). * descriptor. (ETSI EN 300 468 version 1.7.1 section 6.2.46).
*/ */
/*! /*!
* \typedef struct dvbpsi_vbi_dr_s dvbpsi_vbi_dr_t * \typedef struct dvbpsi_vbi_dr_s dvbpsi_vbi_dr_t
* \brief dvbpsi_vbi_dr_t type definition. * \brief dvbpsi_vbi_dr_t type definition.
*/ */
typedef struct dvbpsi_vbi_dr_s typedef struct dvbpsi_vbi_dr_s
{ {
uint8_t i_services_number; uint8_t i_services_number; /*!< service number */
dvbpsi_vbidata_t p_services[85]; dvbpsi_vbidata_t p_services[85]; /*!< services table */
} dvbpsi_vbi_dr_t; } dvbpsi_vbi_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeVBIDataDr * dvbpsi_DecodeVBIDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr( * \fn dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "VBI data" descriptor decoder. * \brief "VBI data" descriptor decoder.
skipping to change at line 125 skipping to change at line 125
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_vbi_dr_t* dvbpsi_DecodeVBIDataDr( dvbpsi_vbi_dr_t* dvbpsi_DecodeVBIDataDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenVBIDataDr * dvbpsi_GenVBIDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(
dvbpsi_vbi_dr_t * p_decoded, int b_duplicate) dvbpsi_vbi_dr_t * p_decoded, bool b_duplicate)
* \brief "VBI data" descriptor generator. * \brief "VBI data" descriptor generator.
* \param p_decoded pointer to a decoded "VBI data" descriptor * \param p_decoded pointer to a decoded "VBI data" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr( dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(
dvbpsi_vbi_dr_t * p_decoded, dvbpsi_vbi_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_45.h" #error "Multiple inclusions of dr_45.h"
#endif #endif
 End of changes. 9 change blocks. 
13 lines changed or deleted 14 lines changed or added


 dr_47.h   dr_47.h 
skipping to change at line 82 skipping to change at line 82
* \return a pointer to a new "bouquet name" descriptor structure * \return a pointer to a new "bouquet name" descriptor structure
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_bouquet_name_dr_t* dvbpsi_DecodeBouquetNameDr( dvbpsi_bouquet_name_dr_t* dvbpsi_DecodeBouquetNameDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenBouquetNameDr * dvbpsi_GenBouquetNameDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenStuffingDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr(
dvbpsi_bouquet_name_dr_t * p_decoded, int b_duplica dvbpsi_bouquet_name_dr_t * p_decoded, bool b_duplic
te) ate)
* \brief "bouquet name" descriptor generator. * \brief "bouquet name" descriptor generator.
* \param p_decoded pointer to a decoded "bouquet name" descriptor * \param p_decoded pointer to a decoded "bouquet name" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr( dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr(
dvbpsi_bouquet_name_dr_t * p_decode d, dvbpsi_bouquet_name_dr_t * p_decode d,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_47.h" #error "Multiple inclusions of dr_47.h"
#endif #endif
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 lines changed or added


 dr_48.h   dr_48.h 
skipping to change at line 88 skipping to change at line 88
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_service_dr_t* dvbpsi_DecodeServiceDr( dvbpsi_service_dr_t* dvbpsi_DecodeServiceDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenServiceDataDr * dvbpsi_GenServiceDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenServiceDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenServiceDr(
dvbpsi_service_dr_t * p_decoded, int b_duplicate) dvbpsi_service_dr_t * p_decoded, bool b_duplicate)
* \brief "service" descriptor generator. * \brief "service" descriptor generator.
* \param p_decoded pointer to a decoded "service" descriptor * \param p_decoded pointer to a decoded "service" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenServiceDr( dvbpsi_descriptor_t * dvbpsi_GenServiceDr(
dvbpsi_service_dr_t * p_decoded, dvbpsi_service_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_48.h" #error "Multiple inclusions of dr_48.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_4d.h   dr_4d.h 
skipping to change at line 57 skipping to change at line 57
* \brief "short event" descriptor structure. * \brief "short event" descriptor structure.
* *
* This structure is used to store a decoded "short event" descriptor. * This structure is used to store a decoded "short event" descriptor.
*/ */
/*! /*!
* \typedef struct dvbpsi_short_event_dr_s dvbpsi_short_event_dr_t * \typedef struct dvbpsi_short_event_dr_s dvbpsi_short_event_dr_t
* \brief dvbpsi_short_event_dr_t type definition. * \brief dvbpsi_short_event_dr_t type definition.
*/ */
typedef struct dvbpsi_short_event_dr_s typedef struct dvbpsi_short_event_dr_s
{ {
uint8_t i_iso_639_code[3]; uint8_t i_iso_639_code[3]; /*!< ISO 639 language code */
int i_event_name_length; int i_event_name_length; /*!< length of event name */
uint8_t i_event_name[256]; uint8_t i_event_name[256]; /*!< "short event" name */
int i_text_length; int i_text_length; /*!< text length */
uint8_t i_text[256]; uint8_t i_text[256]; /*!< "short event" text */
} dvbpsi_short_event_dr_t; } dvbpsi_short_event_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeShortEventDr * dvbpsi_DecodeShortEventDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_short_event_dr_t * dvbpsi_DecodeShortEventDr( * \fn dvbpsi_short_event_dr_t * dvbpsi_DecodeShortEventDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "short event" descriptor decoder. * \brief "short event" descriptor decoder.
skipping to change at line 83 skipping to change at line 83
* \return a pointer to a new "short event" descriptor structure which * \return a pointer to a new "short event" descriptor structure which
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_short_event_dr_t* dvbpsi_DecodeShortEventDr(dvbpsi_descriptor_t * p_ descriptor); dvbpsi_short_event_dr_t* dvbpsi_DecodeShortEventDr(dvbpsi_descriptor_t * p_ descriptor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenShortEventDr * dvbpsi_GenShortEventDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenShortEventDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenShortEventDr(
dvbpsi_short_event_dr_t * p_decoded, int b_duplicat e) dvbpsi_short_event_dr_t * p_decoded, bool b_duplica te)
* \brief "short event" descriptor generator. * \brief "short event" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structur e * \param p_decoded pointer to a decoded "video stream" descriptor structur e
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenShortEventDr(dvbpsi_short_event_dr_t * p_de coded, dvbpsi_descriptor_t * dvbpsi_GenShortEventDr(dvbpsi_short_event_dr_t * p_de coded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_4d.h" #error "Multiple inclusions of dr_4d.h"
#endif #endif
 End of changes. 4 change blocks. 
8 lines changed or deleted 8 lines changed or added


 dr_4e.h   dr_4e.h 
skipping to change at line 46 skipping to change at line 46
#define _DVBPSI_DR_4E_H_ #define _DVBPSI_DR_4E_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_extended_event_dr_t * dvbpsi_extended_event_dr_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_short_event_dr_s * \struct dvbpsi_extended_event_dr_s
* \brief "short event" descriptor structure. * \brief "extended event" descriptor structure.
* *
* This structure is used to store a decoded "short event" descriptor. * This structure is used to store a decoded "extended event" descriptor.
*/ */
/*! /*!
* \typedef struct dvbpsi_short_event_dr_s dvbpsi_extended_event_dr_t * \typedef struct dvbpsi_short_event_dr_s dvbpsi_extended_event_dr_t
* \brief dvbpsi_extended_event_dr_t type definition. * \brief dvbpsi_extended_event_dr_t type definition.
*/ */
typedef struct dvbpsi_extended_event_dr_s typedef struct dvbpsi_extended_event_dr_s
{ {
uint8_t i_descriptor_number; uint8_t i_descriptor_number; /*!< descriptor number */
uint8_t i_last_descriptor_number; uint8_t i_last_descriptor_number; /*!< last descriptor number */
uint8_t i_iso_639_code[3]; uint8_t i_iso_639_code[3]; /*!< 3 letter ISO 639 language code */
int i_entry_count; int i_entry_count; /*!< entry count */
uint8_t i_item_description_length[126]; uint8_t i_item_description_length[126]; /*!< length of item_description
uint8_t *i_item_description[126]; */
uint8_t i_item_length[126]; uint8_t *i_item_description[126]; /*!< item description */
uint8_t *i_item[126]; uint8_t i_item_length[126]; /*!< length of item */
uint8_t *i_item[126]; /*!< items */
int i_text_length; int i_text_length; /*!< text length */
uint8_t *i_text; uint8_t *i_text; /*!< text */
uint8_t i_buffer[256]; /* do not use */ uint8_t i_buffer[256]; /*!< do not used*/
} dvbpsi_extended_event_dr_t; } dvbpsi_extended_event_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeExtendedEventDr * dvbpsi_DecodeExtendedEventDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_extended_event_dr_t * dvbpsi_DecodeExtendedEventDr( * \fn dvbpsi_extended_event_dr_t * dvbpsi_DecodeExtendedEventDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "short event" descriptor decoder. * \brief "short event" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure * \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "short event" descriptor structure which * \return a pointer to a new "short event" descriptor structure which
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_extended_event_dr_t* dvbpsi_DecodeExtendedEventDr(dvbpsi_descriptor_ t * p_descriptor); dvbpsi_extended_event_dr_t* dvbpsi_DecodeExtendedEventDr(dvbpsi_descriptor_ t * p_descriptor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenExtendedEventDr * dvbpsi_GenExtendedEventDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(
dvbpsi_extended_event_dr_t * p_decoded, int b_dupli cate) dvbpsi_extended_event_dr_t * p_decoded, bool b_dupl icate)
* \brief "short event" descriptor generator. * \brief "short event" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structur e * \param p_decoded pointer to a decoded "video stream" descriptor structur e
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(dvbpsi_extended_event_dr_t * p_decoded, dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(dvbpsi_extended_event_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_4e.h" #error "Multiple inclusions of dr_4e.h"
#endif #endif
 End of changes. 10 change blocks. 
17 lines changed or deleted 18 lines changed or added


 dr_52.h   dr_52.h 
skipping to change at line 42 skipping to change at line 42
*/ */
#ifndef _DVBPSI_DR_52_H_ #ifndef _DVBPSI_DR_52_H_
#define _DVBPSI_DR_52_H_ #define _DVBPSI_DR_52_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_service_dr_t * dvbpsi_stream_identifier_dr_s
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_service_dr_s * \struct dvbpsi_stream_identifier_dr_s
* \brief "stream identifier" descriptor structure. * \brief "stream identifier" descriptor structure.
* *
* This structure is used to store a decoded "stream identifier" * This structure is used to store a decoded "stream identifier"
* descriptor. (ETSI EN 300 468 section 6.2.37). * descriptor. (ETSI EN 300 468 section 6.2.37).
*/ */
/*! /*!
* \typedef struct dvbpsi_service_dr_s dvbpsi_stream_identifier_dr_t * \typedef struct dvbpsi_stream_identifier_dr_s dvbpsi_stream_identifier_d r_t
* \brief dvbpsi_stream_identifier_dr_t type definition. * \brief dvbpsi_stream_identifier_dr_t type definition.
*/ */
typedef struct dvbpsi_stream_identifier_dr_s typedef struct dvbpsi_stream_identifier_dr_s
{ {
uint8_t i_component_tag; /*!< component tag*/ uint8_t i_component_tag; /*!< component tag*/
} dvbpsi_stream_identifier_dr_t; } dvbpsi_stream_identifier_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeStreamIdentifierDr * dvbpsi_DecodeStreamIdentifierDr
************************************************************************** ***/ ************************************************************************** ***/
skipping to change at line 79 skipping to change at line 79
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_stream_identifier_dr_t* dvbpsi_DecodeStreamIdentifierDr( dvbpsi_stream_identifier_dr_t* dvbpsi_DecodeStreamIdentifierDr(
dvbpsi_descriptor_t * p_descriptor); dvbpsi_descriptor_t * p_descriptor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenStreamIdentifierDr * dvbpsi_GenStreamIdentifierDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenStreamIdentifierDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenStreamIdentifierDr(
dvbpsi_service_dr_t * p_decoded, int b_duplicate) dvbpsi_stream_identifier_dr_t *p_decoded, bool b_du plicate)
* \brief "stream identifier" descriptor generator. * \brief "stream identifier" descriptor generator.
* \param p_decoded pointer to a decoded "stream identifier" descriptor * \param p_decoded pointer to a decoded "stream identifier" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenStreamIdentifierDr( dvbpsi_descriptor_t * dvbpsi_GenStreamIdentifierDr(
dvbpsi_stream_identifier_dr_t * p_d ecoded, dvbpsi_stream_identifier_dr_t * p_d ecoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_52.h" #error "Multiple inclusions of dr_52.h"
#endif #endif
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added


 dr_55.h   dr_55.h 
skipping to change at line 56 skipping to change at line 56
* *
* This structure is used since parental_rating_descriptor will contain sev eral * This structure is used since parental_rating_descriptor will contain sev eral
* coutry/rating pairs. * coutry/rating pairs.
*/ */
/*! /*!
* \typedef struct dvbpsi_parental_rating_s dvbpsi_parental_rating_t * \typedef struct dvbpsi_parental_rating_s dvbpsi_parental_rating_t
* \brief dvbpsi_parental_rating_t type definition. * \brief dvbpsi_parental_rating_t type definition.
*/ */
typedef struct dvbpsi_parental_rating_s typedef struct dvbpsi_parental_rating_s
{ {
uint32_t i_country_code; uint32_t i_country_code; /*!< country code of parental rating */
uint8_t i_rating; uint8_t i_rating; /*!< parental rating */
} dvbpsi_parental_rating_t; } dvbpsi_parental_rating_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_parental_rating_dr_t * dvbpsi_parental_rating_dr_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_parental_rating_dr_s * \struct dvbpsi_parental_rating_dr_s
* \brief "parental_rating" descriptor structure. * \brief "parental_rating" descriptor structure.
* *
* This structure is used to store a decoded "parental_rating" * This structure is used to store a decoded "parental_rating"
* descriptor. (ETSI EN 300 468 section 6.2.26). * descriptor. (ETSI EN 300 468 section 6.2.26).
*/ */
/*! /*!
* \typedef struct dvbpsi_parental_rating_dr_s dvbpsi_parental_rating_dr_t * \typedef struct dvbpsi_parental_rating_dr_s dvbpsi_parental_rating_dr_t
* \brief dvbpsi_parental_rating_dr_t type definition. * \brief dvbpsi_parental_rating_dr_t type definition.
*/ */
typedef struct dvbpsi_parental_rating_dr_s typedef struct dvbpsi_parental_rating_dr_s
{ {
uint8_t i_ratings_number; uint8_t i_ratings_number; /*!< number of rating *
dvbpsi_parental_rating_t p_parental_rating[64]; /
dvbpsi_parental_rating_t p_parental_rating[64]; /*!< parental rating ta
ble */
} dvbpsi_parental_rating_dr_t; } dvbpsi_parental_rating_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeParentalRatingDataDr * dvbpsi_DecodeParentalRatingDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_parental_rating_dr_t * dvbpsi_DecodeParentalRatingDr( * \fn dvbpsi_parental_rating_dr_t * dvbpsi_DecodeParentalRatingDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "parental_rating" descriptor decoder. * \brief "parental_rating" descriptor decoder.
skipping to change at line 101 skipping to change at line 101
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_parental_rating_dr_t* dvbpsi_DecodeParentalRatingDr( dvbpsi_parental_rating_dr_t* dvbpsi_DecodeParentalRatingDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenParentalRatingDataDr * dvbpsi_GenParentalRatingDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenParentalRatingDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenParentalRatingDr(
dvbpsi_parental_rating_dr_t * p_decoded, int b_dupl icate) dvbpsi_parental_rating_dr_t * p_decoded, bool b_dup licate)
* \brief "parental_rating" descriptor generator. * \brief "parental_rating" descriptor generator.
* \param p_decoded pointer to a decoded "parental_rating" descriptor * \param p_decoded pointer to a decoded "parental_rating" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenParentalRatingDr( dvbpsi_descriptor_t * dvbpsi_GenParentalRatingDr(
dvbpsi_parental_rating_dr_t * p_dec oded, dvbpsi_parental_rating_dr_t * p_dec oded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_55.h" #error "Multiple inclusions of dr_55.h"
#endif #endif
 End of changes. 5 change blocks. 
7 lines changed or deleted 9 lines changed or added


 dr_56.h   dr_56.h 
skipping to change at line 26 skipping to change at line 26
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA
* *
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \file <dr_56.h> * \file <dr_56.h>
* \author Derk-Jan Hartman <hartman at videolan dot org> * \author Derk-Jan Hartman <hartman@videolan.org>
* \brief EBU Teletext descriptor parsing. * \brief EBU Teletext descriptor parsing.
* *
* DVB EBU Teletext descriptor parsing, according to ETSI EN 300 468 * DVB EBU Teletext descriptor parsing, according to ETSI EN 300 468
* version 1.7.1 section 6.2.42 and 6.2.47. * version 1.7.1 section 6.2.42 and 6.2.47.
* *
* NOTE: this descriptor is known by tag value 0x56 AND 0x46 * NOTE: this descriptor is known by tag value 0x56 AND 0x46
*/ */
#ifndef _DVBPSI_DR_56_H_ #ifndef _DVBPSI_DR_56_H_
#define _DVBPSI_DR_56_H_ #define _DVBPSI_DR_56_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_teletext_t * dvbpsi_teletext_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_teletextpage_t * \struct dvbpsi_teletextpage_s
* \brief one teletext page structure. * \brief one teletext page structure.
* *
* This structure is used since teletext_descriptor will contain several * This structure is used since teletext_descriptor will contain several
* pages * pages
*/ */
/*! /*!
* \typedef struct dvbpsi_teletextpage_s dvbpsi_teletextpage_t * \typedef struct dvbpsi_teletextpage_s dvbpsi_teletextpage_t
* \brief dvbpsi_teletextpage_t type definition. * \brief dvbpsi_teletextpage_t type definition.
*/ */
typedef struct dvbpsi_teletextpage_s typedef struct dvbpsi_teletextpage_s
{ {
uint8_t i_iso6392_language_code[3]; /* 24 bits */ uint8_t i_iso6392_language_code[3]; /*!< ISO 6392 Language codes (2
uint8_t i_teletext_type; /* 5 bits */ 4 bits) */
uint8_t i_teletext_magazine_number; /* 3 bits */ uint8_t i_teletext_type; /*!< teletext type (5 bits) */
uint8_t i_teletext_page_number; /* 8 bits */ uint8_t i_teletext_magazine_number; /*!< teletext magazine number (
3 bits) */
uint8_t i_teletext_page_number; /*!< teletext page number (8 bi
ts) */
} dvbpsi_teletextpage_t; } dvbpsi_teletextpage_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_teletext_dr_t * dvbpsi_teletext_dr_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_teletext_dr_s * \struct dvbpsi_teletext_dr_s
* \brief "teletext" descriptor structure. * \brief "teletext" descriptor structure.
* *
* This structure is used to store a decoded "teletext" * This structure is used to store a decoded "teletext"
* descriptor. (ETSI EN 300 468 version 1.7.1 section 6.2.42 and 6.2.47). * descriptor. (ETSI EN 300 468 version 1.7.1 section 6.2.42 and 6.2.47).
*/ */
/*! /*!
* \typedef struct dvbpsi_teletext_dr_s dvbpsi_teletext_dr_t * \typedef struct dvbpsi_teletext_dr_s dvbpsi_teletext_dr_t
* \brief dvbpsi_teletext_dr_t type definition. * \brief dvbpsi_teletext_dr_t type definition.
*/ */
typedef struct dvbpsi_teletext_dr_s typedef struct dvbpsi_teletext_dr_s
{ {
uint8_t i_pages_number; uint8_t i_pages_number; /*!< number of pages */
dvbpsi_teletextpage_t p_pages[64]; dvbpsi_teletextpage_t p_pages[64]; /*!< teletext pages */
} dvbpsi_teletext_dr_t; } dvbpsi_teletext_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeTeletextDataDr * dvbpsi_DecodeTeletextDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_teletext_dr_t * dvbpsi_DecodeTeletextDataDr( * \fn dvbpsi_teletext_dr_t * dvbpsi_DecodeTeletextDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "teletext" descriptor decoder. * \brief "teletext" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure * \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "teletext" descriptor structure * \return a pointer to a new "teletext" descriptor structure
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_teletext_dr_t* dvbpsi_DecodeTeletextDr( dvbpsi_teletext_dr_t* dvbpsi_DecodeTeletextDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenTeletextDr * dvbpsi_GenTeletextDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenTeletextDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(
dvbpsi_teletext_dr_t * p_decoded, int b_duplicate) dvbpsi_teletext_dr_t * p_decoded, bool b_duplicate)
* \brief "teletext" descriptor generator. * \brief "teletext" descriptor generator.
* \param p_decoded pointer to a decoded "teletext" descriptor * \param p_decoded pointer to a decoded "teletext" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenTeletextDr( dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(
dvbpsi_teletext_dr_t * p_decoded, dvbpsi_teletext_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_56.h" #error "Multiple inclusions of dr_56.h"
#endif #endif
 End of changes. 8 change blocks. 
12 lines changed or deleted 15 lines changed or added


 dr_58.h   dr_58.h 
skipping to change at line 83 skipping to change at line 83
* *
* This structure is used to store a decoded "local time offset" * This structure is used to store a decoded "local time offset"
* descriptor. (ETSI EN 300 468 section 6.2.19). * descriptor. (ETSI EN 300 468 section 6.2.19).
*/ */
/*! /*!
* \typedef struct dvbpsi_local_time_offset_dr_s dvbpsi_local_time_offset_d r_t * \typedef struct dvbpsi_local_time_offset_dr_s dvbpsi_local_time_offset_d r_t
* \brief dvbpsi_local_time_offset_dr_t type definition. * \brief dvbpsi_local_time_offset_dr_t type definition.
*/ */
typedef struct dvbpsi_local_time_offset_dr_s typedef struct dvbpsi_local_time_offset_dr_s
{ {
uint8_t i_local_time_offsets_number; uint8_t i_local_time_offsets_number; /*!< local time off
dvbpsi_local_time_offset_t p_local_time_offset[19]; set number */
dvbpsi_local_time_offset_t p_local_time_offset[19]; /*!< local time off
set */
} dvbpsi_local_time_offset_dr_t; } dvbpsi_local_time_offset_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeLocalTimeOffsetDr * dvbpsi_DecodeLocalTimeOffsetDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_local_time_offset_dr_t * dvbpsi_DecodeLocalTimeOffsetDr( * \fn dvbpsi_local_time_offset_dr_t * dvbpsi_DecodeLocalTimeOffsetDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "local time offset" descriptor decoder. * \brief "local time offset" descriptor decoder.
skipping to change at line 107 skipping to change at line 107
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_local_time_offset_dr_t* dvbpsi_DecodeLocalTimeOffsetDr( dvbpsi_local_time_offset_dr_t* dvbpsi_DecodeLocalTimeOffsetDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenLocalTimeOffsetDr * dvbpsi_GenLocalTimeOffsetDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenLocalTimeOffsetDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenLocalTimeOffsetDr(
dvbpsi_local_time_offset_data_dr_t * p_decoded, int b_duplicate) dvbpsi_local_time_offset_dr_t * p_decoded, bool b_d uplicate)
* \brief "local time offset" descriptor generator. * \brief "local time offset" descriptor generator.
* \param p_decoded pointer to a decoded "local time offset" descriptor * \param p_decoded pointer to a decoded "local time offset" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenLocalTimeOffsetDr( dvbpsi_descriptor_t * dvbpsi_GenLocalTimeOffsetDr(
dvbpsi_local_time_offset_dr_t * p_d ecoded, dvbpsi_local_time_offset_dr_t * p_d ecoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_58.h" #error "Multiple inclusions of dr_58.h"
#endif #endif
 End of changes. 4 change blocks. 
5 lines changed or deleted 7 lines changed or added


 dr_59.h   dr_59.h 
skipping to change at line 57 skipping to change at line 57
* *
* This structure is used since subtitling_descriptor will contain several * This structure is used since subtitling_descriptor will contain several
* subtitles * subtitles
*/ */
/*! /*!
* \typedef struct dvbpsi_subtitle_s dvbpsi_subtitle_t * \typedef struct dvbpsi_subtitle_s dvbpsi_subtitle_t
* \brief dvbpsi_subtitle_t type definition. * \brief dvbpsi_subtitle_t type definition.
*/ */
typedef struct dvbpsi_subtitle_s typedef struct dvbpsi_subtitle_s
{ {
uint8_t i_iso6392_language_code[3]; uint8_t i_iso6392_language_code[3]; /*!< ISO 6392 language code */
uint8_t i_subtitling_type; uint8_t i_subtitling_type; /*!< subtitling type */
uint16_t i_composition_page_id; uint16_t i_composition_page_id; /*!< composition page id */
uint16_t i_ancillary_page_id; uint16_t i_ancillary_page_id; /*!< ancillayr page id */
} dvbpsi_subtitle_t; } dvbpsi_subtitle_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_subtitling_dr_t * dvbpsi_subtitling_dr_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_subtitling_dr_s * \struct dvbpsi_subtitling_dr_s
* \brief "subtitling" descriptor structure. * \brief "subtitling" descriptor structure.
* *
* This structure is used to store a decoded "subtitling" * This structure is used to store a decoded "subtitling"
* descriptor. (ETSI EN 300 468 section 6.2.30). * descriptor. (ETSI EN 300 468 section 6.2.30).
*/ */
/*! /*!
* \typedef struct dvbpsi_subtitling_dr_s dvbpsi_subtitling_dr_t * \typedef struct dvbpsi_subtitling_dr_s dvbpsi_subtitling_dr_t
* \brief dvbpsi_subtitling_dr_t type definition. * \brief dvbpsi_subtitling_dr_t type definition.
*/ */
typedef struct dvbpsi_subtitling_dr_s typedef struct dvbpsi_subtitling_dr_s
{ {
uint8_t i_subtitles_number; uint8_t i_subtitles_number; /*!< subtiles number */
dvbpsi_subtitle_t p_subtitle[20]; dvbpsi_subtitle_t p_subtitle[20]; /*!< subtitles */
} dvbpsi_subtitling_dr_t; } dvbpsi_subtitling_dr_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DecodeSubtitlingDataDr * dvbpsi_DecodeSubtitlingDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_subtitling_dr_t * dvbpsi_DecodeSubtitlingDr( * \fn dvbpsi_subtitling_dr_t * dvbpsi_DecodeSubtitlingDr(
dvbpsi_descriptor_t * p_descriptor) dvbpsi_descriptor_t * p_descriptor)
* \brief "subtitling" descriptor decoder. * \brief "subtitling" descriptor decoder.
skipping to change at line 104 skipping to change at line 104
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_subtitling_dr_t* dvbpsi_DecodeSubtitlingDr( dvbpsi_subtitling_dr_t* dvbpsi_DecodeSubtitlingDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenSubtitlingDataDr * dvbpsi_GenSubtitlingDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr(
dvbpsi_subtitling_dr_t * p_decoded, int b_duplicate ) dvbpsi_subtitling_dr_t * p_decoded, bool b_duplicat e)
* \brief "subtitling" descriptor generator. * \brief "subtitling" descriptor generator.
* \param p_decoded pointer to a decoded "subtitling" descriptor * \param p_decoded pointer to a decoded "subtitling" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if bool then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr( dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr(
dvbpsi_subtitling_dr_t * p_decoded, dvbpsi_subtitling_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_59.h" #error "Multiple inclusions of dr_59.h"
#endif #endif
 End of changes. 5 change blocks. 
9 lines changed or deleted 9 lines changed or added


 dr_5a.h   dr_5a.h 
skipping to change at line 92 skipping to change at line 92
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_terr_deliv_sys_dr_t* dvbpsi_DecodeTerrDelivSysDr( dvbpsi_terr_deliv_sys_dr_t* dvbpsi_DecodeTerrDelivSysDr(
dvbpsi_descriptor_t * p_descriptor) ; dvbpsi_descriptor_t * p_descriptor) ;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenTerrDelivSysDr * dvbpsi_GenTerrDelivSysDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr(
dvbpsi_terr_deliv_sys_dr_t * p_decoded, int b_dupli cate) dvbpsi_terr_deliv_sys_dr_t * p_decoded, bool b_dupl icate)
* \brief terrestrial delivery system descriptor generator. * \brief terrestrial delivery system descriptor generator.
* \param p_decoded pointer to a decoded terrestrial delivery system descri ptor * \param p_decoded pointer to a decoded terrestrial delivery system descri ptor
* descriptor structure * descriptor structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr( dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr(
dvbpsi_terr_deliv_sys_dr_t * p_deco ded, dvbpsi_terr_deliv_sys_dr_t * p_deco ded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_5a.h" #error "Multiple inclusions of dr_5a.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dr_69.h   dr_69.h 
skipping to change at line 78 skipping to change at line 78
* \param p_descriptor pointer to the descriptor structure * \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "video stream" descriptor structure which * \return a pointer to a new "video stream" descriptor structure which
* contains the decoded data. * contains the decoded data.
*/ */
dvbpsi_PDC_dr_t* dvbpsi_DecodePDCDr(dvbpsi_descriptor_t * p_descriptor); dvbpsi_PDC_dr_t* dvbpsi_DecodePDCDr(dvbpsi_descriptor_t * p_descriptor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenPDCDr * dvbpsi_GenPDCDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenVStreamDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenPDCDr(
dvbpsi_PDC_dr_t * p_decoded, int b_duplicate) dvbpsi_PDC_dr_t * p_decoded, bool b_duplicate)
* \brief PDC descriptor generator. * \brief PDC descriptor generator.
* \param p_decoded pointer to a decoded PDC descriptor structure * \param p_decoded pointer to a decoded PDC descriptor structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenPDCDr(dvbpsi_PDC_dr_t * p_decoded, dvbpsi_descriptor_t * dvbpsi_GenPDCDr(dvbpsi_PDC_dr_t * p_decoded,
int b_duplicate); bool b_duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_69.h" #error "Multiple inclusions of dr_69.h"
#endif #endif
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added


 dr_8a.h   dr_8a.h 
skipping to change at line 77 skipping to change at line 77
* \return a pointer to a new "CUEI" descriptor structure * \return a pointer to a new "CUEI" descriptor structure
* which contains the decoded data. * which contains the decoded data.
*/ */
dvbpsi_cuei_dr_t* dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor); dvbpsi_cuei_dr_t* dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenCUEIDataDr * dvbpsi_GenCUEIDataDr
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenCUEIDr( * \fn dvbpsi_descriptor_t * dvbpsi_GenCUEIDr(
dvbpsi_cuei_dr_t * p_decoded, int b_duplicate) dvbpsi_cuei_dr_t * p_decoded, bool b_duplicate)
* \brief "CUEI" descriptor generator. * \brief "CUEI" descriptor generator.
* \param p_decoded pointer to a decoded "CUEI" descriptor * \param p_decoded pointer to a decoded "CUEI" descriptor
* structure * structure
* \param b_duplicate if non zero then duplicate the p_decoded structure in to * \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded d ata. * \return a pointer to a new descriptor structure which contains encoded d ata.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenCUEIDr(dvbpsi_cuei_dr_t * p_decoded); dvbpsi_descriptor_t * dvbpsi_GenCUEIDr(dvbpsi_cuei_dr_t * p_decoded, bool b _duplicate);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dr_8a.h" #error "Multiple inclusions of dr_8a.h"
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 dvbpsi.h   dvbpsi.h 
/************************************************************************** *** /************************************************************************** ***
* dvbpsi.h * dvbpsi.h
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2012 VideoLAN
* $Id$ * $Id$
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA
* *
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \file <dvbpsi.h> * \file <dvbpsi.h>
* \author Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * \author Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* \brief Application interface for all DVB/PSI decoders. * \brief Application interface for all DVB/PSI decoders.
* *
* Application interface for all DVB/PSI decoders. The generic decoder * Application interface for all DVB/PSI decoders. The generic decoder
* structure is public so that external decoders are allowed. * structure is public so that external decoders are allowed.
*/ */
#ifndef _DVBPSI_DVBPSI_H_ #ifndef _DVBPSI_DVBPSI_H_
#define _DVBPSI_DVBPSI_H_ #define _DVBPSI_DVBPSI_H_
#define DVBPSI_VERSION 0.2.2 #define DVBPSI_VERSION 1.0.0 /*!< Human readible DVBPSI v
#define DVBPSI_VERSION_INT ((0<<16)+(2<<8)+2) ersion*/
#define DVBPSI_VERSION_INT ((1<<16)+(0<<8)+0) /*!< Machine readible DVBPSI
version */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_handle * Helper for GCC version checks borrowed from VLC.
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef struct dvbpsi_decoder_s * dvbpsi_handle * \def DVBPSI_GCC_VERSION(maj,min)
* \brief Decoder abstration. * \brief Helper macro for GCC version check
*/
#ifdef __GNUC__
# define DVBPSI_GCC_VERSION(maj,min) \
((__GNUC__ > (maj)) || (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min)))
#else
# define DVBPSI_GCC_VERSION(maj,min) (0)
#endif
/**************************************************************************
***
* dvbpsi_t
**************************************************************************
***/
/*!
* \typedef struct dvbpsi_s dvbpsi_t
* \brief DVBPSI handle structure abstration.
*/
typedef struct dvbpsi_s dvbpsi_t;
/*!
* \enum dvbpsi_msg_level
* \brief DVBPSI message level enumeration type
*/
enum dvbpsi_msg_level
{
DVBPSI_MSG_NONE = -1, /*!< No messages */
DVBPSI_MSG_ERROR = 0, /*!< Error messages only */
DVBPSI_MSG_WARN = 1, /*!< Error and Warning messages */
DVBPSI_MSG_DEBUG = 2, /*!< Error, warning and debug messages */
};
/*!
* \typedef enum dvbpsi_msg_level dvbpsi_msg_level_t
* \brief DVBPSI message level enumeration type definition
*/
typedef enum dvbpsi_msg_level dvbpsi_msg_level_t;
/**************************************************************************
***
* dvbpsi_message_cb
**************************************************************************
***/
/*!
* \typedef void (* dvbpsi_message_cb)(dvbpsi_t *p_decoder,
* const dvbpse_msg_level_t level,
* const char* msg)
* \brief Callback type definition.
*/
typedef void (* dvbpsi_message_cb)(dvbpsi_t *handle,
const dvbpsi_msg_level_t level,
const char* msg);
/**************************************************************************
***
* dvbpsi_decoder_t
**************************************************************************
***/
/*!
* \typedef struct dvbpsi_decoder_s dvbpsi_decoder_t
* \brief dvbpsi_decoder_t type definition.
*/
typedef struct dvbpsi_decoder_s dvbpsi_decoder_t;
/*!
* \def DVBPSI_DECODER(x)
* \brief Helper macro for casting a private decoder into a dvbpsi_decoder_
t
*/
/* Clever cast borrowed from VLC */
#if DVBPSI_GCC_VERSION(4,0)
# ifndef __cplusplus
# define DVBPSI_DECODER( x ) \
__builtin_choose_expr( \
__builtin_offsetof(__typeof__(*(x)), i_magic), \
(void)0, \
(dvbpsi_decoder_t *)(x))
# else
# define DVBPSI_DECODER( x ) \
((dvbpsi_decoder_t *)(x) \
+ 0 * __builtin_offsetof(__typeof__(*(x)), i_magic))
# endif
#else
# define DVBPSI_DECODER(x) ((dvbpsi_decoder_t *)(x))
#endif
/**************************************************************************
***
* dvbpsi_t
**************************************************************************
***/
/*!
* \struct dvbpsi_s
* \brief DVBPSI handle structure
*
* This structure provides a handle to libdvbpsi API and should be used ins
tead
* of dvbpsi_decoder_t.
*/
/*!
* \typedef struct dvbpsi_s dvbpsi_t
* \brief dvbpsi_t type definition.
*/
struct dvbpsi_s
{
dvbpsi_decoder_t *p_decoder; /*!< private pointer
to
specific decoder
*/
/* Messages callback */
dvbpsi_message_cb pf_message; /*!< Log message ca
llback */
enum dvbpsi_msg_level i_msg_level; /*!< Log level */
/* private data pointer for use by caller, not by libdvbpsi itself ! */
void *p_sys; /*!< pointer to pri
vate data
from caller. Do n
ot use
from inside libdv
bpsi. It
will crash any ap
plication. */
};
/**************************************************************************
***
* dvbpsi_new
**************************************************************************
***/
/*!
* \fn dvbpsi_t *dvbpsi_new(dvbpsi_message_cb callback, enum dvbpsi_msg_lev
el level)
* \brief Create a new dvbpsi_t handle to be used by PSI decoders or encode
rs
* \param callback message callback handler, if NULL then no errors, warnin
gs
* or debug messages will be sent to the caller application
* \param level enum dvbpsi_msg_level for filtering logging messages
* \return pointer to dvbpsi_t malloced data
*
* Creates a handle to use with PSI decoder and encoder API functions. The
* handle must be freed with dvbpsi_delete().
*/
dvbpsi_t *dvbpsi_new(dvbpsi_message_cb callback, enum dvbpsi_msg_level leve
l);
/**************************************************************************
***
* dvbpsi_delete
**************************************************************************
***/
/*!
* \fn void dvbpsi_delete(dvbpsi_t *p_dvbpsi)
* \brief Deletes a dvbpsi_t handle created with dvbpsi_new
* \param p_dvbpsi pointer to dvbpsi_t malloced data
* \return nothing
*
* Delets a dvbpsi_t handle by calling free(handle). Make sure to detach an
y
* decoder of encoder before deleting the dvbpsi handle.
*/ */
typedef struct dvbpsi_decoder_s * dvbpsi_handle __attribute__((deprecated)) ; void dvbpsi_delete(dvbpsi_t *p_dvbpsi);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_PushPacket * dvbpsi_packet_push
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data) * \fn bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t* p_data)
* \brief Injection of a TS packet into a PSI decoder. * \brief Injection of a TS packet into a PSI decoder.
* \param h_dvbpsi handle to the decoder * \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_data pointer to a 188 bytes playload of a TS packet * \param p_data pointer to a 188 bytes playload of a TS packet
* \return nothing. * \return true when packet has been handled, false on error.
* *
* Injection of a TS packet into a PSI decoder. * Injection of a TS packet into a PSI decoder.
*/ */
__attribute__((deprecated)) bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t* p_data);
void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* The following definitions are just here to allow external decoders but * dvbpsi_psi_section_t
* shouldn't be used for any other purpose.
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef struct dvbpsi_psi_section_s dvbpsi_psi_section_t * \typedef struct dvbpsi_psi_section_s dvbpsi_psi_section_t
* \brief dvbpsi_psi_section_t type definition. * \brief dvbpsi_psi_section_t type definition.
*/ */
typedef struct dvbpsi_psi_section_s dvbpsi_psi_section_t; typedef struct dvbpsi_psi_section_s dvbpsi_psi_section_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_callback * dvbpsi_callback_gather_t
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_callback)(dvbpsi_handle p_decoder, * \typedef void (* dvbpsi_callback_gather_t)(dvbpsi_t *p_dvbpsi,
dvbpsi_psi_section_t* p_section) dvbpsi_psi_section_t* p_secti
* \brief Callback type definition. on)
* \brief Callback used for gathering psi sections on behalf of PSI decoder
s.
*/ */
typedef void (* dvbpsi_callback)(dvbpsi_handle p_decoder, typedef void (* dvbpsi_callback_gather_t)(dvbpsi_t *p_dvbpsi, /*!< pointer
dvbpsi_psi_section_t* p_section); to dvbpsi handle */
dvbpsi_psi_section_t* p_section); /*!< pointer
to psi section */
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_decoder_t * DVBPSI_DECODER_COMMON
**************************************************************************
***/
/*!
* \def DVBPSI_DECODER_COMMON
* \brief Common members for all dvbpsi table decoders. These should be the
first
* members of a table decoder struct, such that they can be casted to a
* dvbpsi_decoder_t type.
*/
#define DVBPSI_DECODER_COMMON
\
/*!
\
* \name DVBPSI_DECODER_COMMON
\
* these members are common for all dvbpsi_decoder_t
\
*/
\
/**@{*/
\
uint8_t i_magic[3]; /*!< Reserved magic value */
\
bool b_complete_header; /*!< Flag for header completion */
\
bool b_discontinuity; /*!< Discontinuity flag */
\
bool b_current_valid; /*!< Current valid indicator */
\
uint8_t i_continuity_counter; /*!< Continuity counter */
\
uint8_t i_last_section_number;/*!< Last received section number */
\
dvbpsi_psi_section_t *p_current_section; /*!< Current section */
\
dvbpsi_psi_section_t *p_sections; /*!< List of received PSI sections */
\
dvbpsi_callback_gather_t pf_gather;/*!< PSI decoder's callback */
\
int i_section_max_size; /*!< Max size of a section for this deco
der */ \
int i_need; /*!< Bytes needed */
\
/**@}*/
/**************************************************************************
***
* struct dvbpsi_decoder_s
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \struct dvbpsi_decoder_s * \struct dvbpsi_decoder_s
* \brief PSI decoder structure. * \brief PSI decoder structure.
* *
* This structure shouldn't be used but if you want to write an external * This structure shouldn't be used but if you want to write an external
* decoder. * decoder.
*/ */
struct dvbpsi_decoder_s
{
DVBPSI_DECODER_COMMON
};
/**************************************************************************
***
* dvbpsi_decoder_new
**************************************************************************
***/
/*! /*!
* \typedef struct dvbpsi_decoder_s dvbpsi_decoder_t * \fn void *dvbpsi_decoder_new(dvbpsi_callback_gather_t pf_gather,
* \brief dvbpsi_decoder_t type definition. * const int i_section_max_size, const bool b_discontinuity, const size
_t psi_size);
* \brief Create a new (private) dvbpsi decoder.
* \param pf_gather pointer to gather function for PSI decoder.
* \param i_section_max_size Max size of a section for this decoder
* \param b_discontinuity Discontinuity flag
* \param psi_size size of new PSI struct, eg: sizeof(dvbpsi_pat_t)
* \return pointer to memory of size 'psi_size' that can be casted into a d
vbpsi_decoder_t.
*
* Creates a void pointer that points to a private dvbpsi decoder struct (e
g: dvbpsi_pat_t).
* The first elements in this newly created decoder should contain DVBPSI_D
ECODER_COMMON, which
* corresponds to a dvbpsi_decoder_t.
* Upon return the pointer should be casted to the correct type. Delete the
pointer
* with @see dvbpsi_decoder_delete() function.
*/ */
typedef struct dvbpsi_decoder_s void *dvbpsi_decoder_new(dvbpsi_callback_gather_t pf_gather,
{ const int i_section_max_size,
dvbpsi_callback pf_callback; /*!< PSI decoder's const bool b_discontinuity,
callback */ const size_t psi_size);
void * p_private_decoder; /*!< specific /**************************************************************************
decoder */ ***
* dvbpsi_decoder_delete
**************************************************************************
***/
/*!
* \fn void dvbpsi_decoder_delete(dvbpsi_decoder_t *p_decoder);
* \brief Deletes decoder struct and frees its memory
* \param p_decoder pointer to dvbpsi_decoder_t with decoder
* \return nothing
*
* Delets a dvbpsi_t handle by calling free(handle). Make sure to detach an
y
* decoder of encoder before deleting the dvbpsi handle.
*/
void dvbpsi_decoder_delete(dvbpsi_decoder_t *p_decoder);
int i_section_max_size; /*!< Max size of a /**************************************************************************
section for th ***
is * dvbpsi_decoder_reset
decoder */ **************************************************************************
***/
uint8_t i_continuity_counter; /*!< Continuity /*!
counter */ * \fn void dvbpsi_decoder_reset(dvbpsi_decoder_t* p_decoder, const bool b_
int b_discontinuity; /*!< Discontinuity force);
flag */ * \brief Resets a decoder internal state.
* \param p_decoder pointer to dvbpsi_decoder_t with decoder
dvbpsi_psi_section_t * p_current_section; /*!< Current sectio * \param b_force If 'b_force' is true then dvbpsi_decoder_t::b_current_va
n */ lid
int i_need; /*!< Bytes needed * * is set to false, invalidating the current section.
/ * \return nothing
int b_complete_header; /*!< Flag for heade */
r void dvbpsi_decoder_reset(dvbpsi_decoder_t* p_decoder, const bool b_force);
completion */
} dvbpsi_decoder_t; /**************************************************************************
***
* dvbpsi_decoder_psi_sections_completed
**************************************************************************
***/
/*!
* \fn bool dvbpsi_decoder_psi_sections_completed(dvbpsi_decoder_t* p_decod
er);
* \brief Have all sections for this decoder been received?
* \param p_decoder pointer to dvbpsi_decoder_t with decoder
* \return true when all PSI sections have been received, false otherwise
*/
bool dvbpsi_decoder_psi_sections_completed(dvbpsi_decoder_t* p_decoder);
/**************************************************************************
***
* dvbpsi_decoder_psi_section_add
**************************************************************************
***/
/*!
* \fn bool dvbpsi_decoder_psi_section_add(dvbpsi_decoder_t *p_decoder, dvb
psi_psi_section_t *p_section);
* \brief Add a section to the dvbpsi_decoder_t::p_sections list.
* \param p_decoder pointer to dvbpsi_decoder_t with decoder
* \param p_section PSI section to add to dvbpsi_decoder_t::p_sections list
* \return true if it overwrites a earlier section, false otherwise
*/
bool dvbpsi_decoder_psi_section_add(dvbpsi_decoder_t *p_decoder, dvbpsi_psi
_section_t *p_section);
/**************************************************************************
***
* dvbpsi_decoder_present
**************************************************************************
***/
/*!
* \fn bool dvbpsi_decoder_present(dvbpsi_t *p_dvbpsi);
* \brief Determines if a decoder has been attached to dvbpsi_t handle
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \return true when decoder is attached, else it will return false.
*
* Determines if a decoder is attached to this dvbpsi_t handle. When the dv
bpsi
* handle is invalid the fuction will return false.
*/
bool dvbpsi_decoder_present(dvbpsi_t *p_dvbpsi);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
/*!
* \typedef struct dvbpsi_decoder_s * dvbpsi_handle
* \brief deprecated dvbpsi handle. It is replaced by a dvbpsi_t type.
*/
typedef struct dvbpsi_decoder_s * dvbpsi_handle;// __attribute__((deprecate
d));
/* dvbpsi.h */
/*!
* \fn __attribute__((deprecated)) void dvbpsi_PushPacket(dvbpsi_handle h_d
vbpsi, uint8_t* p_data)
* \brief function is deprecated and should no longer be used. Use
* function dvbpsi_packet_push() instead.
* \param h_dvbpsi handle to dvbpsi_s struct
* \param p_data pointer to TS packet data (usually188 bytes)
*/
/*!
* \def dvbpsi_PushPacket(h,p) dvbpsi_packet_push(h,p)
* \brief backwards compatibility wrapper around dvbpsi_packet_push()
*/
__attribute__((deprecated))
void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data);
#define dvbpsi_PushPacket(h,p) dvbpsi_packet_push(h,p)
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of dvbpsi.h" #error "Multiple inclusions of dvbpsi.h"
#endif #endif
 End of changes. 23 change blocks. 
48 lines changed or deleted 375 lines changed or added


 eit.h   eit.h 
/************************************************************************** *** /************************************************************************** ***
* eit.h * eit.h
* Copyright (C) 2004-2011 VideoLAN * Copyright (C) 2004-2011 VideoLAN
* $Id: eit.h 88 2004-02-24 14:31:18Z sam $ * $Id: eit.h 88 2004-02-24 14:31:18Z sam $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 60 skipping to change at line 61
/*! /*!
* \typedef struct dvbpsi_eit_service_s dvbpsi_eit_event_t * \typedef struct dvbpsi_eit_service_s dvbpsi_eit_event_t
* \brief dvbpsi_eit_event_t type definition. * \brief dvbpsi_eit_event_t type definition.
*/ */
typedef struct dvbpsi_eit_event_s typedef struct dvbpsi_eit_event_s
{ {
uint16_t i_event_id; /*!< event_id */ uint16_t i_event_id; /*!< event_id */
uint64_t i_start_time; /*!< start_time */ uint64_t i_start_time; /*!< start_time */
uint32_t i_duration; /*!< duration */ uint32_t i_duration; /*!< duration */
uint8_t i_running_status; /*!< Running status */ uint8_t i_running_status; /*!< Running status */
int b_free_ca; /*!< Free CA mode flag */ bool b_free_ca; /*!< Free CA mode flag */
uint16_t i_descriptors_length; /*!< Descriptors loop uint16_t i_descriptors_length; /*!< Descriptors loop
length */ length */
dvbpsi_descriptor_t * p_first_descriptor; /*!< First of the follo wing dvbpsi_descriptor_t * p_first_descriptor; /*!< First of the follo wing
DVB descriptors */ DVB descriptors */
struct dvbpsi_eit_event_s * p_next; /*!< next element of struct dvbpsi_eit_event_s * p_next; /*!< next element of
the list */ the list */
} dvbpsi_eit_event_t; } dvbpsi_eit_event_t;
skipping to change at line 87 skipping to change at line 88
* *
* This structure is used to store a decoded EIT. * This structure is used to store a decoded EIT.
* (ETSI EN 300 468 V1.5.1 section 5.2.4). * (ETSI EN 300 468 V1.5.1 section 5.2.4).
*/ */
/*! /*!
* \typedef struct dvbpsi_eit_s dvbpsi_eit_t * \typedef struct dvbpsi_eit_s dvbpsi_eit_t
* \brief dvbpsi_eit_t type definition. * \brief dvbpsi_eit_t type definition.
*/ */
typedef struct dvbpsi_eit_s typedef struct dvbpsi_eit_s
{ {
uint16_t i_service_id; /*!< service_id */ uint8_t i_table_id; /*!< table id */
uint8_t i_version; /*!< version_number */ uint16_t i_extension; /*!< subtable id */
int b_current_next; /*!< current_next_indicator
*/
uint16_t i_ts_id; /*!< transport stream id */
uint16_t i_network_id; /*!< original network id */
uint8_t i_segment_last_section_number; /*!< segment las
t section number */
uint8_t i_last_table_id; /*!< last table id */
dvbpsi_eit_event_t * p_first_event; /*!< event information list uint8_t i_version; /*!< version_number */
*/ bool b_current_next; /*!< current_next_indicator */
uint16_t i_ts_id; /*!< transport stream id */
uint16_t i_network_id; /*!< original network id */
uint8_t i_segment_last_section_number; /*!< segment last se
ction number */
uint8_t i_last_table_id; /*!< last table id */
dvbpsi_eit_event_t *p_first_event; /*!< event information list */
} dvbpsi_eit_t; } dvbpsi_eit_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_eit_callback * dvbpsi_eit_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_eit_callback)(void* p_cb_data, * \typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_n
dvbpsi_eit_t* p_new_eit) ew_eit)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_e it); typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_e it);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachEIT * dvbpsi_AttachEIT
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_AttachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_eit_callback pf_callback, uint16_t i_extension, dvbpsi_eit_callback pf_callback,
void* p_cb_data) void* p_cb_data)
* \brief Creation and initialization of a EIT decoder. * \brief Creation and initialization of a EIT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi pointer to Subtable demultiplexor to which the EIT decod er is attached.
* \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F. * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID. * \param i_extension Table ID extension, here service ID.
* \param pf_callback function to call back on new EIT. * \param pf_callback function to call back on new EIT.
* \param p_cb_data private data given in argument to the callback. * \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
int dvbpsi_AttachEIT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id, xtension,
uint16_t i_extension, dvbpsi_eit_callback pf_callback, dvbpsi_eit_callback pf_callback, void* p_cb_data);
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachEIT * dvbpsi_eit_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn void dvbpsi_eit_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension) uint16_t i_extension)
* \brief Destroy a EIT decoder. * \brief Destroy a EIT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle pointing to Subtable demultiplexor to whic
h the
eit decoder is attached.
* \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F. * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID. * \param i_extension Table ID extension, here service ID.
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_eit_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
void dvbpsi_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, xtension);
uint16_t i_extension);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitEIT/dvbpsi_NewEIT * dvbpsi_eit_init/dvbpsi_eit_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitEIT(dvbpsi_eit_t* p_eit, uint16_t i_service_id, * \fn void dvbpsi_eit_init(dvbpsi_eit_t* p_eit, uint8_t i_table_id,
uint8_t i_version, int b_current_next, uint16_t i_ts_id, uint16_t i_extension, uint8_t i_version,
uint16_t i_network_id, uint8_t i_segment_last_section_number, bool b_current_next, uint16_t i_ts_id, uint16_t i_netw
uint8_t i_last_table_id) ork_id,
uint8_t i_segment_last_section_number,
uint8_t i_last_table_id);
* \brief Initialize a user-allocated dvbpsi_eit_t structure. * \brief Initialize a user-allocated dvbpsi_eit_t structure.
* \param p_eit pointer to the EIT structure * \param p_eit pointer to the EIT structure
* \param i_service_id service ID * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID.
* \param i_version EIT version * \param i_version EIT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_ts_id transport stream ID * \param i_ts_id transport stream ID
* \param i_network_id original network id * \param i_network_id original network id
* \param i_segment_last_section_number segment_last_section_number * \param i_segment_last_section_number segment_last_section_number
* \param i_last_table_id i_last_table_id * \param i_last_table_id i_last_table_id
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_eit_init(dvbpsi_eit_t* p_eit, uint8_t i_table_id,
void dvbpsi_InitEIT(dvbpsi_eit_t* p_eit, uint16_t i_service_id, uint8_t i_v uint16_t i_extension, uint8_t i_version,
ersion, bool b_current_next, uint16_t i_ts_id, uint16_t i_netw
int b_current_next, uint16_t i_ts_id, uint16_t i_networ ork_id,
k_id, uint8_t i_segment_last_section_number,
uint8_t i_segment_last_section_number, uint8_t i_last_table_id);
uint8_t i_last_table_id);
/*! /*!
* \def dvbpsi_NewEIT(p_eit, i_ts_id, i_version, b_current_next, i_network_ * \fn dvbpsi_eit_t* dvbpsi_eit_new(uint8_t i_table_id, uint16_t i_extensio
id) n,
uint8_t i_version, bool b_current_next,
uint16_t i_ts_id, uint16_t i_network_id, uint8_t i_segment_last
_section_number,
uint8_t i_last_table_id)
* \brief Allocate and initialize a new dvbpsi_eit_t structure. * \brief Allocate and initialize a new dvbpsi_eit_t structure.
* \param p_eit pointer to the EIT structure * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_ts_id transport stream ID * \param i_extension Table ID extension, here service ID.
* \param i_version EIT version * \param i_version EIT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_ts_id transport stream ID
* \param i_network_id original network id * \param i_network_id original network id
* \return nothing. * \param i_segment_last_section_number segment_last_section_number
* \param i_last_table_id i_last_table_id
* \return p_eit pointer to the EIT structure
*/ */
#define dvbpsi_NewEIT(p_eit, i_service_id, i_version, b_current_next, i_ts_ dvbpsi_eit_t* dvbpsi_eit_new(uint8_t i_table_id, uint16_t i_extension,
id, i_network_id, i_segment_last_section_number, i_last_table_id) \ uint8_t i_version, bool b_current_next,
do { \ uint16_t i_ts_id, uint16_t i_network_id,
p_eit = (dvbpsi_eit_t*)malloc(sizeof(dvbpsi_eit_t)); \ uint8_t i_segment_last_section_number,
if(p_eit != NULL) \ uint8_t i_last_table_id);
dvbpsi_InitEIT(p_eit, i_service_id, i_version, b_current_next, i_ts_id,
i_network_id, i_segment_last_section_number, i_last_table_id); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptyEIT/dvbpsi_DeleteEIT * dvbpsi_eit_empty/dvbpsi_eit_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptyEIT(dvbpsi_eit_t* p_eit) * \fn void dvbpsi_eit_empty(dvbpsi_eit_t* p_eit)
* \brief Clean a dvbpsi_eit_t structure. * \brief Clean a dvbpsi_eit_t structure.
* \param p_eit pointer to the EIT structure * \param p_eit pointer to the EIT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_eit_empty(dvbpsi_eit_t* p_eit);
void dvbpsi_EmptyEIT(dvbpsi_eit_t* p_eit);
/*! /*!
* \def dvbpsi_DeleteEIT(p_eit) * \fn void dvbpsi_eit_delete(dvbpsi_eit_t *p_eit)
* \brief Clean and free a dvbpsi_eit_t structure. * \brief Clean and free a dvbpsi_eit_t structure.
* \param p_eit pointer to the EIT structure * \param p_eit pointer to the EIT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeleteEIT(p_eit) \ void dvbpsi_eit_delete(dvbpsi_eit_t* p_eit);
do { \
dvbpsi_EmptyEIT(p_eit); \
free(p_eit); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EITAddEvent * dvbpsi_eit_event_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_eit_event_t* dvbpsi_EITAddEvent(dvbpsi_eit_t* p_eit, * \fn dvbpsi_eit_event_t* dvbpsi_eit_event_add(dvbpsi_eit_t* p_eit,
uint16_t i_event_id, uint16_t i_event_id,
uint64_t i_start_time, uint64_t i_start_time,
uint32_t i_duration, uint32_t i_duration,
uint8_t i_running_status, uint8_t i_running_status,
int b_free_ca) bool b_free_ca,
uint16_t i_event_descriptor_l
ength)
* \brief Add a service description at the end of the EIT. * \brief Add a service description at the end of the EIT.
* \param p_eit pointer to the EIT structure * \param p_eit pointer to the EIT structure
* \param i_event_id Event ID * \param i_event_id Event ID
* \param i_start_time Start Time * \param i_start_time Start Time
* \param i_duration Duration * \param i_duration Duration
* \param i_running_status Running status * \param i_running_status Running status
* \param b_free_ca Free CA flag * \param b_free_ca Free CA flag
* \param i_event_descriptor_length The descriptors loop length in bytes of
all descriptors for this event.
* \return a pointer to the added service description. * \return a pointer to the added service description.
*/ */
dvbpsi_eit_event_t* dvbpsi_EITAddEvent(dvbpsi_eit_t* p_eit, dvbpsi_eit_event_t* dvbpsi_eit_event_add(dvbpsi_eit_t* p_eit,
uint16_t i_event_id, uint64_t i_start_time, uint32_t i_duration, uint16_t i_event_id, uint64_t i_start_time, uint32_t i_duration,
uint8_t i_running_status, int b_free_ca); uint8_t i_running_status, bool b_free_ca,
uint16_t i_event_descriptor_length);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EITEventAddDescriptor * dvbpsi_eit_event_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t* dvbpsi_EITEventAddDescriptor( * \fn dvbpsi_descriptor_t* dvbpsi_eit_event_descriptor_add(
dvbpsi_eit_event_t* p_event, dvbpsi_eit_event_t* p_event,
uint8_t i_tag, uint8_t i_len gth, uint8_t i_tag, uint8_t i_len gth,
uint8_t* p_data) uint8_t* p_data)
* \brief Add a descriptor to the EIT event. * \brief Add a descriptor to the EIT event.
* \param p_event pointer to the EIT event structure * \param p_event pointer to the EIT event structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t* dvbpsi_eit_event_descriptor_add(
dvbpsi_descriptor_t* dvbpsi_EITEventAddDescriptor(
dvbpsi_eit_event_t* p_event, dvbpsi_eit_event_t* p_event,
uint8_t i_tag, uint8_t i_len gth, uint8_t i_tag, uint8_t i_len gth,
uint8_t* p_data); uint8_t* p_data);
/**************************************************************************
***
* dvbpsi_eit_sections_generate
**************************************************************************
***
* Generate EIT sections based on the dvbpsi_eit_t structure.
**************************************************************************
***/
/*!
* \fn dvbpsi_psi_section_t *dvbpsi_eit_sections_generate(dvbpsi_t *p_dvbps
i, dvbpsi_eit_t *p_eit,
* uint8_t i_table_id);
* \brief Generate a EIT section based on the information provided in p_eit
.
* \param p_dvbpsi pointer to Subtable demultiplexor to which the EIT decod
er is attached.
* \param p_eit pointer to EIT information to include in the PSI secion
* \param i_table_id the EIT table id to use
* \return a pointer to a new PSI section
*/
dvbpsi_psi_section_t *dvbpsi_eit_sections_generate(dvbpsi_t *p_dvbpsi, dvbp
si_eit_t *p_eit,
uint8_t i_table_id);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
int dvbpsi_AttachEIT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_eit_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension);
__attribute__((deprecated))
void dvbpsi_InitEIT(dvbpsi_eit_t* p_eit, uint16_t i_service_id, uint8_t i_v
ersion,
int b_current_next, uint16_t i_ts_id, uint16_t i_networ
k_id,
uint8_t i_segment_last_section_number,
uint8_t i_last_table_id);
__attribute__((deprecated)) void dvbpsi_EmptyEIT(dvbpsi_eit_t* p_eit);
__attribute__((deprecated))
dvbpsi_descriptor_t* dvbpsi_EITEventAddDescriptor(dvbpsi_eit_event_t* p_eve
nt,
uint8_t i_tag, uint8_t i_
length,
uint8_t* p_data);
__attribute__((deprecated))
dvbpsi_eit_event_t* dvbpsi_EITAddEvent(dvbpsi_eit_t* p_eit,
uint16_t i_event_id, uint64_t i_start_time, uint32_t i_duration,
uint8_t i_running_status, int b_free_ca);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of eit.h" #error "Multiple inclusions of eit.h"
#endif #endif
 End of changes. 37 change blocks. 
72 lines changed or deleted 133 lines changed or added


 nit.h   nit.h 
/************************************************************************** *** /************************************************************************** ***
* nit.h * nit.h
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id$ * $Id$
* *
* Authors: Johann Hanne * Authors: Johann Hanne
* heavily based on pmt.c which was written by * heavily based on pmt.c which was written by
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 84 skipping to change at line 85
* *
* This structure is used to store a decoded NIT. * This structure is used to store a decoded NIT.
* (ETSI EN 300 468 section 5.2.1). * (ETSI EN 300 468 section 5.2.1).
*/ */
/*! /*!
* \typedef struct dvbpsi_nit_s dvbpsi_nit_t * \typedef struct dvbpsi_nit_s dvbpsi_nit_t
* \brief dvbpsi_nit_t type definition. * \brief dvbpsi_nit_t type definition.
*/ */
typedef struct dvbpsi_nit_s typedef struct dvbpsi_nit_s
{ {
uint16_t i_network_id; /*!< network_id */ uint8_t i_table_id; /*!< table id */
uint8_t i_version; /*!< version_number */ uint16_t i_extension; /*!< subtable id */
int b_current_next; /*!< current_next_indicator
*/
dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */ uint16_t i_network_id; /*!< network_id */
uint8_t i_version; /*!< version_number */
bool b_current_next; /*!< current_next_indicator */
dvbpsi_nit_ts_t * p_first_ts; /*!< TS list */ dvbpsi_descriptor_t *p_first_descriptor; /*!< descriptor list */
dvbpsi_nit_ts_t * p_first_ts; /*!< TS list */
} dvbpsi_nit_t; } dvbpsi_nit_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_nit_callback * dvbpsi_nit_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_nit_callback)(void* p_cb_data, * \typedef void (* dvbpsi_nit_callback)(void* p_cb_data,
dvbpsi_nit_t* p_new_nit) dvbpsi_nit_t* p_new_nit)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_nit_callback)(void* p_cb_data, dvbpsi_nit_t* p_new_n it); typedef void (* dvbpsi_nit_callback)(void* p_cb_data, dvbpsi_nit_t* p_new_n it);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachNIT * dvbpsi_nit_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_AttachNIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint1
uint16_t i_extension, dvbpsi_nit_callback pf_c 6_t i_extension,
allback, dvbpsi_nit_callback pf_callback, void* p_cb_d
void* p_cb_data) ata)
* \brief Creation and initialization of a NIT decoder. * \brief Creation and initialization of a NIT decoder. It is attached to p
* \param p_demux Subtable demultiplexor to which the decoder is attached. _dvbpsi.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the dec
oder is attached.
* \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F. * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID. * \param i_extension Table ID extension, here service ID.
* \param pf_callback function to call back on new NIT. * \param pf_callback function to call back on new NIT.
* \param p_cb_data private data given in argument to the callback. * \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_e
int dvbpsi_AttachNIT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id, xtension,
uint16_t i_extension, dvbpsi_nit_callback pf_callback, dvbpsi_nit_callback pf_callback, void* p_cb_data);
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachNIT * dvbpsi_nit_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachNIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn void dvbpsi_nit_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension) uint16_t i_extension)
* \brief Destroy a NIT decoder. * \brief Destroy a NIT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the dec oder is attached.
* \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F. * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID. * \param i_extension Table ID extension, here service ID.
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_nit_detach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
void dvbpsi_DetachNIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension); uint16_t i_extension);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitNIT/dvbpsi_NewNIT * dvbpsi_nit_init/dvbpsi_nit_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitNIT(dvbpsi_nit_t* p_nit, uint16_t i_network_id, * \fn void dvbpsi_nit_init(dvbpsi_nit_t* p_nit, uint8_t i_table_id, uint16
uint8_t i_version, int b_current_next) _t i_extension,
uint16_t i_network_id, uint8_t i_version, bool
b_current_next)
* \brief Initialize a user-allocated dvbpsi_nit_t structure. * \brief Initialize a user-allocated dvbpsi_nit_t structure.
* \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID.
* \param p_nit pointer to the NIT structure * \param p_nit pointer to the NIT structure
* \param i_network_id network id * \param i_network_id network id
* \param i_version NIT version * \param i_version NIT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_nit_init(dvbpsi_nit_t* p_nit, uint8_t i_table_id, uint16_t i_ex
void dvbpsi_InitNIT(dvbpsi_nit_t* p_nit, uint16_t i_network_id, tension,
uint8_t i_version, int b_current_next); uint16_t i_network_id, uint8_t i_version, bool b_curre
nt_next);
/*! /*!
* \def dvbpsi_NewNIT(p_nit, i_network_id, * \fn dvbpsi_nit_t *dvbpsi_nit_new(uint8_t i_table_id, uint16_t i_extensio
i_version, b_current_next) n,
* uint16_t i_network_id, uint8_t i_versio
n,
* bool b_current_next);
* \brief Allocate and initialize a new dvbpsi_nit_t structure. * \brief Allocate and initialize a new dvbpsi_nit_t structure.
* \param p_nit pointer to the NIT structure * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID.
* \param i_network_id network id * \param i_network_id network id
* \param i_version NIT version * \param i_version NIT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_pcr_pid PCR_PID * \return p_nit pointer to the NIT structure
* \return nothing.
*/ */
#define dvbpsi_NewNIT(p_nit, i_network_id, \ dvbpsi_nit_t *dvbpsi_nit_new(uint8_t i_table_id, uint16_t i_extension,
i_version, b_current_next) \ uint16_t i_network_id, uint8_t i_version,
do { \ bool b_current_next);
p_nit = (dvbpsi_nit_t*)malloc(sizeof(dvbpsi_nit_t)); \
if(p_nit != NULL) \
dvbpsi_InitNIT(p_nit, i_network_id, i_version, b_current_next); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptyNIT/dvbpsi_DeleteNIT * dvbpsi_nit_empty/dvbpsi_nit_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptyNIT(dvbpsi_nit_t* p_nit) * \fn void dvbpsi_nit_empty(dvbpsi_nit_t* p_nit)
* \brief Clean a dvbpsi_nit_t structure. * \brief Clean a dvbpsi_nit_t structure.
* \param p_nit pointer to the NIT structure * \param p_nit pointer to the NIT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_nit_empty(dvbpsi_nit_t* p_nit);
void dvbpsi_EmptyNIT(dvbpsi_nit_t* p_nit);
/*! /*!
* \def dvbpsi_DeleteNIT(p_nit) * \fn dvbpsi_nit_delete(dvbpsi_nit_t *p_nit)
* \brief Clean and free a dvbpsi_nit_t structure. * \brief Clean and free a dvbpsi_nit_t structure.
* \param p_nit pointer to the NIT structure * \param p_nit pointer to the NIT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeleteNIT(p_nit) \ void dvbpsi_nit_delete(dvbpsi_nit_t *p_nit);
do { \
dvbpsi_EmptyNIT(p_nit); \
free(p_nit); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_NITAddDescriptor * dvbpsi_nit_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t* dvbpsi_NITAddDescriptor(dvbpsi_nit_t* p_nit, * \fn dvbpsi_descriptor_t* dvbpsi_nit_descriptor_add(dvbpsi_nit_t* p_nit,
uint8_t i_tag, uint8_t i_tag,
uint8_t i_length, uint8_t i_length,
uint8_t* p_data) uint8_t* p_data)
* \brief Add a descriptor in the NIT. * \brief Add a descriptor in the NIT.
* \param p_nit pointer to the NIT structure * \param p_nit pointer to the NIT structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t* dvbpsi_nit_descriptor_add(dvbpsi_nit_t *p_nit,
dvbpsi_descriptor_t* dvbpsi_NITAddDescriptor(dvbpsi_nit_t* p_nit, uint8_t i_tag, uint8_t i_len
uint8_t i_tag, uint8_t i_lengt gth,
h, uint8_t *p_data);
uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_NITAddTS * dvbpsi_nit_ts_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_nit_ts_t* dvbpsi_NITAddTS(dvbpsi_nit_t* p_nit, * \fn dvbpsi_nit_ts_t* dvbpsi_nit_ts_add(dvbpsi_nit_t* p_nit,
uint8_t i_type, uint16_t i_pid) uint16_t i_ts_id, uint16_t i_orig_network
_id)
* \brief Add an TS in the NIT. * \brief Add an TS in the NIT.
* \param p_nit pointer to the NIT structure * \param p_nit pointer to the NIT structure
* \param i_type type of TS * \param i_ts_id type of TS
* \param i_pid PID of the TS * \param i_orig_network_id PID of the TS
* \return a pointer to the added TS. * \return a pointer to the added TS.
*/ */
__attribute__((deprecated)) dvbpsi_nit_ts_t* dvbpsi_nit_ts_add(dvbpsi_nit_t* p_nit,
dvbpsi_nit_ts_t* dvbpsi_NITAddTS(dvbpsi_nit_t* p_nit,
uint16_t i_ts_id, uint16_t i_orig_network_ id); uint16_t i_ts_id, uint16_t i_orig_network_ id);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_NITTSAddDescriptor * dvbpsi_nit_ts_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t* dvbpsi_NITTSAddDescriptor(dvbpsi_nit_ts_t* p_ts * \fn dvbpsi_descriptor_t* dvbpsi_nit_ts_descriptor_add(dvbpsi_nit_ts_t* p
, _ts,
uint8_t i_tag, uint8_t i_tag,
uint8_t i_length, uint8_t i_length,
uint8_t* p_data) uint8_t* p_data)
* \brief Add a descriptor in the NIT TS. * \brief Add a descriptor in the NIT TS.
* \param p_ts pointer to the TS structure * \param p_ts pointer to the TS structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t* dvbpsi_nit_ts_descriptor_add(dvbpsi_nit_ts_t* p_ts,
dvbpsi_descriptor_t* dvbpsi_NITTSAddDescriptor(dvbpsi_nit_ts_t* p_ts, uint8_t i_tag, uint8_t i_
uint8_t i_tag, uint8_t i_len length,
gth, uint8_t* p_data);
uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenNITSections * dvbpsi_nit_sections_generate
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_psi_section_t* dvbpsi_GenNITSections(dvbpsi_nit_t* p_nit, * \fn dvbpsi_psi_section_t* dvbpsi_nit_sections_generate(dvbpsi_t *p_dvbps i, dvbpsi_nit_t* p_nit,
uint8_t i_table_id) uint8_t i_table_id)
* \brief NIT generator * \brief NIT generator
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_nit NIT structure * \param p_nit NIT structure
* \param i_table_id table id, 0x40 = actual network / 0x41 = other network * \param i_table_id table id, 0x40 = actual network / 0x41 = other network
* \return a pointer to the list of generated PSI sections. * \return a pointer to the list of generated PSI sections.
* *
* Generate NIT sections based on the dvbpsi_nit_t structure. * Generate NIT sections based on the dvbpsi_nit_t structure.
*/ */
dvbpsi_psi_section_t* dvbpsi_nit_sections_generate(dvbpsi_t* p_dvbpsi, dvbp
si_nit_t* p_nit,
uint8_t i_table_id);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
int dvbpsi_AttachNIT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_nit_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachNIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension);
__attribute__((deprecated))
void dvbpsi_InitNIT(dvbpsi_nit_t* p_nit, uint16_t i_network_id,
uint8_t i_version, int b_current_next);
__attribute__((deprecated)) void dvbpsi_EmptyNIT(dvbpsi_nit_t* p_nit);
__attribute__((deprecated))
dvbpsi_descriptor_t* dvbpsi_NITAddDescriptor(dvbpsi_nit_t* p_nit,
uint8_t i_tag, uint8_t i_lengt
h,
uint8_t* p_data);
__attribute__((deprecated))
dvbpsi_nit_ts_t* dvbpsi_NITAddTS(dvbpsi_nit_t* p_nit,
uint16_t i_ts_id, uint16_t i_orig_network_
id);
__attribute__((deprecated))
dvbpsi_descriptor_t* dvbpsi_NITTSAddDescriptor(dvbpsi_nit_ts_t* p_ts,
uint8_t i_tag, uint8_t i_len
gth,
uint8_t* p_data);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenNITSections(dvbpsi_nit_t* p_nit, dvbpsi_psi_section_t* dvbpsi_GenNITSections(dvbpsi_nit_t* p_nit,
uint8_t i_table_id); uint8_t i_table_id);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of nit.h" #error "Multiple inclusions of nit.h"
 End of changes. 39 change blocks. 
81 lines changed or deleted 116 lines changed or added


 pat.h   pat.h 
skipping to change at line 82 skipping to change at line 82
* (ISO/IEC 13818-1 section 2.4.4.3). * (ISO/IEC 13818-1 section 2.4.4.3).
*/ */
/*! /*!
* \typedef struct dvbpsi_pat_s dvbpsi_pat_t * \typedef struct dvbpsi_pat_s dvbpsi_pat_t
* \brief dvbpsi_pat_t type definition. * \brief dvbpsi_pat_t type definition.
*/ */
typedef struct dvbpsi_pat_s typedef struct dvbpsi_pat_s
{ {
uint16_t i_ts_id; /*!< transport_stream_id */ uint16_t i_ts_id; /*!< transport_stream_id */
uint8_t i_version; /*!< version_number */ uint8_t i_version; /*!< version_number */
int b_current_next; /*!< current_next_indicator */ bool b_current_next; /*!< current_next_indicator */
dvbpsi_pat_program_t * p_first_program; /*!< program list */ dvbpsi_pat_program_t * p_first_program; /*!< program list */
} dvbpsi_pat_t; } dvbpsi_pat_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_pat_callback * dvbpsi_pat_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_pat_callback)(void* p_cb_data, * \typedef void (* dvbpsi_pat_callback)(void* p_cb_data,
dvbpsi_pat_t* p_new_pat) dvbpsi_pat_t* p_new_pat)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_pat_callback)(void* p_cb_data, dvbpsi_pat_t* p_new_p at); typedef void (* dvbpsi_pat_callback)(void* p_cb_data, dvbpsi_pat_t* p_new_p at);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachPAT * dvbpsi_pat_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback, * \fn bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, dvbpsi_pat_callback pf_ca
void* p_cb_data) llback, void* p_cb_data)
* \brief Creation and initialization of a PAT decoder. * \brief Creation and initialization of a PAT decoder. The decoder will be
attached to 'p_dvbpsi' argument.
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param pf_callback function to call back on new PAT * \param pf_callback function to call back on new PAT
* \param p_cb_data private data given in argument to the callback * \param p_cb_data private data given in argument to the callback
* \return a pointer to the decoder for future calls. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, dvbpsi_pat_callback pf_callback,
dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback, void* p_cb_data);
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachPAT * dvbpsi_pat_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi) * \fn void dvbpsi_pat_detach(dvbpsi_t *p_dvbpsi)
* \brief Destroy a PAT decoder. * \brief Destroy a PAT decoder.
* \param h_dvbpsi handle to the decoder * \param p_dvbpsi pointer to dvbpsi_t handle
* \return nothing. * \return nothing.
* *
* The handle isn't valid any more. * The handle isn't valid any more.
*/ */
__attribute__((deprecated)) void dvbpsi_pat_detach(dvbpsi_t *p_dvbpsi);
void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitPAT/dvbpsi_NewPAT * dvbpsi_pat_init/dvbpsi_pat_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitPAT(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, * \fn void dvbpsi_pat_init(dvbpsi_pat_t* p_pat, uint16_t i_ts_id,
uint8_t i_version, int b_current_next) uint8_t i_version, bool b_current_next)
* \brief Initialize a user-allocated dvbpsi_pat_t structure. * \brief Initialize a user-allocated dvbpsi_pat_t structure.
* \param p_pat pointer to the PAT structure * \param p_pat pointer to the PAT structure
* \param i_ts_id transport stream ID * \param i_ts_id transport stream ID
* \param i_version PAT version * \param i_version PAT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_pat_init(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, uint8_t i_versi
void dvbpsi_InitPAT(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, uint8_t i_versio on,
n, bool b_current_next);
int b_current_next);
/*! /*!
* \def dvbpsi_NewPAT(p_pat, i_ts_id, i_version, b_current_next) * \fn dvbpsi_pat_t *dvbpsi_pat_new(uint16_t i_ts_id, uint8_t i_version,
* bool b_current_next);
* \brief Allocate and initialize a new dvbpsi_pat_t structure. * \brief Allocate and initialize a new dvbpsi_pat_t structure.
* \param p_pat pointer to the PAT structure
* \param i_ts_id transport stream ID * \param i_ts_id transport stream ID
* \param i_version PAT version * \param i_version PAT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \return nothing. * \return p_pat pointer to the PAT structure
*/ */
#define dvbpsi_NewPAT(p_pat, i_ts_id, i_version, b_current_next) \ dvbpsi_pat_t *dvbpsi_pat_new(uint16_t i_ts_id, uint8_t i_version, bool b_cu
do { \ rrent_next);
p_pat = (dvbpsi_pat_t*)malloc(sizeof(dvbpsi_pat_t)); \
if(p_pat != NULL) \
dvbpsi_InitPAT(p_pat, i_ts_id, i_version, b_current_next); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptyPAT/dvbpsi_DeletePAT * dvbpsi_pat_empty/dvbpsi_pat_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptyPAT(dvbpsi_pat_t* p_pat) * \fn void dvbpsi_pat_empty(dvbpsi_pat_t* p_pat)
* \brief Clean a dvbpsi_pat_t structure. * \brief Clean a dvbpsi_pat_t structure.
* \param p_pat pointer to the PAT structure * \param p_pat pointer to the PAT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_pat_empty(dvbpsi_pat_t* p_pat);
void dvbpsi_EmptyPAT(dvbpsi_pat_t* p_pat);
/*! /*!
* \def dvbpsi_DeletePAT(p_pat) * \fn void dvbpsi_pat_delete(dvbpsi_pat_t *p_pat)
* \brief Clean and free a dvbpsi_pat_t structure. * \brief Clean and free a dvbpsi_pat_t structure.
* \param p_pat pointer to the PAT structure * \param p_pat pointer to the PAT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeletePAT(p_pat) \ void dvbpsi_pat_delete(dvbpsi_pat_t *p_pat);
do { \
dvbpsi_EmptyPAT(p_pat); \
free(p_pat); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_PATAddProgram * dvbpsi_pat_program_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_pat_program_t* dvbpsi_PATAddProgram(dvbpsi_pat_t* p_pat, * \fn dvbpsi_pat_program_t* dvbpsi_pat_program_add(dvbpsi_pat_t* p_pat,
uint16_t i_number, uint16_t i_number,
uint16_t i_pid) uint16_t i_pid)
* \brief Add a program at the end of the PAT. * \brief Add a program at the end of the PAT.
* \param p_pat pointer to the PAT structure * \param p_pat pointer to the PAT structure
* \param i_number program number * \param i_number program number
* \param i_pid PID of the NIT/PMT * \param i_pid PID of the NIT/PMT
* \return a pointer to the added program. * \return a pointer to the added program.
*/ */
__attribute__((deprecated)) dvbpsi_pat_program_t* dvbpsi_pat_program_add(dvbpsi_pat_t* p_pat,
dvbpsi_pat_program_t* dvbpsi_PATAddProgram(dvbpsi_pat_t* p_pat,
uint16_t i_number, uint16_t i_pi d); uint16_t i_number, uint16_t i_pi d);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenPATSections * dvbpsi_pat_sections_generate
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_psi_section_t* dvbpsi_GenPATSections(dvbpsi_pat_t* p_pat, * \fn dvbpsi_psi_section_t* dvbpsi_pat_sections_generate(dvbpsi_t *p_dvbps i, dvbpsi_pat_t* p_pat,
int i_max_pps); int i_max_pps);
* \brief PAT generator. * \brief PAT generator.
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_pat pointer to the PAT structure * \param p_pat pointer to the PAT structure
* \param i_max_pps limitation of the number of program in each section * \param i_max_pps limitation of the number of program in each section
* (max: 253). * (max: 253).
* \return a pointer to the list of generated PSI sections. * \return a pointer to the list of generated PSI sections.
* *
* Generate PAT sections based on the dvbpsi_pat_t structure. * Generate PAT sections based on the dvbpsi_pat_t structure.
*/ */
dvbpsi_psi_section_t* dvbpsi_pat_sections_generate(dvbpsi_t *p_dvbpsi,
dvbpsi_pat_t* p_pat, int i_max_
pps);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
dvbpsi_handle dvbpsi_AttachPAT(dvbpsi_pat_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated)) void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi);
__attribute__((deprecated))
void dvbpsi_InitPAT(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, uint8_t i_versio
n,
int b_current_next);
__attribute__((deprecated)) void dvbpsi_EmptyPAT(dvbpsi_pat_t* p_pat);
__attribute__((deprecated))
dvbpsi_pat_program_t* dvbpsi_PATAddProgram(dvbpsi_pat_t* p_pat,
uint16_t i_number, uint16_t i_pi
d);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenPATSections(dvbpsi_pat_t* p_pat, dvbpsi_psi_section_t* dvbpsi_GenPATSections(dvbpsi_pat_t* p_pat, int i_max_
int i_max_pps); pps);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of pat.h" #error "Multiple inclusions of pat.h"
#endif #endif
 End of changes. 29 change blocks. 
50 lines changed or deleted 62 lines changed or added


 pmt.h   pmt.h 
/************************************************************************** *** /************************************************************************** ***
* pmt.h * pmt.h
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id$ * $Id$
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 84 skipping to change at line 85
* (ISO/IEC 13818-1 section 2.4.4.8). * (ISO/IEC 13818-1 section 2.4.4.8).
*/ */
/*! /*!
* \typedef struct dvbpsi_pmt_s dvbpsi_pmt_t * \typedef struct dvbpsi_pmt_s dvbpsi_pmt_t
* \brief dvbpsi_pmt_t type definition. * \brief dvbpsi_pmt_t type definition.
*/ */
typedef struct dvbpsi_pmt_s typedef struct dvbpsi_pmt_s
{ {
uint16_t i_program_number; /*!< program_number */ uint16_t i_program_number; /*!< program_number */
uint8_t i_version; /*!< version_number */ uint8_t i_version; /*!< version_number */
int b_current_next; /*!< current_next_indicator */ bool b_current_next; /*!< current_next_indicator */
uint16_t i_pcr_pid; /*!< PCR_PID */ uint16_t i_pcr_pid; /*!< PCR_PID */
dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */ dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */
dvbpsi_pmt_es_t * p_first_es; /*!< ES list */ dvbpsi_pmt_es_t * p_first_es; /*!< ES list */
} dvbpsi_pmt_t; } dvbpsi_pmt_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_pmt_callback * dvbpsi_pmt_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, * \typedef void (* dvbpsi_pmt_callback)(void* p_cb_data,
dvbpsi_pmt_t* p_new_pmt) dvbpsi_pmt_t* p_new_pmt)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_p mt); typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_p mt);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachPMT * dvbpsi_pmt_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number, * \fn bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi,
dvbpsi_pmt_callback pf_callback, uint16_t i_program_number,
void* p_cb_data) dvbpsi_pmt_callback pf_callback,
* \brief Creation and initialization of a PMT decoder. void* p_cb_data)
* \brief Creates and initialization of a PMT decoder and attaches it to dv
bpsi_t
* handle
* \param p_dvbpsi handle
* \param i_program_number program number * \param i_program_number program number
* \param pf_callback function to call back on new PMT * \param pf_callback function to call back on new PMT
* \param p_cb_data private data given in argument to the callback * \param p_cb_data private data given in argument to the callback
* \return a pointer to the decoder for future calls. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint16_t i_program_number,
dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number, dvbpsi_pmt_callback pf_callback, void* p_cb_data);
dvbpsi_pmt_callback pf_callback,
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachPMT * dvbpsi_pmt_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi) * \fn void dvbpsi_pmt_detach(dvbpsi_t *p_dvbpsi)
* \brief Destroy a PMT decoder. * \brief Destroy a PMT decoder.
* \param h_dvbpsi handle to the decoder * \param p_dvbpsi handle
* \return nothing. * \return nothing.
* *
* The handle isn't valid any more. * The handle isn't valid any more.
*/ */
__attribute__((deprecated)) void dvbpsi_pmt_detach(dvbpsi_t *p_dvbpsi);
void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitPMT/dvbpsi_NewPMT * dvbpsi_pmt_init/dvbpsi_pmt_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitPMT(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number, * \fn void dvbpsi_pmt_init(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number,
uint8_t i_version, int b_current_next, uint8_t i_version, bool b_current_next,
uint16_t i_pcr_pid) uint16_t i_pcr_pid)
* \brief Initialize a user-allocated dvbpsi_pmt_t structure. * \brief Initialize a user-allocated dvbpsi_pmt_t structure.
* \param p_pmt pointer to the PMT structure * \param p_pmt pointer to the PMT structure
* \param i_program_number program number * \param i_program_number program number
* \param i_version PMT version * \param i_version PMT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_pcr_pid PCR_PID * \param i_pcr_pid PCR_PID
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_pmt_init(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number,
void dvbpsi_InitPMT(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number, uint8_t i_version, bool b_current_next, uint16_t i_pcr_
uint8_t i_version, int b_current_next, uint16_t i_pcr_p pid);
id);
/*! /*!
* \def dvbpsi_NewPMT(p_pmt, i_program_number, * \fn dvbpsi_pmt_t* dvbpsi_pmt_new(uint16_t i_program_number,
i_version, b_current_next, i_pcr_pid) uint8_t i_version, bool b_current_next,
uint16_t i_pcr_pid)
* \brief Allocate and initialize a new dvbpsi_pmt_t structure. * \brief Allocate and initialize a new dvbpsi_pmt_t structure.
* \param p_pmt pointer to the PMT structure
* \param i_program_number program number * \param i_program_number program number
* \param i_version PMT version * \param i_version PMT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_pcr_pid PCR_PID * \param i_pcr_pid PCR_PID
* \return nothing. * \return p_pmt pointer to the PMT structure
*/ */
#define dvbpsi_NewPMT(p_pmt, i_program_number, \ dvbpsi_pmt_t* dvbpsi_pmt_new(uint16_t i_program_number, uint8_t i_version,
i_version, b_current_next, i_pcr_pid) \ bool b_current_next, uint16_t i_pcr_pid);
do { \
p_pmt = (dvbpsi_pmt_t*)malloc(sizeof(dvbpsi_pmt_t)); \
if(p_pmt != NULL) \
dvbpsi_InitPMT(p_pmt, i_program_number, i_version, b_current_next, \
i_pcr_pid); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptyPMT/dvbpsi_DeletePMT * dvbpsi_pmt_empty/dvbpsi_pmt_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptyPMT(dvbpsi_pmt_t* p_pmt) * \fn void dvbpsi_pmt_empty(dvbpsi_pmt_t* p_pmt)
* \brief Clean a dvbpsi_pmt_t structure. * \brief Clean a dvbpsi_pmt_t structure.
* \param p_pmt pointer to the PMT structure * \param p_pmt pointer to the PMT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_pmt_empty(dvbpsi_pmt_t* p_pmt);
void dvbpsi_EmptyPMT(dvbpsi_pmt_t* p_pmt);
/*! /*!
* \def dvbpsi_DeletePMT(p_pmt) * \fn void dvbpsi_pmt_delete(dvbpsi_pmt_t* p_pmt)
* \brief Clean and free a dvbpsi_pmt_t structure. * \brief Clean and free a dvbpsi_pmt_t structure.
* \param p_pmt pointer to the PMT structure * \param p_pmt pointer to the PMT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeletePMT(p_pmt) \ void dvbpsi_pmt_delete(dvbpsi_pmt_t* p_pmt);
do { \
dvbpsi_EmptyPMT(p_pmt); \
free(p_pmt); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_PMTAddDescriptor * dvbpsi_pmt_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t* dvbpsi_PMTAddDescriptor(dvbpsi_pmt_t* p_pmt, * \fn dvbpsi_descriptor_t* dvbpsi_pmt_descriptor_add(dvbpsi_pmt_t* p_pmt,
uint8_t i_tag, uint8_t i_tag,
uint8_t i_length, uint8_t i_length,
uint8_t* p_data) uint8_t* p_data)
* \brief Add a descriptor in the PMT. * \brief Add a descriptor in the PMT.
* \param p_pmt pointer to the PMT structure * \param p_pmt pointer to the PMT structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t* dvbpsi_pmt_descriptor_add(dvbpsi_pmt_t* p_pmt,
dvbpsi_descriptor_t* dvbpsi_PMTAddDescriptor(dvbpsi_pmt_t* p_pmt,
uint8_t i_tag, uint8_t i_lengt h, uint8_t i_tag, uint8_t i_lengt h,
uint8_t* p_data); uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_PMTAddES * dvbpsi_pmt_es_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_pmt_es_t* dvbpsi_PMTAddES(dvbpsi_pmt_t* p_pmt, * \fn dvbpsi_pmt_es_t* dvbpsi_pmt_es_add(dvbpsi_pmt_t* p_pmt,
uint8_t i_type, uint16_t i_pid) uint8_t i_type, uint16_t i_pid)
* \brief Add an ES in the PMT. * \brief Add an ES in the PMT.
* \param p_pmt pointer to the PMT structure * \param p_pmt pointer to the PMT structure
* \param i_type type of ES * \param i_type type of ES
* \param i_pid PID of the ES * \param i_pid PID of the ES
* \return a pointer to the added ES. * \return a pointer to the added ES.
*/ */
__attribute__((deprecated)) dvbpsi_pmt_es_t* dvbpsi_pmt_es_add(dvbpsi_pmt_t* p_pmt,
dvbpsi_pmt_es_t* dvbpsi_PMTAddES(dvbpsi_pmt_t* p_pmt,
uint8_t i_type, uint16_t i_pid); uint8_t i_type, uint16_t i_pid);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_PMTESAddDescriptor * dvbpsi_pmt_es_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t* dvbpsi_PMTESAddDescriptor(dvbpsi_pmt_es_t* p_es , * \fn dvbpsi_descriptor_t* dvbpsi_pmt_es_descriptor_add(dvbpsi_pmt_es_t* p _es,
uint8_t i_tag, uint8_t i_tag,
uint8_t i_length, uint8_t i_length,
uint8_t* p_data) uint8_t* p_data)
* \brief Add a descriptor in the PMT ES. * \brief Add a descriptor in the PMT ES.
* \param p_es pointer to the ES structure * \param p_es pointer to the ES structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t* dvbpsi_pmt_es_descriptor_add(dvbpsi_pmt_es_t* p_es,
dvbpsi_descriptor_t* dvbpsi_PMTESAddDescriptor(dvbpsi_pmt_es_t* p_es,
uint8_t i_tag, uint8_t i_len gth, uint8_t i_tag, uint8_t i_len gth,
uint8_t* p_data); uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenPMTSections * dvbpsi_pmt_sections_generate
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_psi_section_t* dvbpsi_GenPMTSections(dvbpsi_pmt_t* p_pmt) * \fn dvbpsi_psi_section_t* dvbpsi_pmt_sections_generate(dvbpsi_t *p_dvbps
i,
dvbpsi_pmt_t* p_pmt)
* \brief PMT generator * \brief PMT generator
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_pmt PMT structure * \param p_pmt PMT structure
* \return a pointer to the list of generated PSI sections. * \return a pointer to the list of generated PSI sections.
* *
* Generate PMT sections based on the dvbpsi_pmt_t structure. * Generate PMT sections based on the dvbpsi_pmt_t structure.
*/ */
dvbpsi_psi_section_t* dvbpsi_pmt_sections_generate(dvbpsi_t *p_dvbpsi, dvbp
si_pmt_t* p_pmt);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
dvbpsi_handle dvbpsi_AttachPMT(uint16_t i_program_number,
dvbpsi_pmt_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated)) void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi);
__attribute__((deprecated))
void dvbpsi_InitPMT(dvbpsi_pmt_t* p_pmt, uint16_t i_program_number,
uint8_t i_version, int b_current_next, uint16_t i_pcr_p
id);
__attribute__((deprecated)) void dvbpsi_EmptyPMT(dvbpsi_pmt_t* p_pmt);
__attribute__((deprecated))
dvbpsi_descriptor_t* dvbpsi_PMTAddDescriptor(dvbpsi_pmt_t* p_pmt,
uint8_t i_tag, uint8_t i_lengt
h,
uint8_t* p_data);
__attribute__((deprecated))
dvbpsi_pmt_es_t* dvbpsi_PMTAddES(dvbpsi_pmt_t* p_pmt,
uint8_t i_type, uint16_t i_pid);
__attribute__((deprecated))
dvbpsi_descriptor_t* dvbpsi_PMTESAddDescriptor(dvbpsi_pmt_es_t* p_es,
uint8_t i_tag, uint8_t i_len
gth,
uint8_t* p_data);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenPMTSections(dvbpsi_pmt_t* p_pmt); dvbpsi_psi_section_t* dvbpsi_GenPMTSections(dvbpsi_pmt_t* p_pmt);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of pmt.h" #error "Multiple inclusions of pmt.h"
#endif #endif
 End of changes. 35 change blocks. 
59 lines changed or deleted 80 lines changed or added


 psi.h   psi.h 
/************************************************************************** *** /************************************************************************** ***
* psi.h * psi.h
* Copyright (C) 2001-2010 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id: psi.h,v 1.6 2002/04/02 17:55:30 bozo Exp $ * $Id: psi.h,v 1.6 2002/04/02 17:55:30 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
skipping to change at line 52 skipping to change at line 52
/*! /*!
* \struct dvbpsi_psi_section_s * \struct dvbpsi_psi_section_s
* \brief PSI section structure. * \brief PSI section structure.
* *
* This structure is used to store a PSI section. The common information ar e * This structure is used to store a PSI section. The common information ar e
* decoded (ISO/IEC 13818-1 section 2.4.4.10). * decoded (ISO/IEC 13818-1 section 2.4.4.10).
* *
* dvbpsi_psi_section_s::p_data stores the complete section including the * dvbpsi_psi_section_s::p_data stores the complete section including the
* header. * header.
* *
* When dvbpsi_psi_section_s::b_syntax_indicator == 0, * When dvbpsi_psi_section_s::b_syntax_indicator == false,
* dvbpsi_psi_section_s::p_payload_start points immediately after the * dvbpsi_psi_section_s::p_payload_start points immediately after the
* section_length field and dvbpsi_psi_section_s::p_payload_end points * section_length field and dvbpsi_psi_section_s::p_payload_end points
* immediately after the end of the section (don't try to access this byte) . * immediately after the end of the section (don't try to access this byte) .
* *
* When dvbpsi_psi_section_s::b_syntax_indicator != 0, * When dvbpsi_psi_section_s::b_syntax_indicator != false,
* dvbpsi_psi_section_s::p_payload_start points immediately after the * dvbpsi_psi_section_s::p_payload_start points immediately after the
* last_section_number field and dvbpsi_psi_section_s::p_payload_end points to * last_section_number field and dvbpsi_psi_section_s::p_payload_end points to
* the first byte of the CRC_32 field. * the first byte of the CRC_32 field.
* *
* When dvbpsi_psi_section_s::b_syntax_indicator == 0 * When dvbpsi_psi_section_s::b_syntax_indicator == false
* dvbpsi_psi_section_s::i_extension, dvbpsi_psi_section_s::i_version, * dvbpsi_psi_section_s::i_extension, dvbpsi_psi_section_s::i_version,
* dvbpsi_psi_section_s::b_current_next, dvbpsi_psi_section_s::i_number, * dvbpsi_psi_section_s::b_current_next, dvbpsi_psi_section_s::i_number,
* dvbpsi_psi_section_s::i_last_number, and dvbpsi_psi_section_s::i_crc are * dvbpsi_psi_section_s::i_last_number, and dvbpsi_psi_section_s::i_crc are
* undefined. * undefined.
*/ */
struct dvbpsi_psi_section_s struct dvbpsi_psi_section_s
{ {
/* non-specific section data */ /* non-specific section data */
uint8_t i_table_id; /*!< table_id */ uint8_t i_table_id; /*!< table_id */
int b_syntax_indicator; /*!< section_syntax_indicator */ bool b_syntax_indicator; /*!< section_syntax_indicator */
int b_private_indicator; /*!< private_indicator */ bool b_private_indicator; /*!< private_indicator */
uint16_t i_length; /*!< section_length */ uint16_t i_length; /*!< section_length */
/* used if b_syntax_indicator is true */ /* used if b_syntax_indicator is true */
uint16_t i_extension; /*!< table_id_extension */ uint16_t i_extension; /*!< table_id_extension */
/*!< transport_stream_id for a /*!< transport_stream_id for a
PAT section */ PAT section */
uint8_t i_version; /*!< version_number */ uint8_t i_version; /*!< version_number */
int b_current_next; /*!< current_next_indicator */ bool b_current_next; /*!< current_next_indicator */
uint8_t i_number; /*!< section_number */ uint8_t i_number; /*!< section_number */
uint8_t i_last_number; /*!< last_section_number */ uint8_t i_last_number; /*!< last_section_number */
/* non-specific section data */ /* non-specific section data */
/* the content is table-specific */ /* the content is table-specific */
uint8_t * p_data; /*!< complete section */ uint8_t * p_data; /*!< complete section */
uint8_t * p_payload_start; /*!< payload start */ uint8_t * p_payload_start; /*!< payload start */
uint8_t * p_payload_end; /*!< payload end */ uint8_t * p_payload_end; /*!< payload end */
/* used if b_syntax_indicator is true */ /* used if b_syntax_indicator is true */
uint32_t i_crc; /*!< CRC_32 */ uint32_t i_crc; /*!< CRC_32 */
/* list handling */ /* list handling */
struct dvbpsi_psi_section_s * p_next; /*!< next element o f struct dvbpsi_psi_section_s * p_next; /*!< next element o f
the list */ the list */
}; };
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_NewPSISection * dvbpsi_NewPSISection
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_psi_section_t * dvbpsi_NewPSISection(int i_max_size) * \fn dvbpsi_psi_section_t * dvbpsi_NewPSISection(int i_max_size)
* \brief Creation of a new dvbpsi_psi_section_t structure. * \brief Creation of a new dvbpsi_psi_section_t structure.
* \param i_max_size max size in bytes of the section * \param i_max_size max size in bytes of the section
* \return a pointer to the new PSI section structure. * \return a pointer to the new PSI section structure.
skipping to change at line 123 skipping to change at line 122
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DeletePSISections(dvbpsi_psi_section_t * p_section) * \fn void dvbpsi_DeletePSISections(dvbpsi_psi_section_t * p_section)
* \brief Destruction of a dvbpsi_psi_section_t structure. * \brief Destruction of a dvbpsi_psi_section_t structure.
* \param p_section pointer to the first PSI section structure * \param p_section pointer to the first PSI section structure
* \return nothing. * \return nothing.
*/ */
void dvbpsi_DeletePSISections(dvbpsi_psi_section_t * p_section); void dvbpsi_DeletePSISections(dvbpsi_psi_section_t * p_section);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_CheckPSISection
**************************************************************************
***/
/*!
* \fn bool dvbpsi_CheckPSISection(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t
*p_section,
const uint8_t table_id, const char *psz_table_n
ame)
* \brief Check if PSI section has the expected table_id and it the syntax
indicator
* is true.
* \param p_dvbpsi pointer to dvbpsi library handle
* \param p_section pointer to the PSI section structure
* \param table_id expected table id
* \param psz_table_name table name to use when reporting errors.
* \return boolean value (false if the section did not pass the tests).
*/
bool dvbpsi_CheckPSISection(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_sec
tion,
const uint8_t table_id, const char *psz_table_n
ame);
/**************************************************************************
***
* dvbpsi_ValidPSISection * dvbpsi_ValidPSISection
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn int dvbpsi_ValidPSISection(dvbpsi_psi_section_t* p_section) * \fn bool dvbpsi_ValidPSISection(dvbpsi_psi_section_t* p_section)
* \brief Validity check of a PSI section. * \brief Validity check of a PSI section.
* \param p_section pointer to the PSI section structure * \param p_section pointer to the PSI section structure
* \return boolean value (0 if the section is not valid). * \return boolean value (false if the section is not valid).
* *
* Check the CRC_32 if the section has b_syntax_indicator set. * Check the CRC_32 if the section has b_syntax_indicator set.
*/ */
__attribute__((deprecated)) bool dvbpsi_ValidPSISection(dvbpsi_psi_section_t* p_section);
int dvbpsi_ValidPSISection(dvbpsi_psi_section_t* p_section);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_BuildPSISection * dvbpsi_BuildPSISection
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_BuildPSISection(dvbpsi_psi_section_t* p_section) * \fn void dvbpsi_BuildPSISection(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t * p_section)
* \brief Build a valid section based on the information in the structure. * \brief Build a valid section based on the information in the structure.
* \param p_dvbpsi dvbpsi handle
* \param p_section pointer to the PSI section structure * \param p_section pointer to the PSI section structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_BuildPSISection(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t* p_sec
void dvbpsi_BuildPSISection(dvbpsi_psi_section_t* p_section); tion);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of psi.h" #error "Multiple inclusions of psi.h"
#endif #endif
 End of changes. 14 change blocks. 
15 lines changed or deleted 38 lines changed or added


 sdt.h   sdt.h 
/************************************************************************** *** /************************************************************************** ***
* sdt.h * sdt.h
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id$ * $Id$
* *
* Authors: Johan Bilien <jobi@via.ecp.fr> * Authors: Johan Bilien <jobi@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 57 skipping to change at line 58
* This structure is used to store a decoded SDT service description. * This structure is used to store a decoded SDT service description.
* (ETSI EN 300 468 V1.4.1 section 5.2.3). * (ETSI EN 300 468 V1.4.1 section 5.2.3).
*/ */
/*! /*!
* \typedef struct dvbpsi_sdt_service_s dvbpsi_sdt_service_t * \typedef struct dvbpsi_sdt_service_s dvbpsi_sdt_service_t
* \brief dvbpsi_sdt_service_t type definition. * \brief dvbpsi_sdt_service_t type definition.
*/ */
typedef struct dvbpsi_sdt_service_s typedef struct dvbpsi_sdt_service_s
{ {
uint16_t i_service_id; /*!< service_id */ uint16_t i_service_id; /*!< service_id */
int b_eit_schedule; /*!< EIT schedule flag bool b_eit_schedule; /*!< EIT schedule flag
*/ */
int b_eit_present; /*!< EIT present/follow bool b_eit_present; /*!< EIT present/follow
ing ing
flag */ flag */
uint8_t i_running_status; /*!< Running status */ uint8_t i_running_status; /*!< Running status */
int b_free_ca; /*!< Free CA mode flag */ bool b_free_ca; /*!< Free CA mode flag */
uint16_t i_descriptors_length; /*!< Descriptors loop uint16_t i_descriptors_length; /*!< Descriptors loop
length */ length */
dvbpsi_descriptor_t * p_first_descriptor; /*!< First of the follo wing dvbpsi_descriptor_t * p_first_descriptor; /*!< First of the follo wing
DVB descriptors */ DVB descriptors */
struct dvbpsi_sdt_service_s * p_next; /*!< next element of struct dvbpsi_sdt_service_s * p_next; /*!< next element of
the list */ the list */
} dvbpsi_sdt_service_t; } dvbpsi_sdt_service_t;
skipping to change at line 88 skipping to change at line 89
* *
* This structure is used to store a decoded SDT. * This structure is used to store a decoded SDT.
* (ETSI EN 300 468 V1.4.1 section 5.2.3). * (ETSI EN 300 468 V1.4.1 section 5.2.3).
*/ */
/*! /*!
* \typedef struct dvbpsi_sdt_s dvbpsi_sdt_t * \typedef struct dvbpsi_sdt_s dvbpsi_sdt_t
* \brief dvbpsi_sdt_t type definition. * \brief dvbpsi_sdt_t type definition.
*/ */
typedef struct dvbpsi_sdt_s typedef struct dvbpsi_sdt_s
{ {
uint16_t i_ts_id; /*!< transport_stream_id */ /* PSI table members */
uint8_t i_version; /*!< version_number */ uint8_t i_table_id; /*!< table id */
int b_current_next; /*!< current_next_indicator uint16_t i_extension; /*!< subtable id, here tr
*/ ansport_stream_id */
uint16_t i_network_id; /*!< original network id */
/* Table specific */
uint8_t i_version; /*!< version_number */
bool b_current_next; /*!< current_next_indicat
or */
uint16_t i_network_id; /*!< original network id
*/
dvbpsi_sdt_service_t * p_first_service; /*!< service description dvbpsi_sdt_service_t * p_first_service; /*!< service description
list */ list */
} dvbpsi_sdt_t; } dvbpsi_sdt_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_sdt_callback * dvbpsi_sdt_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, * \typedef void (* dvbpsi_sdt_callback)(void* p_cb_data,
dvbpsi_sdt_t* p_new_sdt) dvbpsi_sdt_t* p_new_sdt)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, dvbpsi_sdt_t* p_new_s dt); typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, dvbpsi_sdt_t* p_new_s dt);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachSDT * dvbpsi_sdt_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_AttachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_sdt_callback pf_callback, uint16_t i_extension, dvbpsi_sdt_callback pf_callback,
void* p_cb_data) void* p_cb_data)
* \brief Creation and initialization of a SDT decoder. * \brief Creation and initialization of a SDT decoder. It is attached to p
* \param p_demux Subtable demultiplexor to which the decoder is attached. _dvbpsi.
* \param p_dvbpsi pointer to dvbpsi to hold decoder/demuxer structure
* \param i_table_id Table ID, 0x42 or 0x46. * \param i_table_id Table ID, 0x42 or 0x46.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \param pf_callback function to call back on new SDT. * \param pf_callback function to call back on new SDT.
* \param p_cb_data private data given in argument to the callback. * \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
int dvbpsi_AttachSDT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id, xtension,
uint16_t i_extension, dvbpsi_sdt_callback pf_callback, dvbpsi_sdt_callback pf_callback, void* p_cb_data);
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachSDT * dvbpsi_sdt_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn void dvbpsi_sdt_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension) uint16_t i_extension)
* \brief Destroy a SDT decoder. * \brief Destroy a SDT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi pointer holding decoder/demuxer structure
* \param i_table_id Table ID, 0x42 or 0x46. * \param i_table_id Table ID, 0x42 or 0x46.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_sdt_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
void dvbpsi_DetachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, xtension);
uint16_t i_extension);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitSDT/dvbpsi_NewSDT * dvbpsi_sdt_init/dvbpsi_NewSDT
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitSDT(dvbpsi_sdt_t* p_sdt, uint16_t i_ts_id, * \fn void dvbpsi_sdt_init(dvbpsi_sdt_t* p_sdt, uint8_t i_table_id, uint16
uint8_t i_version, int b_current_next, uint16_t i_network_id) _t i_extension,
uint8_t i_version, bool b_current_next, uint16_
t i_network_id)
* \brief Initialize a user-allocated dvbpsi_sdt_t structure. * \brief Initialize a user-allocated dvbpsi_sdt_t structure.
* \param p_sdt pointer to the SDT structure * \param p_sdt pointer to the SDT structure
* \param i_ts_id transport stream ID * \param i_table_id Table ID, 0x42 or 0x46.
* \param i_extension Table ID extension, here TS ID.
* \param i_version SDT version * \param i_version SDT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_network_id original network id * \param i_network_id original network id
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_sdt_init(dvbpsi_sdt_t *p_sdt, uint8_t i_table_id, uint16_t i_ex
void dvbpsi_InitSDT(dvbpsi_sdt_t *p_sdt, uint16_t i_ts_id, uint8_t i_versio tension,
n, uint8_t i_version, bool b_current_next, uint16_t i_net
int b_current_next, uint16_t i_network_id); work_id);
/*! /*!
* \def dvbpsi_NewSDT(p_sdt, i_ts_id, i_version, b_current_next, i_network_ * \fn dvbpsi_sdt_t *dvbpsi_sdt_new(uint8_t i_table_id, uint16_t i_extensio
id) n, uint8_t i_version,
bool b_current_next, uint16_t i_network
_id)
* \brief Allocate and initialize a new dvbpsi_sdt_t structure. * \brief Allocate and initialize a new dvbpsi_sdt_t structure.
* \param p_sdt pointer to the SDT structure * \param i_table_id Table ID, 0x42 or 0x46.
* \param i_ts_id transport stream ID * \param i_extension Table ID extension, here TS ID.
* \param i_version SDT version * \param i_version SDT version
* \param b_current_next current next indicator * \param b_current_next current next indicator
* \param i_network_id original network id * \param i_network_id original network id
* \return nothing. * \return p_sdt pointer to the SDT structure
*/ */
#define dvbpsi_NewSDT(p_sdt, i_ts_id, i_version, b_current_next,i_network_i dvbpsi_sdt_t *dvbpsi_sdt_new(uint8_t i_table_id, uint16_t i_extension, uint
d) \ 8_t i_version,
do { \ bool b_current_next, uint16_t i_network_id);
p_sdt = (dvbpsi_sdt_t*)malloc(sizeof(dvbpsi_sdt_t)); \
if(p_sdt != NULL) \
dvbpsi_InitSDT(p_sdt, i_ts_id, i_version, b_current_next, i_network_id)
; \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptySDT/dvbpsi_DeleteSDT * dvbpsi_sdt_empty/dvbpsi_sdt_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptySDT(dvbpsi_sdt_t* p_sdt) * \fn void dvbpsi_sdt_empty(dvbpsi_sdt_t* p_sdt)
* \brief Clean a dvbpsi_sdt_t structure. * \brief Clean a dvbpsi_sdt_t structure.
* \param p_sdt pointer to the SDT structure * \param p_sdt pointer to the SDT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_sdt_empty(dvbpsi_sdt_t *p_sdt);
void dvbpsi_EmptySDT(dvbpsi_sdt_t *p_sdt);
/*! /*!
* \def dvbpsi_DeleteSDT(p_sdt) * \fn dvbpsi_sdt_delete(dvbpsi_sdt_t *p_sdt)
* \brief Clean and free a dvbpsi_sdt_t structure. * \brief Clean and free a dvbpsi_sdt_t structure.
* \param p_sdt pointer to the SDT structure * \param p_sdt pointer to the SDT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeleteSDT(p_sdt) \ void dvbpsi_sdt_delete(dvbpsi_sdt_t *p_sdt);
do { \
dvbpsi_EmptySDT(p_sdt); \
free(p_sdt); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_SDTAddService * dvbpsi_sdt_service_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_sdt_service_t* dvbpsi_SDTAddService(dvbpsi_sdt_t* p_sdt, * \fn dvbpsi_sdt_service_t* dvbpsi_sdt_service_add(dvbpsi_sdt_t* p_sdt,
uint16_t i_service_id, uint16_t i_service_id,
int b_eit_schedule, bool b_eit_schedule,
int b_eit_present, bool b_eit_present,
uint8_t i_running_status, uint8_t i_running_status,
int b_free_ca) bool b_free_ca)
* \brief Add a service description at the end of the SDT. * \brief Add a service description at the end of the SDT.
* \param p_sdt pointer to the SDT structure * \param p_sdt pointer to the SDT structure
* \param i_service_id Service ID * \param i_service_id Service ID
* \param b_eit_schedule EIT Schedule flag * \param b_eit_schedule EIT Schedule flag
* \param b_eit_present EIT Present/Following flag * \param b_eit_present EIT Present/Following flag
* \param i_running_status Running status * \param i_running_status Running status
* \param b_free_ca Free CA flag * \param b_free_ca Free CA flag
* \return a pointer to the added service description. * \return a pointer to the added service description.
*/ */
__attribute__((deprecated)) dvbpsi_sdt_service_t *dvbpsi_sdt_service_add(dvbpsi_sdt_t* p_sdt,
dvbpsi_sdt_service_t *dvbpsi_SDTAddService(dvbpsi_sdt_t* p_sdt, uint16_t i_service_id, bool b_eit_schedule, bool b_eit_present,
uint16_t i_service_id, int b_eit_schedule, int b_eit_present, uint8_t i_running_status, bool b_free_ca);
uint8_t i_running_status,int b_free_ca);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_SDTServiceAddDescriptor * dvbpsi_sdt_service_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t *dvbpsi_SDTServiceAddDescriptor( * \fn dvbpsi_descriptor_t *dvbpsi_sdt_service_descriptor_add(
dvbpsi_sdt_service_t *p_serv ice, dvbpsi_sdt_service_t *p_serv ice,
uint8_t i_tag, uint8_t i_len gth, uint8_t i_tag, uint8_t i_len gth,
uint8_t *p_data) uint8_t *p_data)
* \brief Add a descriptor in the SDT service. * \brief Add a descriptor in the SDT service.
* \param p_service pointer to the service structure * \param p_service pointer to the service structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t *dvbpsi_sdt_service_descriptor_add(
dvbpsi_descriptor_t *dvbpsi_SDTServiceAddDescriptor(
dvbpsi_sdt_service_t *p_serv ice, dvbpsi_sdt_service_t *p_serv ice,
uint8_t i_tag, uint8_t i_len gth, uint8_t i_tag, uint8_t i_len gth,
uint8_t *p_data); uint8_t *p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenSDTSections * dvbpsi_sdt_sections_generate
************************************************************************** *** ************************************************************************** ***
* Generate SDT sections based on the dvbpsi_sdt_t structure. * Generate SDT sections based on the dvbpsi_sdt_t structure.
************************************************************************** ***/ ************************************************************************** ***/
/*!
* \fn dvbpsi_psi_section_t* dvbpsi_sdt_sections_generate(dvbpsi_t *p_dvbps
i,
dvbpsi_sdt_t * p_sdt)
* \brief SDT generator
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_sdt SDT structure
* \return a pointer to the list of generated PSI sections.
*
* Generate SDT sections based on the dvbpsi_sdt_t structure.
*/
dvbpsi_psi_section_t *dvbpsi_sdt_sections_generate(dvbpsi_t *p_dvbpsi, dvbp
si_sdt_t * p_sdt);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
int dvbpsi_AttachSDT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_sdt_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension);
__attribute__((deprecated))
void dvbpsi_InitSDT(dvbpsi_sdt_t *p_sdt, uint16_t i_ts_id, uint8_t i_versio
n,
int b_current_next, uint16_t i_network_id);
__attribute__((deprecated)) void dvbpsi_EmptySDT(dvbpsi_sdt_t *p_sdt);
__attribute__((deprecated))
dvbpsi_sdt_service_t *dvbpsi_SDTAddService(dvbpsi_sdt_t* p_sdt,
uint16_t i_service_id, int b_eit_schedule, int b_eit_present,
uint8_t i_running_status, int b_free_ca);
__attribute__((deprecated))
dvbpsi_descriptor_t *dvbpsi_SDTServiceAddDescriptor(
dvbpsi_sdt_service_t *p_serv
ice,
uint8_t i_tag, uint8_t i_len
gth,
uint8_t *p_data);
__attribute__((deprecated))
dvbpsi_psi_section_t *dvbpsi_GenSDTSections(dvbpsi_sdt_t * p_sdt); dvbpsi_psi_section_t *dvbpsi_GenSDTSections(dvbpsi_sdt_t * p_sdt);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of sdt.h" #error "Multiple inclusions of sdt.h"
#endif #endif
 End of changes. 37 change blocks. 
72 lines changed or deleted 114 lines changed or added


 sis.h   sis.h 
skipping to change at line 57 skipping to change at line 57
* This structure is used to store a decoded SIS service description. * This structure is used to store a decoded SIS service description.
* (SCTE 35 2004 section 7.2). * (SCTE 35 2004 section 7.2).
*/ */
/*! /*!
* \typedef struct dvbpsi_sis_s dvbpsi_sis_t * \typedef struct dvbpsi_sis_s dvbpsi_sis_t
* \brief dvbpsi_sis_t type definition. * \brief dvbpsi_sis_t type definition.
*/ */
typedef struct dvbpsi_sis_s typedef struct dvbpsi_sis_s
{ {
/* section */ /* section */
uint8_t i_protocol_version; /*!< Protocol version uint8_t i_table_id; /*!< table id */
shall be 0 */ uint16_t i_extension; /*!< subtable id */
uint16_t i_ts_id; /*!< transport_stream_id */
uint8_t i_version; /*!< version_number */
uint8_t i_protocol_version; /*!< Protocol version
shall be 0 */
bool b_current_next; /*!< current_next_indicator
*/
/* encryption */ /* encryption */
int b_encrypted_packet; /*!< 1 when packet is bool b_encrypted_packet; /*!< 1 when packet is
encrypted */ encrypted */
uint8_t i_encryption_algorithm; /*!< Encryption algorit hm uint8_t i_encryption_algorithm; /*!< Encryption algorit hm
used */ used */
uint64_t i_pts_adjustment; /*!< PTS offset */ uint64_t i_pts_adjustment; /*!< PTS offset */
uint8_t cw_index; /*!< CA control word */ uint8_t cw_index; /*!< CA control word */
/* splice command */ /* splice command */
uint16_t i_splice_command_length;/*!< Length of splice c ommand */ uint16_t i_splice_command_length;/*!< Length of splice c ommand */
uint8_t i_splice_command_type; /*!< Splice command typ e */ uint8_t i_splice_command_type; /*!< Splice command typ e */
/* FIXME: splice_info_section comes here /* Splice Command:
* splice_command_type splice_info_section * splice_command_type splice_info_section
* 0x00 splice_null() * 0x00 splice_null()
* 0x01 reserved * 0x01 reserved
* 0x02 reserved * 0x02 reserved
* 0x03 reserved * 0x03 reserved
* 0x04 splice_schedule() * 0x04 splice_schedule()
* 0x05 splice_insert() * 0x05 splice_insert()
* 0x06 time_signal() * 0x06 time_signal()
* 0x07 bandwidth_reservation() * 0x07 bandwidth_reservation()
* 0x08 - 0xff reserved * 0x08 - 0xff reserved
*/ */
void *p_splice_command; /*!< Pointer to splice
command
structure */
/* descriptors */ /* descriptors */
uint16_t i_descriptors_length; /*!< Descriptors loop uint16_t i_descriptors_length; /*!< Descriptors loop
length */ length */
dvbpsi_descriptor_t * p_first_descriptor; /*!< First of the follo dvbpsi_descriptor_t *p_first_descriptor; /*!< First of the foll
wing owing
DVB descriptors */ SIS descriptors *
/
/* FIXME: alignment stuffing */ /* FIXME: alignment stuffing */
uint32_t i_ecrc; /*!< CRC 32 of decrypted splice_info_section */ uint32_t i_ecrc; /*!< CRC 32 of decrypted splice_info_section */
} dvbpsi_sis_t; } __attribute__((packed)) dvbpsi_sis_t;
/**************************************************************************
***
* Splice Commands
**************************************************************************
***/
/*!
* \brief The Splice Info Section (SIS) defines some Splice Commands, which
* are described below:
*/
/*!
* \typedef struct dvbpsi_sis_cmd_splice_null_s dvbpsi_sis_cmd_splice_null_
t
* \brief splice_null() splice command definition
*/
/*!
* \struct dvbpsi_sis_cmd_splice_null_s
* \brief splice_null() splice command definition
*/
typedef struct dvbpsi_sis_cmd_splice_null_s
{
/* nothing */
} dvbpsi_sis_cmd_splice_null_t;
/*!
* \typedef struct dvbpsi_sis_break_duration_s dvbpsi_sis_break_duration_t
* \brief splice event definition
*/
/*!
* \struct dvbpsi_sis_break_duration_s
* \brief splice break duration
*/
typedef struct dvbpsi_sis_break_duration_s
{
bool b_auto_return; /*!< when true it denotes that the duration
shall be used by the splicing device t
o
know when the return to the network fe
ed
(end of break) is to take place */
uint64_t i_duration; /*!< indicates elapsed time in terms of tic
ks
of the program’s 90 kHz clock indicate
s
elapsed time in terms of ticks of the
program’s 90 kHz clock */
} dvbpsi_sis_break_duration_t;
/*!
* \typedef struct dvbpsi_sis_component_utc_splice_time_s dvbpsi_sis_compon
ent_utc_splice_time_t
* \brief combined component tag and UTC splice time definition
*/
typedef struct dvbpsi_sis_component_utc_splice_time_s dvbpsi_sis_component_
utc_splice_time_t;
/*!
* \struct dvbpsi_sis_component_utc_splice_time_s
* \brief combined component tag and UTC splice time definition
*/
struct dvbpsi_sis_component_utc_splice_time_s
{
uint8_t component_tag; /*!< identifies the elementary PID stre
am containing
the Splice Point specified by the
value of
splice_time() that follows. */
uint32_t i_utc_splice_time; /*!< time of the signaled splice event
as
the number of seconds since 00 hou
rs UTC,
January 6th, 1980.
Maybe converted to UTC without use
of
GPS_UTC_offset value from System T
ime table. */
dvbpsi_sis_component_utc_splice_time_t *p_next; /*!< next component, ut
c splice time structure */
};
/*!
* \typedef struct dvbpsi_sis_splice_event_s dvbpsi_sis_splice_event_t
* \brief splice event definition
*/
/*!
* \struct dvbpsi_sis_splice_event_s
* \brief splice events structure, @see dvbpsi_sis_splice_event_t
*/
typedef struct dvbpsi_sis_splice_event_s dvbpsi_sis_splice_event_t;
struct dvbpsi_sis_splice_event_s
{
uint32_t i_splice_event_id; /*!< splice event iden
tifier */
bool b_splice_event_cancel_indicator; /*!< cancels splice ev
ent when true */
/* if (!b_splice_event_cancel_indicator) */
bool b_out_of_network_indicator; /*!< signals an out of netw
ork feed event */
bool b_program_splice_flag; /*!< signals a Program Spli
ce Point */
bool b_duration_flag; /*!< signals existing break
_duration() field */
/* if (b_program_splice_flag) */
uint32_t i_utc_splice_time; /*!< time of the signaled s
plice event as
the number of seconds
since 00 hours UTC,
January 6th, 1980.
Maybe converted to UTC
without use of
GPS_UTC_offset value f
rom System Time table.*/
/* if (!b_program_splice_flag) */
uint8_t i_component_count; /*!< number of stream PID i
n the following
loop. A component is e
quivalent to
elementary stream PIDs
.*/
dvbpsi_sis_component_utc_splice_time_t *p_data;
/*!< identifies the element
ary PID stream containing
the Splice Point speci
fied by the value of
splice_time() that fol
lows. */
/* if (b_duration_flag) */
dvbpsi_sis_break_duration_t *p_break_duration; /*!< break duration
is present when
b_duration_flag is set
*/
/* */
uint16_t i_unique_program_id; /*!< provide a unique identificati
on for
a viewing event */
uint8_t i_avail_num; /*!< identification for a specific
avail within one unique_progr
am_id. */
uint8_t i_avails_expected; /*!< count of the expected number
of individual
avails within the current vie
wing event */
/* end */
dvbpsi_sis_splice_event_t *p_next; /*!< next splice event structure *
/
};
/*!
* \typedef struct dvbpsi_sis_cmd_splice_schedule_s dvbpsi_sis_cmd_splice_s
chedule_t
* \brief splice_schedule() splice command definition
*/
/*!
* \struct dvbpsi_sis_cmd_splice_schedule_s
* \brief splice_schedule() splice command definition
*/
typedef struct dvbpsi_sis_cmd_splice_schedule_s
{
uint8_t i_splice_count; /*!< Count of splice events
*/
dvbpsi_sis_splice_event_t *p_splice_event; /*!< List splice of events
*/
} dvbpsi_sis_cmd_splice_schedule_t;
/*!
* \typedef struct dvbpsi_sis_splice_time_s dvbpsi_sis_splice_time_t
* \brief splice_time() splice definition
*/
/*!
* \struct dvbpsi_sis_splice_time_s
* \brief splice_time() splice definition
*/
typedef struct dvbpsi_sis_splice_time_s dvbpsi_sis_splice_time_t;
struct dvbpsi_sis_splice_time_s
{
bool b_time_specified_flag; /*!< signals presence of PTS time fi
eld */
/* if (b_time_specified_flag) */
uint64_t i_pts_time; /*!< time in terms of ticks of the progr
am’s 90 kHz
clock. This field, when modified by
pts_adjustment,
represents the time of the intended
splice point.*/
/* else reserved */
/* end */
dvbpsi_sis_splice_time_t *p_next; /*!< next splice_time() entry */
};
/*!
* \typedef struct dvbpsi_sis_component_splice_time_s dvbpsi_sis_component_
splice_time_t
* \brief component_tag, splice_time definition
*/
/*!
* \struct dvbpsi_sis_component_splice_time_s
* \brief component_tag, splice_time definition
*/
typedef struct dvbpsi_sis_component_splice_time_s dvbpsi_sis_component_spli
ce_time_t;
struct dvbpsi_sis_component_splice_time_s
{
uint8_t i_component_tag; /*!< identifies the elementary PID stre
am containing
the Splice Point specified by the
value of
splice_time() that follows. */
/* if (splice_immediate_flag) */
dvbpsi_sis_splice_time_t *p_splice_time; /*!< splice time defintions */
/* */
dvbpsi_sis_component_splice_time_t *p_next; /*!< next in list */
};
/*!
* \typedef struct dvbpsi_sis_cmd_splice_insert_s dvbpsi_sis_cmd_splice_ins
ert_t
* \brief splice_insert() splice command definition
*/
/*!
* \struct dvbpsi_sis_cmd_splice_insert_s
* \brief splice_insert() splice command definition
*/
typedef struct dvbpsi_sis_cmd_splice_insert_s
{
uint32_t i_splice_event_id; /*!< splice event iden
tifier */
bool b_splice_event_cancel_indicator; /*!< cancels splice ev
ent when true */
/* if (!b_splice_event_cancel_indicator) */
bool b_out_of_network_indicator; /*!< signals an out of netw
ork feed event */
bool b_program_splice_flag; /*!< signals a Program Spli
ce Point */
bool b_duration_flag; /*!< signals existing break
_duration() field */
bool b_splice_immediate_flag; /*!< signals immediate spli
ce insertion */
/* if (b_program_splice_flag) && (!b_splice_immediate_flag) */
dvbpsi_sis_splice_time_t *p_splice_time; /*!< splice time */
/* if (!b_program_splice_flag) */
uint8_t i_component_count; /*!< number of stream PID
in the following loop.
A component is equiva
lent to elementary stream PIDs.*/
dvbpsi_sis_component_splice_time_t *p_data; /*!< identifies the elemen
tary PID stream containing
the Splice Point spec
ified by the value of
splice_time() that fo
llows. */
/* if (b_duration_flag) */
dvbpsi_sis_break_duration_t *p_break_duration; /*!< break duration is p
resent when b_duration_flag is set */
/* */
uint16_t i_unique_program_id; /*!< provide a unique identif
ication for a viewing event */
uint8_t i_avail_num; /*!< identification for a spe
cific avail within
one unique_program_id. *
/
uint8_t i_avails_expected; /*!< count of the expected nu
mber of individual avails
within the current viewi
ng event */
/* end */
} dvbpsi_sis_cmd_splice_insert_t;
/*!
* \typedef struct dvbpsi_sis_cmd_time_signal_s dvbpsi_sis_cmd_time_signal_
t
* \brief time_signal() splice command definition
*/
/*!
* \struct dvbpsi_sis_cmd_time_signal_s
* \brief time_signal() splice command definition
*/
typedef struct dvbpsi_sis_cmd_time_signal_s
{
dvbpsi_sis_splice_time_t *p_splice_time; /*!< splice time command
*/
} dvbpsi_sis_cmd_time_signal_t;
/*!
* \typedef struct dvbpsi_sis_cmd_bandwidth_reservation_s dvbpsi_sis_cmd_ba
ndwidth_reservation_t
* \brief bandwidth_reservation() splice command definition
*/
/*!
* \struct dvbpsi_sis_cmd_bandwidth_reservation_s
* \brief bandwidth_reservation() splice command definition
*/
typedef struct dvbpsi_sis_cmd_bandwidth_reservation_s
{
/* nothing */
} dvbpsi_sis_cmd_bandwidth_reservation_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_sis_callback * dvbpsi_sis_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_sis_callback)(void* p_cb_data, * \typedef void (* dvbpsi_sis_callback)(void* p_cb_data,
dvbpsi_sis_t* p_new_sis) dvbpsi_sis_t* p_new_sis)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_sis_callback)(void* p_cb_data, dvbpsi_sis_t* p_new_s is); typedef void (* dvbpsi_sis_callback)(void* p_cb_data, dvbpsi_sis_t* p_new_s is);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachSIS * dvbpsi_sis_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_AttachSIS(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn bool dvbpsi_sis_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_sis_callback pf_callback, uint16_t i_extension, dvbpsi_sis_callback pf_callback,
void* p_cb_data) void* p_cb_data)
* \brief Creation and initialization of a SIS decoder. * \brief Creation and initialization of a SIS decoder. It is attached to p
* \param p_demux Subtable demultiplexor to which the decoder is attached. _dvbpsi.
* \param p_dvbpsi pointer to dvbpsi to hold decoder/demuxer structure
* \param i_table_id Table ID, 0xFC. * \param i_table_id Table ID, 0xFC.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension.
* \param pf_callback function to call back on new SIS. * \param pf_callback function to call back on new SIS.
* \param p_cb_data private data given in argument to the callback. * \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_sis_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_e
int dvbpsi_AttachSIS(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id, xtension,
uint16_t i_extension, dvbpsi_sis_callback pf_callback, dvbpsi_sis_callback pf_callback, void* p_cb_data);
void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachSIS * dvbpsi_sis_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_DetachSIS(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn void dvbpsi_sis_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension) uint16_t i_extension)
* \brief Destroy a SIS decoder. * \brief Destroy a SIS decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi pointer to dvbpsi to hold decoder/demuxer structure
* \param i_table_id Table ID, 0xFC. * \param i_table_id Table ID, 0xFC.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_sis_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
void dvbpsi_DetachSIS(dvbpsi_demux_t * p_demux, uint8_t i_table_id, xtension);
uint16_t i_extension);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitSIS/dvbpsi_NewSIS * dvbpsi_sis_init/dvbpsi_sis_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitSIS(dvbpsi_sis_t* p_sis, uint16_t i_ts_id, * \fn void dvbpsi_sis_init(dvbpsi_sis_t *p_sis, uint8_t i_table_id, uint16
uint8_t i_version, int b_current_next, uint16_t i_network_id) _t i_extension,
uint8_t i_version, bool b_current_next, uint8_t i_proto
col_version);
* \brief Initialize a user-allocated dvbpsi_sis_t structure. * \brief Initialize a user-allocated dvbpsi_sis_t structure.
* \param p_sis pointer to the SIS structure * \param p_sis pointer to the SIS structure
* \param i_table_id Table ID, 0xFC.
* \param i_extension Table ID extension.
* \param i_version SIS version
* \param b_current_next current next indicator
* \param i_protocol_version SIS protocol version (currently 0) * \param i_protocol_version SIS protocol version (currently 0)
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_sis_init(dvbpsi_sis_t *p_sis, uint8_t i_table_id, uint16_t i_ex
void dvbpsi_InitSIS(dvbpsi_sis_t *p_sis, uint8_t i_protocol_version); tension,
uint8_t i_version, bool b_current_next, uint8_t i_prot
ocol_version);
/*! /*!
* \def dvbpsi_NewSIS(p_sis, i_protocol_version) * \fn dvbpsi_sis_t* dvbpsi_sis_new(uint8_t i_table_id, uint16_t i_extensio
n,
uint8_t i_version, bool b_current_next, uint8_t i_protocol_vers
ion);
* \brief Allocate and initialize a new dvbpsi_sis_t structure. * \brief Allocate and initialize a new dvbpsi_sis_t structure.
* \param p_sis pointer to the SIS structure * \param i_table_id Table ID, 0xFC.
* \param i_extension Table ID extension.
* \param i_version SIS version
* \param b_current_next current next indicator
* \param i_protocol_version SIS protocol version (currently 0) * \param i_protocol_version SIS protocol version (currently 0)
* \return nothing. * \return p_sis pointer to the SIS structure
*/ */
#define dvbpsi_NewSIS(p_sis, i_protocol_version) \ dvbpsi_sis_t* dvbpsi_sis_new(uint8_t i_table_id, uint16_t i_extension, uint
do { \ 8_t i_version,
p_sis = (dvbpsi_sis_t*)malloc(sizeof(dvbpsi_sis_t)); \ bool b_current_next, uint8_t i_protocol_versio
if(p_sis != NULL) \ n);
dvbpsi_InitSIS(p_sis, i_protocol_version); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptySIS/dvbpsi_DeleteSIS * dvbpsi_sis_empty/dvbpsi_sis_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptySIS(dvbpsi_sis_t* p_sis) * \fn void dvbpsi_sis_empty(dvbpsi_sis_t* p_sis)
* \brief Clean a dvbpsi_sis_t structure. * \brief Clean a dvbpsi_sis_t structure.
* \param p_sis pointer to the SIS structure * \param p_sis pointer to the SIS structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_sis_empty(dvbpsi_sis_t *p_sis);
void dvbpsi_EmptySIS(dvbpsi_sis_t *p_sis);
/*! /*!
* \def dvbpsi_DeleteSIS(p_sis) * \fn void dvbpsi_sis_delete(dvbpsi_sis_t *p_sis)
* \brief Clean and free a dvbpsi_sis_t structure. * \brief Clean and free a dvbpsi_sis_t structure.
* \param p_sIt pointer to the SIS structure * \param p_sis pointer to the SIS structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeleteSIS(p_sis) \ void dvbpsi_sis_delete(dvbpsi_sis_t *p_sis);
do { \
dvbpsi_EmptySIS(p_sis); \
free(p_sis); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_SISAddDescriptor * dvbpsi_sis_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t *dvbpsi_SISAddDescriptor(dvbpsi_sis_t *p_sis, * \fn dvbpsi_descriptor_t *dvbpsi_sis_descriptor_add(dvbpsi_sis_t *p_sis,
uint8_t i_tag, uint8_t i_len gth, uint8_t i_tag, uint8_t i_len gth,
uint8_t *p_data) uint8_t *p_data)
* \brief Add a descriptor in the SIS service. * \brief Add a descriptor in the SIS service.
* \param p_sis pointer to the SIS structure * \param p_sis pointer to the SIS structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t *dvbpsi_sis_descriptor_add(dvbpsi_sis_t *p_sis,
dvbpsi_descriptor_t *dvbpsi_SISAddDescriptor( dvbpsi_sis_t *p_sis, uint8_t i_tag, uint8_t i_lengt
uint8_t i_tag, uint8_t i_leng h,
th, uint8_t *p_data);
uint8_t *p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenSISSections * dvbpsi_sis_sections_generate
************************************************************************** *** ************************************************************************** ***
* Generate SIS sections based on the dvbpsi_sis_t structure. * Generate SIS sections based on the dvbpsi_sis_t structure.
************************************************************************** ***/ ************************************************************************** ***/
/*!
* \fn dvbpsi_psi_section_t *dvbpsi_sis_sections_generate(dvbpsi_t *p_dvbps
i, dvbpsi_sis_t * p_sis);
* \brief SIS generator
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_sis SIS structure
* \return a pointer to the list of generated PSI sections.
*
* Generate SIS sections based on the dvbpsi_sis_t structure.
*/
dvbpsi_psi_section_t *dvbpsi_sis_sections_generate(dvbpsi_t *p_dvbpsi, dvbp
si_sis_t * p_sis);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
int dvbpsi_AttachSIS(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_sis_callback pf_callback,
void* p_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachSIS(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension);
__attribute__((deprecated))
void dvbpsi_InitSIS(dvbpsi_sis_t *p_sis, uint8_t i_protocol_version);
__attribute__((deprecated)) void dvbpsi_EmptySIS(dvbpsi_sis_t *p_sis);
__attribute__((deprecated))
dvbpsi_descriptor_t *dvbpsi_SISAddDescriptor( dvbpsi_sis_t *p_sis,
uint8_t i_tag, uint8_t i_leng
th,
uint8_t *p_data);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t *dvbpsi_GenSISSections(dvbpsi_sis_t * p_sis); dvbpsi_psi_section_t *dvbpsi_GenSISSections(dvbpsi_sis_t * p_sis);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of sis.h" #error "Multiple inclusions of sis.h"
#endif #endif
 End of changes. 36 change blocks. 
59 lines changed or deleted 411 lines changed or added


 tot.h   tot.h 
/************************************************************************** *** /************************************************************************** ***
* tot.h * tot.h
* Copyright (C) 2001-2011 VideoLAN * Copyright (C) 2001-2011 VideoLAN
* $Id$ * $Id$
* *
* Authors: Johann Hanne * Authors: Johann Hanne
* heavily based on pmt.c which was written by * heavily based on pmt.c which was written by
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Jean-Paul Saman <jpsaman@videolan.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * 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, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 31 skipping to change at line 32
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 1 USA
* *
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \file <tot.h> * \file <tot.h>
* \author Johann Hanne * \author Johann Hanne
* \brief Application interface for the TDT/TOT decoder and the TDT/TOT gen erator. * \brief Application interface for the TDT/TOT decoder and the TDT/TOT gen erator.
* *
* Application interface for the TDT/TOT decoder and the TDT/TOT generator. * Application interface for the TDT (Time and Date Table)/TOT (Time Offset
* New decoded TDT/TOT tables are sent by callback to the application. Table)
* decoder and the TDT/TOT generator. New decoded TDT/TOT tables are sent b
y
* callback to the application.
*/ */
#ifndef _DVBPSI_TOT_H_ #ifndef _DVBPSI_TOT_H_
#define _DVBPSI_TOT_H_ #define _DVBPSI_TOT_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/************************************************************************** *** /************************************************************************** ***
skipping to change at line 58 skipping to change at line 60
* *
* This structure is used to store a decoded TDT/TOT. * This structure is used to store a decoded TDT/TOT.
* (ETSI EN 300 468 section 5.2.5/5.2.6). * (ETSI EN 300 468 section 5.2.5/5.2.6).
*/ */
/*! /*!
* \typedef struct dvbpsi_tot_s dvbpsi_tot_t * \typedef struct dvbpsi_tot_s dvbpsi_tot_t
* \brief dvbpsi_tot_t type definition. * \brief dvbpsi_tot_t type definition.
*/ */
typedef struct dvbpsi_tot_s typedef struct dvbpsi_tot_s
{ {
uint64_t i_utc_time; /*!< UTC_time */ uint8_t i_table_id; /*!< table id */
uint16_t i_extension; /*!< subtable id */
dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */ /* Subtable specific */
uint8_t i_version; /*!< version_number */
bool b_current_next; /*!< current_next_indicat
or */
uint32_t i_crc; /*!< CRC_32 (TOT only) */ uint64_t i_utc_time; /*!< UTC_time */
} dvbpsi_tot_t; dvbpsi_descriptor_t * p_first_descriptor; /*!< descriptor list */
uint32_t i_crc; /*!< CRC_32 (TOT only) */
} __attribute__((packed)) dvbpsi_tot_t;
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_tot_callback * dvbpsi_tot_callback
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \typedef void (* dvbpsi_tot_callback)(void* p_cb_data, * \typedef void (* dvbpsi_tot_callback)(void* p_cb_data,
dvbpsi_tot_t* p_new_tot) dvbpsi_tot_t* p_new_tot)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_tot_callback)(void* p_cb_data, dvbpsi_tot_t* p_new_t ot); typedef void (* dvbpsi_tot_callback)(void* p_cb_data, dvbpsi_tot_t* p_new_t ot);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_AttachTOT * dvbpsi_tot_attach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn int dvbpsi_AttachTOT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, * \fn bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint1 6_t i_extension,
dvbpsi_tot_callback pf_callback, void* p_cb_dat a) dvbpsi_tot_callback pf_callback, void* p_cb_dat a)
* \brief Creation and initialization of a TDT/TOT decoder. * \brief Creation and initialization of a TDT/TOT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle pointing to Subtable demultiplexor to whic h the decoder is attached.
* \param i_table_id Table ID, usually 0x70 * \param i_table_id Table ID, usually 0x70
* \param i_extension Table ID extension, unused in the TDT/TOT * \param i_extension Table ID extension, unused in the TDT/TOT
* \param pf_callback function to call back on new TDT/TOT. * \param pf_callback function to call back on new TDT/TOT.
* \param p_cb_data private data given in argument to the callback. * \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok. * \return true on success, false on failure
*/ */
__attribute__((deprecated)) bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_e
int dvbpsi_AttachTOT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id, xtension,
uint16_t i_extension, dvbpsi_tot_callback pf_callback, void* p_cb_data);
dvbpsi_tot_callback pf_callback, void* p_cb_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_DetachTOT * dvbpsi_tot_detach
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn int dvbpsi_DetachTOT(dvbpsi_demux_t * p_demux, uint8_t i_table_id) * \fn int dvbpsi_tot_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16 _t i_extension)
* \brief Destroy a TDT/TOT decoder. * \brief Destroy a TDT/TOT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, usually 0x70 * \param i_table_id Table ID, usually 0x70
* \param i_extension Table ID extension, unused in the TDT/TOT * \param i_extension Table ID extension, unused in the TDT/TOT
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_tot_detach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
void dvbpsi_DetachTOT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension); uint16_t i_extension);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_InitTOT/dvbpsi_NewTOT * dvbpsi_tot_init/dvbpsi_tot_new
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_InitTOT(dvbpsi_tot_t* p_tot) * \fn void dvbpsi_tot_init(dvbpsi_tot_t* p_tot, uint8_t i_table_id, uint16
_t i_extension,
uint8_t i_version, bool b_current_next, uint64_
t i_utc_time);
* \brief Initialize a user-allocated dvbpsi_tot_t structure. * \brief Initialize a user-allocated dvbpsi_tot_t structure.
* \param p_tot pointer to the TDT/TOT structure * \param p_tot pointer to the TDT/TOT structure
* \param i_table_id Table ID, usually 0x70
* \param i_extension Table ID extension, unused in the TDT/TOT
* \param i_version SDT version
* \param b_current_next current next indicator
* \param i_utc_time the time in UTC * \param i_utc_time the time in UTC
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_tot_init(dvbpsi_tot_t* p_tot, uint8_t i_table_id, uint16_t i_ex
void dvbpsi_InitTOT(dvbpsi_tot_t* p_tot, uint64_t i_utc_time); tension,
uint8_t i_version, bool b_current_next, uint64_t i_utc
_time);
/*! /*!
* \def dvbpsi_NewTOT(p_tot) * \fn dvbpsi_tot_t *dvbpsi_tot_new(uint8_t i_table_id, uint16_t i_extensio
n,
uint8_t i_version, bool b_current_next, uint64_
t i_utc_time);
* \brief Allocate and initialize a new dvbpsi_tot_t structure. * \brief Allocate and initialize a new dvbpsi_tot_t structure.
* \param p_tot pointer to the TDT/TOT structure * \param i_table_id Table ID, usually 0x70
* \param i_extension Table ID extension, unused in the TDT/TOT
* \param i_version SDT version
* \param b_current_next current next indicator
* \param i_utc_time the time in UTC * \param i_utc_time the time in UTC
* \return nothing. * \return p_tot pointer to the TDT/TOT structure
*/ */
#define dvbpsi_NewTOT(p_tot, i_utc_time) \ dvbpsi_tot_t *dvbpsi_tot_new(uint8_t i_table_id, uint16_t i_extension, uint
do { \ 8_t i_version,
p_tot = (dvbpsi_tot_t*)malloc(sizeof(dvbpsi_tot_t)); \ bool b_current_next, uint64_t i_utc_time);
if(p_tot != NULL) \
dvbpsi_InitTOT(p_tot, i_utc_time); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_EmptyTOT/dvbpsi_DeleteTOT * dvbpsi_tot_empty/dvbpsi_tot_delete
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn void dvbpsi_EmptyTOT(dvbpsi_tot_t* p_tot) * \fn void dvbpsi_tot_empty(dvbpsi_tot_t* p_tot)
* \brief Clean a dvbpsi_tot_t structure. * \brief Clean a dvbpsi_tot_t structure.
* \param p_tot pointer to the TDT/TOT structure * \param p_tot pointer to the TDT/TOT structure
* \return nothing. * \return nothing.
*/ */
__attribute__((deprecated)) void dvbpsi_tot_empty(dvbpsi_tot_t* p_tot);
void dvbpsi_EmptyTOT(dvbpsi_tot_t* p_tot);
/*! /*!
* \def dvbpsi_DeleteTOT(p_tot) * \fn dvbpsi_tot_delete(dvbpsi_tot_t* p_tot)
* \brief Clean and free a dvbpsi_tot_t structure. * \brief Clean and free a dvbpsi_tot_t structure.
* \param p_tot pointer to the TDT/TOT structure * \param p_tot pointer to the TDT/TOT structure
* \return nothing. * \return nothing.
*/ */
#define dvbpsi_DeleteTOT(p_tot) \ void dvbpsi_tot_delete(dvbpsi_tot_t* p_tot);
do { \
dvbpsi_EmptyTOT(p_tot); \
free(p_tot); \
} while(0);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_TOTAddDescriptor * dvbpsi_tot_descriptor_add
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_descriptor_t* dvbpsi_TOTAddDescriptor(dvbpsi_tot_t* p_tot, * \fn dvbpsi_descriptor_t* dvbpsi_tot_descriptor_add(dvbpsi_tot_t* p_tot,
uint8_t i_tag, uint8_t i_tag,
uint8_t i_length, uint8_t i_length,
uint8_t* p_data) uint8_t* p_data)
* \brief Add a descriptor in the TOT. * \brief Add a descriptor in the TOT.
* \param p_tot pointer to the TOT structure * \param p_tot pointer to the TOT structure
* \param i_tag descriptor's tag * \param i_tag descriptor's tag
* \param i_length descriptor's length * \param i_length descriptor's length
* \param p_data descriptor's data * \param p_data descriptor's data
* \return a pointer to the added descriptor. * \return a pointer to the added descriptor.
*/ */
__attribute__((deprecated)) dvbpsi_descriptor_t* dvbpsi_tot_descriptor_add(dvbpsi_tot_t* p_tot,
dvbpsi_descriptor_t* dvbpsi_TOTAddDescriptor(dvbpsi_tot_t* p_tot, uint8_t i_tag, uint8_t i_len
uint8_t i_tag, uint8_t i_lengt gth,
h, uint8_t* p_data);
uint8_t* p_data);
/************************************************************************** *** /************************************************************************** ***
* dvbpsi_GenTOTSections * dvbpsi_tot_sections_generate
************************************************************************** ***/ ************************************************************************** ***/
/*! /*!
* \fn dvbpsi_psi_section_t* dvbpsi_GenTOTSections(dvbpsi_Ttot_t* p_tot) * \fn dvbpsi_psi_section_t* dvbpsi_tot_sections_generate(dvbpsi_t *p_dvbps i, dvbpsi_tot_t* p_tot)
* \brief TDT/TOT generator * \brief TDT/TOT generator
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_tot TDT/TOT structure * \param p_tot TDT/TOT structure
* \return a pointer to the list of generated PSI sections. * \return a pointer to the list of generated PSI sections.
* *
* Generate TDT/TOT sections based on the dvbpsi_tot_t structure. * Generate TDT/TOT sections based on the dvbpsi_tot_t structure.
*/ */
dvbpsi_psi_section_t* dvbpsi_tot_sections_generate(dvbpsi_t* p_dvbpsi, dvbp
si_tot_t* p_tot);
/**************************************************************************
***
* deprecated API's
**************************************************************************
***/
__attribute__((deprecated))
int dvbpsi_AttachTOT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
uint16_t i_extension,
dvbpsi_tot_callback pf_callback, void* p_cb_data);
__attribute__((deprecated))
void dvbpsi_DetachTOT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension);
__attribute__((deprecated))
void dvbpsi_NewTOT(dvbpsi_tot_t* p_tot, uint64_t i_utc_time);
__attribute__((deprecated)) void dvbpsi_DeleteTOT(dvbpsi_tot_t* p_tot);
__attribute__((deprecated))
dvbpsi_descriptor_t* dvbpsi_TOTAddDescriptor(dvbpsi_tot_t* p_tot,
uint8_t i_tag, uint8_t i_lengt
h,
uint8_t* p_data);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenTOTSections(dvbpsi_tot_t* p_tot); dvbpsi_psi_section_t* dvbpsi_GenTOTSections(dvbpsi_tot_t* p_tot);
#ifdef __cplusplus #ifdef __cplusplus
}; };
#endif #endif
#else #else
#error "Multiple inclusions of tot.h" #error "Multiple inclusions of tot.h"
#endif #endif
 End of changes. 35 change blocks. 
54 lines changed or deleted 94 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/