Commit 4f3cfef2 authored by Jean-Paul Saman's avatar Jean-Paul Saman

ATSC tables: do not include stdint.h twice.

The stdint.h header file was included twice.
parent 387b7cf5
This diff is collapsed.
......@@ -71,7 +71,7 @@ typedef struct dvbpsi_atsc_eit_event_s
typedef struct dvbpsi_atsc_eit_s
{
uint8_t i_version; /*!< version_number */
int b_current_next; /*!< current_next_indicator */
bool b_current_next; /*!< current_next_indicator */
uint16_t i_source_id; /*!< Source id used to match against channels */
uint8_t i_protocol; /*!< PSIP Protocol version */
......@@ -93,33 +93,33 @@ typedef void (* dvbpsi_atsc_eit_callback)(void* p_cb_data, dvbpsi_atsc_eit_t* p_
* dvbpsi_atsc_AttachEIT
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_AttachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
* \fn bool dvbpsi_atsc_AttachEIT(dvbpsi_t * p_dvbpsi, uint8_t i_table_id,
dvbpsi_atsc_eit_callback pf_callback, void* p_cb_data)
*
* \brief Creation and initialization of a EIT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xCB.
* \param i_extension Table ID extension, here TS ID.
* \param pf_callback function to call back on new EIT.
* \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok.
* \return true if everything went ok, false otherwise
*/
int dvbpsi_atsc_AttachEIT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_eit_callback pf_callback, void* p_cb_data);
/*****************************************************************************
* dvbpsi_DetachEIT
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id)
*
* \fn void dvbpsi_atsc_DetachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id)
* \brief Destroy a EIT decoder.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached.
* \param p_demux Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, 0xCB.
* \param i_extension Table ID extension, here TS ID.
* \return nothing.
*/
void dvbpsi_atsc_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
void dvbpsi_atsc_DetachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension);
/*****************************************************************************
......@@ -131,35 +131,27 @@ void dvbpsi_atsc_DetachEIT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
* \brief Initialize a user-allocated dvbpsi_atsc_eit_t structure.
* \param p_eit pointer to the EIT structure
* \param i_version EIT version
* \param b_current_next current next indicator
* \param i_protocol PSIP Protocol version.
* \param i_source_id Source id.
* \param b_current_next current next indicator
* \return nothing.
*/
void dvbpsi_atsc_InitEIT(dvbpsi_atsc_eit_t* p_eit,uint8_t i_version, int b_current_next,
uint8_t i_protocol, uint16_t i_source_id);
void dvbpsi_atsc_InitEIT(dvbpsi_atsc_eit_t* p_eit, uint8_t i_version, uint8_t i_protocol,
uint16_t i_source_id, bool b_current_next);
/*!
* \def dvbpsi_atsc_NewEIT(p_eit, i_network_id, i_version, b_current_next,
i_protocol i_source_id)
* \fn dvbpsi_atsc_eit_t *dvbpsi_atsc_NewEIT(uint8_t i_version, uint8_t i_protocol,
uint16_t i_source_id, bool b_current_next)
* \brief Allocate and initialize a new dvbpsi_eit_t structure. Use ObjectRefDec to delete it.
* \param p_eit pointer to the EIT structure
* \param i_network_id network id
* \param i_version EIT version
* \param b_current_next current next indicator
* \param i_protocol PSIP Protocol version.
* \param b_cable_eit Whether this is CEIT or a TEIT.
* \return nothing.
* \return p_eit pointer to the EIT structure or NULL on error
*/
#define dvbpsi_atsc_NewEIT(p_eit, i_version, b_current_next, i_protocol, \
i_source_id) \
do { \
p_eit = (dvbpsi_atsc_eit_t*)malloc(sizeof(dvbpsi_atsc_eit_t)); \
if(p_eit != NULL) \
dvbpsi_atsc_InitEIT(p_eit, i_version, b_current_next, i_protocol, \
i_source_id); \
} while(0);
dvbpsi_atsc_eit_t *dvbpsi_atsc_NewEIT(uint8_t i_version, uint8_t i_protocol,
uint16_t i_source_id, bool b_current_next);
/*****************************************************************************
* dvbpsi_atsc_EmptyEIT
......@@ -173,16 +165,12 @@ do { \
void dvbpsi_atsc_EmptyEIT(dvbpsi_atsc_eit_t *p_eit);
/*!
* \def dvbpsi_atsc_DeleteEIT(p_eit)
* \fn void dvbpsi_atsc_DeleteEIT(dvbpsi_atsc_eit_t *p_eit)
* \brief Clean and free a dvbpsi_eit_t structure.
* \param p_vct pointer to the EIT structure
* \param p_eit pointer to the EIT structure
* \return nothing.
*/
#define dvbpsi_atsc_DeleteEIT(p_eit) \
do { \
dvbpsi_atsc_EmptyEIT(p_eit); \
free(p_eit); \
} while(0);
void dvbpsi_atsc_DeleteEIT(dvbpsi_atsc_eit_t *p_eit);
#ifdef __cplusplus
};
......
This diff is collapsed.
......@@ -43,7 +43,7 @@ extern "C" {
typedef struct dvbpsi_atsc_ett_s
{
uint8_t i_version; /*!< version_number */
int b_current_next; /*!< current_next_indicator */
bool b_current_next; /*!< current_next_indicator */
uint8_t i_protocol; /*!< PSIP Protocol version */
uint16_t i_ett_table_id; /*!< ETT Table ID extension, normally 0x0000 */
uint32_t i_etm_id; /*!< ETM Identifier, made up of source id and event id (or 0 for channel ETT) */
......@@ -65,31 +65,33 @@ typedef void (* dvbpsi_atsc_ett_callback)(void* p_cb_data, dvbpsi_atsc_ett_t* p_
* dvbpsi_atsc_AttachETT
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_AttachETT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data)
* \fn bool dvbpsi_atsc_AttachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data)
*
* \brief Creation and initialization of a ETT decoder.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xCC.
* \param i_extension Table ID extension, normally 0x0000.
* \param pf_callback function to call back on new ETT.
* \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok.
* \return true if everything went ok, else it returns false.
*/
int dvbpsi_atsc_AttachETT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
bool dvbpsi_atsc_AttachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data);
/*****************************************************************************
* dvbpsi_atsc_DetachETT
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_DetachETT(dvbpsi_demux_t * p_demux, uint8_t i_table_id)
* \fn void dvbpsi_atsc_DetachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
*
* \brief Destroy a ETT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xCD.
* \param i_extension Table ID extension, normally 0x0000.
* \return nothing.
*/
void dvbpsi_atsc_DetachETT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
void dvbpsi_atsc_DetachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension);
/*****************************************************************************
......@@ -97,34 +99,31 @@ void dvbpsi_atsc_DetachETT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_InitETT(dvbpsi_atsc_ett_t* p_ett, uint8_t i_version,
int b_current_next, uint8_t i_protocol)
uint8_t i_protocol, bool b_current_next)
* \brief Initialize a user-allocated dvbpsi_atsc_ett_t structure.
* \param p_ett pointer to the ETT structure
* \param i_version version
* \param b_current_next current next indicator
* \param i_protocol PSIP Protocol version.
* \param i_ett_table_id Table ID (Normally 0x0000)
* \param i_etm_id ETM Identifier.
* \param b_current_next current next indicator
* \return nothing.
*/
void dvbpsi_atsc_InitETT(dvbpsi_atsc_ett_t *p_ett, uint8_t i_version, int b_current_next,
uint8_t i_protocol, uint16_t i_ett_table_id, uint32_t i_etm_id);
void dvbpsi_atsc_InitETT(dvbpsi_atsc_ett_t *p_ett, uint8_t i_version, uint8_t i_protocol,
uint16_t i_ett_table_id, uint32_t i_etm_id, bool b_current_next);
/*!
* \def dvbpsi_NewETT(p_ett, i_network_id, i_version, b_current_next)
\ * \fn dvbpsi_atsc_ett_t *dvbpsi_atsc_NewETT(uint8_t i_version, uint8_t i_protocol,
uint16_t i_ett_table_id, uint32_t i_etm_id, bool b_current_next)
* \brief Allocate and initialize a new dvbpsi_atsc_ett_t structure. Use ObjectRefDec to delete it.
* \param p_ett pointer to the ETT structure
* \param i_protocol PSIP Protocol version.
* \param i_ett_table_id Table ID (Normally 0x0000)
* \param i_etm_id ETM Identifier.
* \return nothing.
* \param b_current_next current next indicator
* \returns p_ett pointer to the ETT structure, NULL otherwise
*/
#define dvbpsi_atsc_NewETT(p_ett, i_version, b_current_next, i_protocol, i_ett_table_id, i_etm_id) \
do { \
p_ett = (dvbpsi_atsc_ett_t*)malloc(sizeof(dvbpsi_atsc_ett_t)); \
if(p_ett != NULL) \
dvbpsi_atsc_InitETT(p_ett, i_version, b_current_next, i_protocol, i_ett_table_id, i_etm_id); \
} while(0);
dvbpsi_atsc_ett_t *dvbpsi_atsc_NewETT(uint8_t i_version, uint8_t i_protocol,
uint16_t i_ett_table_id, uint32_t i_etm_id, bool b_current_next);
/*****************************************************************************
* dvbpsi_atsc_EmptyETT/dvbpsi_atsc_DeleteETT
......@@ -138,16 +137,12 @@ do { \
void dvbpsi_atsc_EmptyETT(dvbpsi_atsc_ett_t *p_ett);
/*!
* \def dvbpsi_atsc_DeleteETT(p_ett)
* \fn void dvbpsi_atsc_DeleteETT(dvbpsi_atsc_ett_t *p_ett);
* \brief Clean and free a dvbpsi_atsc_ett_t structure.
* \param p_ett pointer to the ETT structure
* \return nothing.
*/
#define dvbpsi_atsc_DeleteETT(p_ett) \
do { \
dvbpsi_atsc_EmptyETT(p_ett); \
free(p_ett); \
} while(0);
void dvbpsi_atsc_DeleteETT(dvbpsi_atsc_ett_t *p_ett);
#ifdef __cplusplus
};
......
This diff is collapsed.
/*
Copyright (C) 2006 Adam Charrett
Copyright (C) 2011 Michael Krufky
Copyright (C) 2011-2012 Michael Krufky
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
......@@ -69,7 +69,7 @@ typedef struct dvbpsi_atsc_mgt_table_s
typedef struct dvbpsi_atsc_mgt_s
{
uint8_t i_version; /*!< version_number */
int b_current_next; /*!< current_next_indicator */
bool b_current_next; /*!< current_next_indicator */
uint16_t i_table_id_ext; /*!< 0x0000 */
uint8_t i_protocol; /*!< PSIP Protocol version */
......@@ -96,66 +96,58 @@ typedef void (* dvbpsi_atsc_mgt_callback)(void* p_cb_data, dvbpsi_atsc_mgt_t* p_
dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data)
*
* \brief Creation and initialization of a MGT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xC7.
* \param i_extension Table ID extension, here 0x0000.
* \param pf_callback function to call back on new MGT.
* \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok.
* \return true if everything went ok, false otherwise
*/
int dvbpsi_atsc_AttachMGT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data);
bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data);
/*****************************************************************************
* dvbpsi_DetachMGT
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_DetachMGT(dvbpsi_demux_t * p_demux, uint8_t i_table_id)
* \fn void dvbpsi_atsc_DetachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
*
* \brief Destroy a MGT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xC7.
* \param i_extension Table ID extension, here 0x0000.
* \return nothing.
*/
void dvbpsi_atsc_DetachMGT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
uint16_t i_extension);
void dvbpsi_atsc_DetachMGT(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
/*****************************************************************************
* dvbpsi_atsc_InitMGT/dvbpsi_atsc_NewMGT
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_InitMGT(dvbpsi_atsc_mgt_t* p_mgt, uint8_t i_version,
int b_current_next, uint8_t i_protocol)
* \fn void dvbpsi_atsc_InitMGT(dvbpsi_atsc_mgt_t* p_mgt,uint8_t i_version, uint8_t i_protocol,
uint16_t i_table_id_extension, bool b_current_next);
* \brief Initialize a user-allocated dvbpsi_atsc_mgt_t structure.
* \param p_mgt pointer to the MGT structure
* \param i_version MGT version
* \param b_current_next current next indicator
* \param i_protocol PSIP Protocol version.
* \param i_table_id_extension 0x0000.
* \param b_current_next current next indicator
* \return nothing.
*/
void dvbpsi_atsc_InitMGT(dvbpsi_atsc_mgt_t* p_mgt,uint8_t i_version, int b_current_next,
uint8_t i_protocol, uint16_t i_table_id_extension);
void dvbpsi_atsc_InitMGT(dvbpsi_atsc_mgt_t* p_mgt,uint8_t i_version, uint8_t i_protocol,
uint16_t i_table_id_extension, bool b_current_next);
/*!
* \def dvbpsi_atsc_NewMGT(p_mgt, i_network_id, i_version, b_current_next)
* \brief Allocate and initialize a new dvbpsi_mgt_t structure.
* \param p_mgt pointer to the MGT structure
* \param i_network_id network id
* \param i_version MGT version
* \param b_current_next current next indicator
* \param i_protocol PSIP Protocol version.
* \return nothing.
* \param b_current_next current next indicator
* \return p_mgt pointer to the MGT structure, or NULL on failure
*/
#define dvbpsi_atsc_NewMGT(p_mgt, i_version, b_current_next, i_protocol, \
i_table_id_extension) \
do { \
p_mgt = (dvbpsi_atsc_mgt_t*)malloc(sizeof(dvbpsi_atsc_mgt_t)); \
if(p_mgt != NULL) \
dvbpsi_atsc_InitMGT(p_mgt, i_version, b_current_next, i_protocol, \
i_table_id_extension); \
} while(0);
dvbpsi_atsc_mgt_t *dvbpsi_atsc_NewMGT(uint8_t i_version, uint8_t i_protocol,
uint16_t i_table_id_extension, bool b_current_next);
/*****************************************************************************
* dvbpsi_atsc_EmptyMGT/dvbpsi_atsc_DeleteMGT
......@@ -169,16 +161,12 @@ do { \
void dvbpsi_atsc_EmptyMGT(dvbpsi_atsc_mgt_t *p_mgt);
/*!
* \def dvbpsi_atsc_DeleteMGT(p_mgt)
* \fn void dvbpsi_atsc_DeleteMGT(dvbpsi_atsc_mgt_t *p_mgt);
* \brief Clean and free a dvbpsi_mgt_t structure.
* \param p_mgt pointer to the MGT structure
* \return nothing.
*/
#define dvbpsi_atsc_DeleteMGT(p_mgt) \
do { \
dvbpsi_atsc_EmptyMGT(p_mgt); \
free(p_mgt); \
} while(0);
void dvbpsi_atsc_DeleteMGT(dvbpsi_atsc_mgt_t *p_mgt);
#ifdef __cplusplus
};
......
This diff is collapsed.
/*
Copyright (C) 2006 Adam Charrett
Copyright (C) 2006-2012 Adam Charrett
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
......@@ -42,7 +42,7 @@ extern "C" {
*/
typedef struct dvbpsi_atsc_stt_s
{
uint8_t i_protocol; /*!< PSIP Protocol version */
uint8_t i_version; /*!< PSIP Protocol version */
uint32_t i_system_time; /*!< GPS seconds since 1 January 1980 00:00:00 UTC. */
uint8_t i_gps_utc_offset; /*!< Seconds offset between GPS and UTC time. */
......@@ -56,7 +56,7 @@ typedef struct dvbpsi_atsc_stt_s
*****************************************************************************/
/*!
* \typedef void (* dvbpsi_atsc_stt_callback)(void* p_cb_data,
dvbpsi_atsc_stt_t* p_new_stt)
dvbpsi_atsc_stt_t* p_new_stt)
* \brief Callback type definition.
*/
typedef void (* dvbpsi_atsc_stt_callback)(void* p_cb_data, dvbpsi_atsc_stt_t* p_new_stt);
......@@ -65,18 +65,18 @@ typedef void (* dvbpsi_atsc_stt_callback)(void* p_cb_data, dvbpsi_atsc_stt_t* p_
* dvbpsi_atsc_AttachSTT
*****************************************************************************/
/*!
* \fn void dvbpsi_atsc_AttachSTT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
dvbpsi_atsc_stt_callback pf_callback, void* p_cb_data)
* \fn bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data);
*
* \brief Creation and initialization of a STT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xCD.
* \param pf_callback function to call back on new STT.
* \param pf_stt_callback function to call back on new STT.
* \param p_cb_data private data given in argument to the callback.
* \return 0 if everything went ok.
* \return true if everything went ok else false
*/
int dvbpsi_atsc_AttachSTT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
dvbpsi_atsc_stt_callback pf_callback, void* p_cb_data);
bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data);
/*****************************************************************************
* dvbpsi_atsc_DetachSTT
......@@ -85,13 +85,13 @@ int dvbpsi_atsc_AttachSTT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
* \fn void dvbpsi_atsc_DetachSTT(dvbpsi_demux_t * p_demux, uint8_t i_table_id)
*
* \brief Destroy a STT decoder.
* \param p_demux Subtable demultiplexor to which the decoder is attached.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, 0xCD.
* \param i_extension Table extension, ignored as this should always be 0.
* (Required to match prototype for demux)
* \return nothing.
*/
void dvbpsi_atsc_DetachSTT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, uint16_t i_externsion);
void dvbpsi_atsc_DetachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_externsion);
/*****************************************************************************
* dvbpsi_atsc_InitSTT/dvbpsi_atsc_NewSTT
......@@ -101,24 +101,21 @@ void dvbpsi_atsc_DetachSTT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, uint16_
int b_current_next, uint8_t i_protocol)
* \brief Initialize a user-allocated dvbpsi_atsc_stt_t structure.
* \param p_stt pointer to the STT structure
* \param i_protocol PSIP Protocol version.
* \param i_version PSIP Protocol version.
* \return nothing.
*/
void dvbpsi_atsc_InitSTT(dvbpsi_atsc_stt_t *p_stt,uint8_t i_protocol);
void dvbpsi_atsc_InitSTT(dvbpsi_atsc_stt_t *p_stt, uint8_t i_protocol);
/*!
* \def dvbpsi_NewSTT(p_stt, i_network_id, i_version, b_current_next)
* \fn dvbpsi_atsc_stt_t *dvbpsi_NewSTTT(uint8_t i_protocol, uint8_t i_version,
* bool b_current_next)
* \brief Allocate and initialize a new dvbpsi_atsc_stt_t structure. Use ObjectRefDec to delete it.
* \param p_stt pointer to the STT structure
* \param i_protocol PSIP Protocol version.
* \return nothing.
* \param i_version PSIP Protocol version.
* \param b_current_next current next indicator
* \return p_stt pointer to the STT structure
*/
#define dvbpsi_atsc_NewSTT(p_stt, i_protocol) \
do { \
p_stt = (dvbpsi_atsc_stt_t*)malloc(sizeof(dvbpsi_atsc_stt_t)); \
if(p_stt != NULL) \
dvbpsi_atsc_InitSTT(p_stt, i_protocol); \
} while(0);
dvbpsi_atsc_stt_t *dvbpsi_atsc_NewSTT(uint8_t i_version, bool b_current_next);
/*****************************************************************************
* dvbpsi_atsc_EmptySTT
......@@ -132,16 +129,12 @@ do { \
void dvbpsi_atsc_EmptySTT(dvbpsi_atsc_stt_t *p_stt);
/*!
* \def dvbpsi_atsc_DeleteSTT(p_vct)
* \brief Clean and free a dvbpsi_stt_t structure.
* \param p_vct pointer to the STT structure
* \fn dvbpsi_atsc_DeleteSTT(dvbpsi_atsc_stt_t *p_stt)
* \brief Clean and free a dvbpsi_atsc_stt_t structure.
* \param p_stt pointer to the STT structure
* \return nothing.
*/
#define dvbpsi_atsc_DeleteSTT(p_stt) \
do { \
dvbpsi_atsc_EmptySTT(p_stt); \
free(p_stt); \
} while(0);
void dvbpsi_atsc_DeleteSTT(dvbpsi_atsc_stt_t *p_stt);
#ifdef __cplusplus
};
......
......@@ -98,7 +98,7 @@ static void dvbpsi_atsc_DecodeVCTSections(dvbpsi_atsc_vct_t* p_vct,
* Initialize a VCT subtable decoder.
*****************************************************************************/
bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_vct_callback pf_callback, void* p_cb_data)
dvbpsi_atsc_vct_callback pf_vct_callback, void* p_cb_data)
{
assert(p_dvbpsi);
assert(p_dvbpsi->p_private);
......@@ -138,7 +138,7 @@ bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex
p_demux->p_first_subdec = p_subdec;
/* VCT decoder information */
p_vct_decoder->pf_vct_callback = pf_callback;
p_vct_decoder->pf_vct_callback = pf_vct_callback;
p_vct_decoder->p_cb_data = p_cb_data;
/* VCT decoder initial state */
p_vct_decoder->b_current_valid = false;
......
......@@ -113,12 +113,12 @@ typedef void (* dvbpsi_atsc_vct_callback)(void* p_cb_data, dvbpsi_atsc_vct_t* p_
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, 0xC8 or 0xC9.
* \param i_extension Table ID extension, here TS ID.
* \param pf_callback function to call back on new VCT.
* \param pf_vct_callback function to call back on new VCT.
* \param p_cb_data private data given in argument to the callback.
* \return true if everything went ok, else false.
*/
bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_vct_callback pf_callback,
uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback,
void* p_cb_data);
/*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment