changeset 1340:79f90a950fe1 libavformat

add string param to PRINT_KEY for debug
author bcoudurier
date Fri, 29 Sep 2006 11:25:40 +0000
parents f54119845d46
children 884baacb7f7e
files mxf.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mxf.c	Fri Sep 29 10:38:27 2006 +0000
+++ b/mxf.c	Fri Sep 29 11:25:40 2006 +0000
@@ -169,7 +169,7 @@
 
 #define IS_KLV_KEY(x, y) (!memcmp(x, y, sizeof(y)))
 
-#define PRINT_KEY(x) dprintf("%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", \
+#define PRINT_KEY(s, x) dprintf("%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \
                              (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15])
 
 static int64_t klv_decode_ber_length(ByteIOContext *pb)
@@ -222,7 +222,7 @@
             return -1;
         }
 #ifdef DEBUG
-        PRINT_KEY(klv.key);
+        PRINT_KEY("read packet", klv.key);
 #endif
         if (IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
             av_get_packet(&s->pb, pkt, klv.length);
@@ -784,7 +784,7 @@
         }
 
 #ifdef DEBUG
-        PRINT_KEY(source_track->sequence->data_definition_ul);
+        PRINT_KEY("data definition   ul", source_track->sequence->data_definition_ul);
 #endif
         if (!memcmp(source_track->sequence->data_definition_ul, picture_essence_track_ul, 16))
             st->codec->codec_type = CODEC_TYPE_VIDEO;
@@ -816,8 +816,8 @@
             continue;
         }
 #ifdef DEBUG
-        PRINT_KEY(descriptor->essence_codec_ul);
-        PRINT_KEY(descriptor->essence_container_ul);
+        PRINT_KEY("essence codec     ul", descriptor->essence_codec_ul);
+        PRINT_KEY("essence container ul", descriptor->essence_container_ul);
 #endif
         /* TODO: drop PictureEssenceCoding and SoundEssenceCompression, only check EssenceContainer */
         codec_ul = mxf_get_codec_ul(mxf_codec_uls, &descriptor->essence_codec_ul);
@@ -894,7 +894,7 @@
             return -1;
         }
 #ifdef DEBUG
-        PRINT_KEY(klv.key);
+        PRINT_KEY("read header", klv.key);
 #endif
         if (IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
             /* FIXME avoid seek */