Commit f4cee500 authored by Steve Lhomme's avatar Steve Lhomme Committed by James Almer

avformat/dump : Display Content Light Level metadata

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 157e57a1
...@@ -343,6 +343,14 @@ static void dump_mastering_display_metadata(void *ctx, AVPacketSideData* sd) { ...@@ -343,6 +343,14 @@ static void dump_mastering_display_metadata(void *ctx, AVPacketSideData* sd) {
av_q2d(metadata->min_luminance), av_q2d(metadata->max_luminance)); av_q2d(metadata->min_luminance), av_q2d(metadata->max_luminance));
} }
static void dump_content_light_metadata(void *ctx, AVPacketSideData* sd)
{
AVContentLightMetadata* metadata = (AVContentLightMetadata*)sd->data;
av_log(ctx, AV_LOG_INFO, "Content Light Level Metadata, "
"MaxCLL=%d, MaxFALL=%d",
metadata->MaxCLL, metadata->MaxFALL);
}
static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData *sd) static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData *sd)
{ {
AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data; AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data;
...@@ -426,6 +434,9 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent) ...@@ -426,6 +434,9 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
av_log(ctx, AV_LOG_INFO, "spherical: "); av_log(ctx, AV_LOG_INFO, "spherical: ");
dump_spherical(ctx, st->codecpar, &sd); dump_spherical(ctx, st->codecpar, &sd);
break; break;
case AV_PKT_DATA_CONTENT_LIGHT_LEVEL:
dump_content_light_metadata(ctx, &sd);
break;
default: default:
av_log(ctx, AV_LOG_INFO, av_log(ctx, AV_LOG_INFO,
"unknown side data type %d (%d bytes)", sd.type, sd.size); "unknown side data type %d (%d bytes)", sd.type, sd.size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment