[libdvbpsi-devel] dvbinfo : Dump functionality for the MPEG-4 audio descriptor

Daniel Kamil Kozar git at videolan.org
Fri Mar 20 14:23:41 CET 2015


libdvbpsi | branch: master | Daniel Kamil Kozar <dkk089 at gmail.com> | Thu Mar 19 21:11:59 2015 +0100| [237991555c4df72de3987c74a1003f2e85507dcf] | committer: Jean-Paul Saman

dvbinfo : Dump functionality for the MPEG-4 audio descriptor

Signed-off-by: Jean-Paul Saman <jpsaman at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=237991555c4df72de3987c74a1003f2e85507dcf
---

 examples/dvbinfo/libdvbpsi.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/examples/dvbinfo/libdvbpsi.c b/examples/dvbinfo/libdvbpsi.c
index b4aa78a..2615722 100644
--- a/examples/dvbinfo/libdvbpsi.c
+++ b/examples/dvbinfo/libdvbpsi.c
@@ -302,6 +302,7 @@ static void handle_atsc_MGT(void *p_data, dvbpsi_atsc_mgt_t *p_mgt);
 static void handle_atsc_EIT(void *p_data, dvbpsi_atsc_eit_t *p_eit);
 static void handle_atsc_ETT(void* p_data, dvbpsi_atsc_ett_t *p_ett);
 static void handle_atsc_STT(void* p_data, dvbpsi_atsc_stt_t *p_stt);
+static const char *AACProfileToString(dvbpsi_aac_profile_and_level_t profile);
 
 /*****************************************************************************
  * mdate: current time in milliseconds
@@ -1037,6 +1038,14 @@ static void DumpMPEG4VideoDescriptor(const void *p_descriptor)
         mpeg4_descriptor->i_mpeg4_visual_profile_and_level);
 }
 
+static void DumpMPEG4AudioDescriptor(const void *p_descriptor)
+{
+    const dvbpsi_mpeg4_audio_dr_t *mpeg4_descriptor = p_descriptor;
+    printf("MPEG-4 Audio Profile and Level : %s (0x%02x) \n",
+        AACProfileToString(mpeg4_descriptor->i_mpeg4_audio_profile_and_level),
+        mpeg4_descriptor->i_mpeg4_audio_profile_and_level);
+}
+
 /*****************************************************************************
  * DumpSystemClockDescriptor
  *****************************************************************************/
@@ -1642,6 +1651,10 @@ static void DumpDescriptor(dvbpsi_descriptor_t *p_descriptor)
             p_decoded = dvbpsi_DecodeMPEG4VideoDr(p_descriptor);
             dump_dr_fn = DumpMPEG4VideoDescriptor;
             break;
+        case 0x1c:
+            p_decoded = dvbpsi_DecodeMPEG4AudioDr(p_descriptor);
+            dump_dr_fn = DumpMPEG4AudioDescriptor;
+            break;
         case 0x4c:
             p_decoded = dvbpsi_DecodeTimeShiftedServiceDr(p_descriptor);
             dump_dr_fn = DumpTimeShiftedServiceDescriptor;



More information about the libdvbpsi-devel mailing list