<div dir="ltr"><div><div>Merged in git://<a href="http://git.m2x.eu/videolan/libdvbpsi.git">git.m2x.eu/videolan/libdvbpsi.git</a> thanks for contributing<br><br></div>Kind regards<br><br></div>Jean-Paul Saman</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 10, 2015 at 12:53 AM, Daniel Kamil Kozar <span dir="ltr"><<a href="mailto:dkk089@gmail.com" target="_blank">dkk089@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 examples/dvbinfo/libdvbpsi.c | 68 ++++++++++++++++++++++++++++++++++++++++++++<br>
 1 file changed, 68 insertions(+)<br>
<br>
diff --git a/examples/dvbinfo/libdvbpsi.c b/examples/dvbinfo/libdvbpsi.c<br>
index ce4613c..ad38eed 100644<br>
--- a/examples/dvbinfo/libdvbpsi.c<br>
+++ b/examples/dvbinfo/libdvbpsi.c<br>
@@ -772,6 +772,18 @@ static void handle_PAT(void* p_data, dvbpsi_pat_t* p_pat)<br>
     dvbpsi_pat_delete(p_pat);<br>
 }<br>
<br>
+static void dump_hex_data(const char *prefix, const uint8_t *data,<br>
+    unsigned int length)<br>
+{<br>
+    unsigned int i;<br>
+    printf("%s : [ ", prefix);<br>
+    for(i = 0 ; i < length ; ++i)<br>
+    {<br>
+        printf("0x%02" PRIx8 " ", data[i]);<br>
+    }<br>
+    printf("]\n");<br>
+}<br>
+<br>
 /*****************************************************************************<br>
  * GetTypeName of PMT stream_type<br>
  *****************************************************************************/<br>
@@ -1046,6 +1058,58 @@ static void DumpMPEG4AudioDescriptor(const void *p_descriptor)<br>
         mpeg4_descriptor->i_mpeg4_audio_profile_and_level);<br>
 }<br>
<br>
+static void DumpContentLabellingDescriptor(const void *p_descriptor)<br>
+{<br>
+    const dvbpsi_content_labelling_dr_t *p_content_lbl_dr = p_descriptor;<br>
+    printf("Metadata application format : 0x%04" PRIx16 "\n",<br>
+        p_content_lbl_dr->i_metadata_application_format);<br>
+    if(p_content_lbl_dr->i_metadata_application_format == 0xFFFF)<br>
+    {<br>
+        printf("\t\t Metadata application format identifier : 0x%08" PRIx32 "\n",<br>
+            p_content_lbl_dr->i_metadata_application_format_identifier);<br>
+    }<br>
+<br>
+    printf("\t\t Content reference ID record flag : %d\n",<br>
+        p_content_lbl_dr->b_content_reference_id_record_flag);<br>
+    printf("\t\t Content time base indicator : 0x%02" PRIx8 "\n",<br>
+        p_content_lbl_dr->i_content_time_base_indicator);<br>
+<br>
+    if(p_content_lbl_dr->b_content_reference_id_record_flag)<br>
+    {<br>
+        dump_hex_data("\t\t Content reference ID",<br>
+            p_content_lbl_dr->p_content_reference_id,<br>
+            p_content_lbl_dr->i_content_reference_id_record_length);<br>
+    }<br>
+<br>
+    if(p_content_lbl_dr->i_content_time_base_indicator == 1 ||<br>
+        p_content_lbl_dr->i_content_time_base_indicator == 2)<br>
+    {<br>
+        printf("\t\t Content time base value : 0x%09" PRIx64 "\n",<br>
+            p_content_lbl_dr->i_content_time_base_value);<br>
+        printf("\t\t Metadata time base value : 0x%09" PRIx64 "\n",<br>
+            p_content_lbl_dr->i_metadata_time_base_value);<br>
+    }<br>
+<br>
+    if(p_content_lbl_dr->i_content_time_base_indicator == 2)<br>
+    {<br>
+        printf("\t\t contentId : 0x%02" PRIx8 "\n", p_content_lbl_dr->i_contentId);<br>
+    }<br>
+<br>
+    if(p_content_lbl_dr->i_content_time_base_indicator >= 3 &&<br>
+        p_content_lbl_dr->i_content_time_base_indicator <= 7)<br>
+    {<br>
+        dump_hex_data("\t\t Time base association data",<br>
+            p_content_lbl_dr->p_time_base_association_data,<br>
+            p_content_lbl_dr->i_time_base_association_data_length);<br>
+    }<br>
+<br>
+    if(p_content_lbl_dr->i_private_data_len)<br>
+    {<br>
+        dump_hex_data("\t\t Private data", p_content_lbl_dr->p_private_data,<br>
+            p_content_lbl_dr->i_private_data_len);<br>
+    }<br>
+}<br>
+<br>
 /*****************************************************************************<br>
  * DumpSystemClockDescriptor<br>
  *****************************************************************************/<br>
@@ -1655,6 +1719,10 @@ static void DumpDescriptor(dvbpsi_descriptor_t *p_descriptor)<br>
             p_decoded = dvbpsi_DecodeMPEG4AudioDr(p_descriptor);<br>
             dump_dr_fn = DumpMPEG4AudioDescriptor;<br>
             break;<br>
+        case 0x24:<br>
+            p_decoded = dvbpsi_DecodeContentLabellingDr(p_descriptor);<br>
+            dump_dr_fn = DumpContentLabellingDescriptor;<br>
+            break;<br>
         case 0x4c:<br>
             p_decoded = dvbpsi_DecodeTimeShiftedServiceDr(p_descriptor);<br>
             dump_dr_fn = DumpTimeShiftedServiceDescriptor;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.4.2<br>
<br>
_______________________________________________<br>
libdvbpsi-devel mailing list<br>
<a href="mailto:libdvbpsi-devel@videolan.org">libdvbpsi-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/libdvbpsi-devel" target="_blank">https://mailman.videolan.org/listinfo/libdvbpsi-devel</a><br>
</font></span></blockquote></div><br></div>