Browse Source

mxf: Add UID print helpers

And use it to print non-parsed ULs.
tags/n2.4
Luca Barbato 11 years ago
parent
commit
304089aca7
2 changed files with 15 additions and 0 deletions
  1. +12
    -0
      libavformat/mxf.h
  2. +3
    -0
      libavformat/mxfdec.c

+ 12
- 0
libavformat/mxf.h View File

@@ -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, \


+ 3
- 0
libavformat/mxfdec.c View File

@@ -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)


Loading…
Cancel
Save