Skip to content

Commit

Permalink
lavf/dump: dump DOVI side data
Browse files Browse the repository at this point in the history
dump DOVI side data.

Signed-off-by: Jun Zhao <[email protected]>
  • Loading branch information
mypopydev committed Apr 23, 2020
1 parent 1483cfa commit 446dac9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions libavformat/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/dovi_meta.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/avstring.h"
Expand Down Expand Up @@ -387,6 +388,20 @@ static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData *
}
}

static void dump_dovi_conf(void *ctx, AVPacketSideData* sd)
{
AVDOVIDecoderConfigurationRecord *dovi = (AVDOVIDecoderConfigurationRecord *)sd->data;

av_log(ctx, AV_LOG_INFO, "version: %d.%d, profile: %d, level: %d, "
"rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d",
dovi->dv_version_major, dovi->dv_version_minor,
dovi->dv_profile, dovi->dv_level,
dovi->rpu_present_flag,
dovi->el_present_flag,
dovi->bl_present_flag,
dovi->dv_bl_signal_compatibility_id);
}

static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
{
int i;
Expand Down Expand Up @@ -449,6 +464,10 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
case AV_PKT_DATA_ICC_PROFILE:
av_log(ctx, AV_LOG_INFO, "ICC Profile");
break;
case AV_PKT_DATA_DOVI_CONF:
av_log(ctx, AV_LOG_INFO, "DOVI configuration record: ");
dump_dovi_conf(ctx, &sd);
break;
default:
av_log(ctx, AV_LOG_INFO,
"unknown side data type %d (%d bytes)", sd.type, sd.size);
Expand Down

0 comments on commit 446dac9

Please sign in to comment.