Commit 67a51160 authored by Roberto Corno's avatar Roberto Corno Committed by Jean-Paul Saman

BAT decoding method signature fix

Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 784aa0bc
...@@ -195,6 +195,29 @@ void dvbpsi_bat_delete(dvbpsi_bat_t *p_bat) ...@@ -195,6 +195,29 @@ void dvbpsi_bat_delete(dvbpsi_bat_t *p_bat)
free(p_bat); free(p_bat);
} }
/*****************************************************************************
* dvbpsi_bat_bouquet_descriptor_add
*****************************************************************************
* Add a descriptor in the BAT.
*****************************************************************************/
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_descriptor_t* p_descriptor
= dvbpsi_NewDescriptor(i_tag, i_length, p_data);
if (p_descriptor == NULL)
return NULL;
p_bat->p_first_descriptor = dvbpsi_AddDescriptor(p_bat->p_first_descriptor,
p_descriptor);
assert(p_bat->p_first_descriptor);
if (p_bat->p_first_descriptor == NULL)
return NULL;
return p_descriptor;
}
/***************************************************************************** /*****************************************************************************
* dvbpsi_bat_ts_add * dvbpsi_bat_ts_add
***************************************************************************** *****************************************************************************
...@@ -226,30 +249,6 @@ dvbpsi_bat_ts_t *dvbpsi_bat_ts_add(dvbpsi_bat_t* p_bat, ...@@ -226,30 +249,6 @@ dvbpsi_bat_ts_t *dvbpsi_bat_ts_add(dvbpsi_bat_t* p_bat,
return p_ts; return p_ts;
} }
/*****************************************************************************
* dvbpsi_bat_bouquet_descriptor_add
*****************************************************************************
* Add a descriptor in the BAT Bouquet descriptors (the first loop description),
* which is in the first loop of BAT.
*****************************************************************************/
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_descriptor_t * p_descriptor
= dvbpsi_NewDescriptor(i_tag, i_length, p_data);
if (p_descriptor == NULL)
return NULL;
p_bat->p_first_descriptor = dvbpsi_AddDescriptor(p_bat->p_first_descriptor,
p_descriptor);
assert(p_bat->p_first_descriptor);
if (p_bat->p_first_descriptor == NULL)
return NULL;
return p_descriptor;
}
/***************************************************************************** /*****************************************************************************
* dvbpsi_bat_ts_descriptor_add * dvbpsi_bat_ts_descriptor_add
......
...@@ -192,6 +192,59 @@ void dvbpsi_bat_empty(dvbpsi_bat_t *p_bat); ...@@ -192,6 +192,59 @@ void dvbpsi_bat_empty(dvbpsi_bat_t *p_bat);
*/ */
void dvbpsi_bat_delete(dvbpsi_bat_t *p_bat); void dvbpsi_bat_delete(dvbpsi_bat_t *p_bat);
/*****************************************************************************
* 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_length,
uint8_t* p_data)
* \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_ts,
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_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_descriptor_t *dvbpsi_bat_ts_descriptor_add(dvbpsi_bat_ts_t *p_ts,
uint8_t i_tag, uint8_t i_length,
uint8_t *p_data);
/***************************************************************************** /*****************************************************************************
* dvbpsi_bat_sections_generate * dvbpsi_bat_sections_generate
*****************************************************************************/ *****************************************************************************/
...@@ -223,6 +276,19 @@ __attribute__((deprecated)) ...@@ -223,6 +276,19 @@ __attribute__((deprecated))
void dvbpsi_EmptyBAT(dvbpsi_bat_t *p_bat); void dvbpsi_EmptyBAT(dvbpsi_bat_t *p_bat);
__attribute__((deprecated)) __attribute__((deprecated))
dvbpsi_psi_section_t *dvbpsi_GenBATSections(dvbpsi_bat_t *p_bat); 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_length,
uint8_t *p_data);
__attribute__((deprecated))
dvbpsi_descriptor_t *dvbpsi_BATTSAddDescriptor(
dvbpsi_bat_ts_t *p_ts,
uint8_t i_tag, uint8_t i_length,
uint8_t *p_data);
#ifdef __cplusplus #ifdef __cplusplus
}; };
......
...@@ -62,32 +62,7 @@ void dvbpsi_bat_sections_gather(dvbpsi_t* p_dvbpsi, dvbpsi_decoder_t* p_decoder, ...@@ -62,32 +62,7 @@ void dvbpsi_bat_sections_gather(dvbpsi_t* p_dvbpsi, dvbpsi_decoder_t* p_decoder,
void dvbpsi_bat_sections_decode(dvbpsi_bat_t* p_bat, void dvbpsi_bat_sections_decode(dvbpsi_bat_t* p_bat,
dvbpsi_psi_section_t* p_section); dvbpsi_psi_section_t* p_section);
/*****************************************************************************
* dvbpsi_bat_ts_add
*****************************************************************************
* Add a TS description at the end of the BAT.
*****************************************************************************/
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_bouquet_descriptor_add
*****************************************************************************
* Add a descriptor in the BAT Bouquet descriptors (the first loop description),
* which is in the first loop of BAT.
*****************************************************************************/
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_descriptor_add
*****************************************************************************
* Add a descriptor in the BAT TS descriptors, which is in the second loop of BAT.
*****************************************************************************/
dvbpsi_descriptor_t *dvbpsi_bat_ts_descriptor_add(dvbpsi_bat_ts_t *p_ts,
uint8_t i_tag, uint8_t i_length,
uint8_t *p_data);
/***************************************************************************** /*****************************************************************************
* Deprecated API's * Deprecated API's
...@@ -98,19 +73,6 @@ void dvbpsi_GatherBATSections(dvbpsi_t* p_dvbpsi, dvbpsi_decoder_t* p_decoder, ...@@ -98,19 +73,6 @@ void dvbpsi_GatherBATSections(dvbpsi_t* p_dvbpsi, dvbpsi_decoder_t* p_decoder,
__attribute__((deprecated)) __attribute__((deprecated))
void dvbpsi_DecodeBATSections(dvbpsi_bat_t* p_bat, void dvbpsi_DecodeBATSections(dvbpsi_bat_t* p_bat,
dvbpsi_psi_section_t* p_section); dvbpsi_psi_section_t* p_section);
__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_length,
uint8_t *p_data);
__attribute__((deprecated))
dvbpsi_descriptor_t *dvbpsi_BATTSAddDescriptor(
dvbpsi_bat_ts_t *p_ts,
uint8_t i_tag, uint8_t i_length,
uint8_t *p_data);
#else #else
#error "Multiple inclusions of bat_private.h" #error "Multiple inclusions of bat_private.h"
#endif #endif
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