[FFmpeg-cvslog] mxf: Add UID print helpers
Luca Barbato
git at videolan.org
Sun Aug 17 21:57:30 CEST 2014
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Aug 12 16:55:22 2014 +0200| [304089aca7d238ae184e09993b5c737aa22e2c2c] | committer: Luca Barbato
mxf: Add UID print helpers
And use it to print non-parsed ULs.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=304089aca7d238ae184e09993b5c737aa22e2c2c
---
libavformat/mxf.h | 12 ++++++++++++
libavformat/mxfdec.c | 3 +++
2 files changed, 15 insertions(+)
diff --git a/libavformat/mxf.h b/libavformat/mxf.h
index a2d919a..2443207 100644
--- a/libavformat/mxf.h
+++ b/libavformat/mxf.h
@@ -79,6 +79,18 @@ extern const MXFCodecUL ff_mxf_pixel_format_uls[];
int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum AVPixelFormat *pix_fmt);
const MXFSamplesPerFrame *ff_mxf_get_samples_per_frame(AVFormatContext *s, AVRational time_base);
+#define PRIxUID \
+ "%02x.%02x.%02x.%02x." \
+ "%02x.%02x.%02x.%02x." \
+ "%02x.%02x.%02x.%02x." \
+ "%02x.%02x.%02x.%02x"
+
+#define UID_ARG(x) \
+ (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] \
+
#ifdef DEBUG
#define PRINT_KEY(pc, s, x) \
av_log(pc, AV_LOG_VERBOSE, \
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index ba76577..410c13b 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2185,6 +2185,9 @@ static int mxf_read_header(AVFormatContext *s)
return res;
}
break;
+ } else {
+ av_log(s, AV_LOG_VERBOSE, "Dark key " PRIxUID "\n",
+ UID_ARG(klv.key));
}
}
if (!metadata->read)
More information about the ffmpeg-cvslog
mailing list