[dvblast-devel] [PATCH 17/17] Show descriptor name when printing in text format.

Georgi Chorbadzhiyski gf at unixsol.org
Fri Sep 9 23:28:39 CEST 2011


Only descriptor tag was shown when descriptors are printed in
text format. This patch adds the descriptor name after the tag
in order to make output more user friendly and similar to other
descriptors.
---
 dvb/si.h   |    8 ++++----
 mpeg/psi.h |   24 ++++++++++++------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/dvb/si.h b/dvb/si.h
index 24b34c7..e87559b 100644
--- a/dvb/si.h
+++ b/dvb/si.h
@@ -819,7 +819,7 @@ static inline void desc48_print(const uint8_t *p_desc,
         break;
     default:
         pf_print(print_opaque,
-                 "    - desc 48 type=0x%hhx provider=\"%s\" service=\"%s\"",
+                 "    - desc 48 service type=0x%hhx provider=\"%s\" service=\"%s\"",
                  desc48_get_type(p_desc), psz_provider, psz_service);
     }
     free(psz_provider);
@@ -909,7 +909,7 @@ static inline void desc52_print(const uint8_t *p_desc, f_print pf_print,
                  desc52_get_component_tag(p_desc));
         break;
     default:
-        pf_print(opaque, "    - desc 52 component_tag=%u",
+        pf_print(opaque, "    - desc 52 stream_identifier component_tag=%u",
                  desc52_get_component_tag(p_desc));
     }
 }
@@ -1017,7 +1017,7 @@ static inline void desc59_print(uint8_t *p_desc, f_print pf_print,
             break;
         default:
             pf_print(opaque,
-            "    - desc 59 dvbs language=%3.3s type=0x%hhx composition=%hu ancillary=%hu",
+            "    - desc 59 subtitling language=%3.3s type=0x%hhx composition=%hu ancillary=%hu",
             (const char *)desc59n_get_code(p_desc_n),
             desc59n_get_subtitlingtype(p_desc_n),
             desc59n_get_compositionpage(p_desc_n),
@@ -1211,7 +1211,7 @@ static inline void desc5f_print(const uint8_t *p_desc, f_print pf_print,
                  desc5f_get_specifier(p_desc));
         break;
     default:
-        pf_print(opaque, "    - desc 5f private data specifier=%u",
+        pf_print(opaque, "    - desc 5f private_data specifier=%u",
                  desc5f_get_specifier(p_desc));
     }
 }
diff --git a/mpeg/psi.h b/mpeg/psi.h
index 83f84db..ea3e974 100644
--- a/mpeg/psi.h
+++ b/mpeg/psi.h
@@ -210,14 +210,14 @@ static inline void desc02_print(const uint8_t *p_desc, f_print pf_print,
     default:
         if (desc02_is_mpeg1_only_flag(p_desc)) {
             pf_print(opaque,
-                "    - desc 02 multiple_frame_rate=%u frame_rate_code=%u frame_rate=%s"
+                "    - desc 02 video_stream multiple_frame_rate=%u frame_rate_code=%u frame_rate=%s"
                 " mpeg1_only=%u constraint_parameter=%u still_picture=%u",
                      multiple_frame_rate, frame_rate_code, desc02_get_frame_rate_txt(frame_rate_code),
                      mpeg1_only, constraint_parameter, still_picture
             );
         } else {
             pf_print(opaque,
-                "    - desc 02 multiple_frame_rate=%u frame_rate_code=%u frame_rate=%s"
+                "    - desc 02 video_stream multiple_frame_rate=%u frame_rate_code=%u frame_rate=%s"
                 " mpeg1_only=%u constraint_parameter=%u still_picture=%u"
                 " profile=%u profile_txt=%s level=%u level_txt=%s"
                 " chroma_format=%u chroma_format_txt=%s"
@@ -274,7 +274,7 @@ static inline void desc03_print(const uint8_t *p_desc, f_print pf_print,
         break;
     default:
         pf_print(opaque,
-            "    - desc 03 free_format_tag=%u ID=%u layer=%u"
+            "    - desc 03 audio_stream free_format_tag=%u ID=%u layer=%u"
             " ID_txt=%s layer_txt=%s vbr_audio_flag=%u",
                  free_format_flag, ID, layer,
                  desc03_get_ID_txt(ID), desc03_get_layer_txt(layer),
@@ -321,7 +321,7 @@ static inline void desc05_print(const uint8_t *p_desc, f_print pf_print,
                  desc05_get_identifier(p_desc));
         break;
     default:
-        pf_print(opaque, "    - desc 05 identifier=%4.4s",
+        pf_print(opaque, "    - desc 05 registration identifier=%4.4s",
                  desc05_get_identifier(p_desc));
     }
 }
@@ -370,7 +370,7 @@ static inline void desc06_print(const uint8_t *p_desc, f_print pf_print,
                  desc06_get_alignment_txt(desc06_get_alignment(p_desc)));
         break;
     default:
-        pf_print(opaque, "    - desc 06 alignment=%s",
+        pf_print(opaque, "    - desc 06 data_stream_alignment alignment=%s",
                  desc06_get_alignment_txt(desc06_get_alignment(p_desc)));
     }
 }
@@ -404,7 +404,7 @@ static inline void desc09_print(const uint8_t *p_desc, f_print pf_print,
                  desc09_get_sysid(p_desc), desc09_get_pid(p_desc));
         break;
     default:
-        pf_print(opaque, "    - desc 09 sysid=0x%hx pid=%hu",
+        pf_print(opaque, "    - desc 09 ca sysid=0x%hx pid=%hu",
                  desc09_get_sysid(p_desc), desc09_get_pid(p_desc));
     }
 }
@@ -471,7 +471,7 @@ static inline void desc0a_print(uint8_t *p_desc, f_print pf_print,
                      desc0an_get_audiotype(p_desc_n));
             break;
         default:
-            pf_print(opaque, "    - desc 0a language=%3.3s audiotype=0x%hhx",
+            pf_print(opaque, "    - desc 0a audio_language language=%3.3s audiotype=0x%hhx",
                      (const char *)desc0an_get_code(p_desc_n),
                      desc0an_get_audiotype(p_desc_n));
         }
@@ -509,7 +509,7 @@ static inline void desc0b_print(const uint8_t *p_desc, f_print pf_print,
             clock_accuracy_exponent);
         break;
     default:
-        pf_print(opaque, "    - desc 0b external_clock_reference_indicator=%u clock_accuracy_integer=%u clock_accuracy_exponent=%u",
+        pf_print(opaque, "    - desc 0b system_clock external_clock_reference_indicator=%u clock_accuracy_integer=%u clock_accuracy_exponent=%u",
             external_clock_reference_indicator,
             clock_accuracy_integer,
             clock_accuracy_exponent);
@@ -575,7 +575,7 @@ static inline void desc0c_print(const uint8_t *p_desc, f_print pf_print,
                  desc0c_get_LTW_offset_upper_bound(p_desc));
         break;
     default:
-        pf_print(opaque, "    - desc 0c bound_valid=%u LTW_offset_lower_bound=%u LTW_offset_upper_bound=%u",
+        pf_print(opaque, "    - desc 0c multiplex_buffer_utilization bound_valid=%u LTW_offset_lower_bound=%u LTW_offset_upper_bound=%u",
                  desc0c_get_bound_valid(p_desc),
                  desc0c_get_LTW_offset_lower_bound(p_desc),
                  desc0c_get_LTW_offset_upper_bound(p_desc));
@@ -619,7 +619,7 @@ static inline void desc0e_print(const uint8_t *p_desc, f_print pf_print,
                  desc0e_get_max_bitrate(p_desc), desc0e_get_max_bitrate(p_desc) * 50);
         break;
     default:
-        pf_print(opaque, "    - desc 0e max_bitrate=%u max_bitrate_decoded=%u",
+        pf_print(opaque, "    - desc 0e maximum_bitrate max_bitrate=%u max_bitrate_decoded=%u",
                  desc0e_get_max_bitrate(p_desc), desc0e_get_max_bitrate(p_desc) * 50);
     }
 }
@@ -673,7 +673,7 @@ static inline void desc10_print(const uint8_t *p_desc, f_print pf_print,
                  desc10_get_sb_leak_rate(p_desc), desc10_get_sb_size(p_desc));
         break;
     default:
-        pf_print(opaque, "    - desc 10 sb_leak_rate=%u sb_size=%u",
+        pf_print(opaque, "    - desc 10 smoothing_buffer sb_leak_rate=%u sb_size=%u",
                  desc10_get_sb_leak_rate(p_desc), desc10_get_sb_size(p_desc));
     }
 }
@@ -713,7 +713,7 @@ static inline void desc11_print(const uint8_t *p_desc, f_print pf_print,
                  desc11_get_leak_valid_flag(p_desc));
         break;
     default:
-        pf_print(opaque, "    - desc 11 leak_valid_flag=%u",
+        pf_print(opaque, "    - desc 11 std leak_valid_flag=%u",
                  desc11_get_leak_valid_flag(p_desc));
     }
 }
-- 
1.7.5.1



More information about the dvblast-devel mailing list