[libdvbpsi-devel] [PATCH 2/2] variable_rate_audio_indicator inserted in audio stream descriptor (0x03)
Roberto Corno
corno.roberto at gmail.com
Mon May 21 11:13:54 CEST 2012
---
src/descriptors/dr_03.c | 4 +++-
src/descriptors/dr_03.h | 7 ++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/descriptors/dr_03.c b/src/descriptors/dr_03.c
index 4633463..ecd4931 100644
--- a/src/descriptors/dr_03.c
+++ b/src/descriptors/dr_03.c
@@ -70,7 +70,7 @@ dvbpsi_astream_dr_t * dvbpsi_DecodeAStreamDr(dvbpsi_descriptor_t * p_descriptor)
p_decoded->b_free_format = (p_descriptor->p_data[0] & 0x80) ? 1 : 0;
p_decoded->i_id = (p_descriptor->p_data[0] & 0x40) >> 6;
p_decoded->i_layer = (p_descriptor->p_data[0] & 0x30) >> 4;
-
+ p_decoded->b_variable_rate_audio_indicator = (p_descriptor->p_data[0] & 0x08) >> 3;
p_descriptor->p_decoded = (void*)p_decoded;
return p_decoded;
@@ -94,6 +94,8 @@ dvbpsi_descriptor_t * dvbpsi_GenAStreamDr(dvbpsi_astream_dr_t * p_decoded,
*p_descriptor->p_data |= 0x80;
*p_descriptor->p_data |= (p_decoded->i_id & 0x01) << 6;
*p_descriptor->p_data |= (p_decoded->i_layer & 0x03) << 4;
+ if(p_decoded->b_variable_rate_audio_indicator)
+ *p_descriptor->p_data |= 0x08;
if(b_duplicate)
{
diff --git a/src/descriptors/dr_03.h b/src/descriptors/dr_03.h
index 96c459b..1dba1e3 100644
--- a/src/descriptors/dr_03.h
+++ b/src/descriptors/dr_03.h
@@ -56,9 +56,10 @@ extern "C" {
*/
typedef struct dvbpsi_astream_dr_s
{
- bool b_free_format; /*!< free_format_flag */
- uint8_t i_id; /*!< ID */
- uint8_t i_layer; /*!< layer */
+ bool b_free_format; /*!< free_format_flag */
+ uint8_t i_id; /*!< ID */
+ uint8_t i_layer; /*!< layer */
+ bool b_variable_rate_audio_indicator; /*!< variable_rate_audio_indicator */
} dvbpsi_astream_dr_t;
--
1.7.5.4
More information about the libdvbpsi-devel
mailing list