From f63d381387165eddff47ea896794837332b5cbd2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 10 Oct 2014 04:36:03 +0200 Subject: ffprobe: Add support for color_trc/color_pri/chroma_loc Idea from: a2c00d22e71d13b72828147be86aa9e961c6cae6 Reviewed-by: Stefano Sabatini Signed-off-by: Michael Niedermayer --- ffprobe.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ffprobe.c') diff --git a/ffprobe.c b/ffprobe.c index 304ec8e67d..3eb02080f7 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -2118,6 +2118,22 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id s = av_get_colorspace_name(dec_ctx->colorspace); if (s) print_str ("color_space", s); else print_str_opt("color_space", "unknown"); + + if (dec_ctx->color_trc != AVCOL_TRC_UNSPECIFIED) + print_str("color_transfer", av_color_transfer_name(dec_ctx->color_trc)); + else + print_str_opt("color_transfer", av_color_transfer_name(dec_ctx->color_trc)); + + if (dec_ctx->color_primaries != AVCOL_PRI_UNSPECIFIED) + print_str("color_primaries", av_color_primaries_name(dec_ctx->color_primaries)); + else + print_str_opt("color_primaries", av_color_primaries_name(dec_ctx->color_primaries)); + + if (dec_ctx->chroma_sample_location != AVCHROMA_LOC_UNSPECIFIED) + print_str("chroma_location", av_chroma_location_name(dec_ctx->chroma_sample_location)); + else + print_str_opt("chroma_location", av_chroma_location_name(dec_ctx->chroma_sample_location)); + if (dec_ctx->timecode_frame_start >= 0) { char tcbuf[AV_TIMECODE_STR_SIZE]; av_timecode_make_mpeg_tc_string(tcbuf, dec_ctx->timecode_frame_start); -- cgit v1.2.3