[FFmpeg-devel] [PATCH 3/3] avformat/dump : Display Content Light Level metadata
Steve Lhomme
robux4 at gmail.com
Thu Apr 6 18:46:25 EEST 2017
Thanks !
On Thu, Apr 6, 2017 at 4:45 PM, James Almer <jamrial at gmail.com> wrote:
> On 4/2/2017 5:08 AM, Steve Lhomme wrote:
>> --
>> update the previous patch:
>> - use MaxCLL/MaxFALL which are not rational numbers anymore
>> ---
>> libavformat/dump.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/libavformat/dump.c b/libavformat/dump.c
>> index ef4a6b093b..8fd58a0dba 100644
>> --- a/libavformat/dump.c
>> +++ b/libavformat/dump.c
>> @@ -343,6 +343,14 @@ static void dump_mastering_display_metadata(void *ctx, AVPacketSideData* sd) {
>> 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)
>> {
>> AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data;
>> @@ -426,6 +434,9 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
>> av_log(ctx, AV_LOG_INFO, "spherical: ");
>> dump_spherical(ctx, st->codecpar, &sd);
>> break;
>> + case AV_PKT_DATA_CONTENT_LIGHT_LEVEL:
>> + dump_content_light_metadata(ctx, &sd);
>> + break;
>> default:
>> av_log(ctx, AV_LOG_INFO,
>> "unknown side data type %d (%d bytes)", sd.type, sd.size);
>>
>
> Pushed, thanks.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list