summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-10 04:36:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-19 20:15:37 +0200
commitf63d381387165eddff47ea896794837332b5cbd2 (patch)
tree6b1776f211b4163477a8b4413959132eb8b45615 /ffprobe.c
parentf22cf88fd3172d4527c58e58af8f0667485ae6d6 (diff)
downloadffmpeg-f63d381387165eddff47ea896794837332b5cbd2.tar.gz
ffprobe: Add support for color_trc/color_pri/chroma_loc
Idea from: a2c00d22e71d13b72828147be86aa9e961c6cae6 Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c16
1 files changed, 16 insertions, 0 deletions
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);