X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffprobe.c;h=f22c4f57ade5ff99c5713015ed5a1f8a6dd529b1;hb=ca23d3491d4c3e316b968242dc14140603b27e70;hp=72a06d983b244d19578d3a11205855117c629e7c;hpb=8e0d5b354e70eb1d386e9f459a876dfdc9367591;p=ffmpeg diff --git a/ffprobe.c b/ffprobe.c index 72a06d983b2..f22c4f57ade 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -2105,6 +2105,31 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, print_int("interlaced_frame", frame->interlaced_frame); print_int("top_field_first", frame->top_field_first); print_int("repeat_pict", frame->repeat_pict); + + if (frame->color_range != AVCOL_RANGE_UNSPECIFIED) + print_str("color_range", av_color_range_name(frame->color_range)); + else + print_str_opt("color_range", av_color_range_name(frame->color_range)); + + if (frame->colorspace != AVCOL_SPC_UNSPECIFIED) + print_str("color_space", av_color_space_name(frame->colorspace)); + else + print_str_opt("color_space", av_color_space_name(frame->colorspace)); + + if (frame->color_primaries != AVCOL_PRI_UNSPECIFIED) + print_str("color_primaries", av_color_primaries_name(frame->color_primaries)); + else + print_str_opt("color_primaries", av_color_primaries_name(frame->color_primaries)); + + if (frame->color_trc != AVCOL_TRC_UNSPECIFIED) + print_str("color_transfer", av_color_transfer_name(frame->color_trc)); + else + print_str_opt("color_transfer", av_color_transfer_name(frame->color_trc)); + + if (frame->chroma_location != AVCHROMA_LOC_UNSPECIFIED) + print_str("chroma_location", av_chroma_location_name(frame->chroma_location)); + else + print_str_opt("chroma_location", av_chroma_location_name(frame->chroma_location)); break; case AVMEDIA_TYPE_AUDIO: @@ -2165,6 +2190,11 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, AVContentLightMetadata *metadata = (AVContentLightMetadata *)sd->data; print_int("max_content", metadata->MaxCLL); print_int("max_average", metadata->MaxFALL); + } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) { + AVDictionaryEntry *tag = av_dict_get(sd->metadata, "name", NULL, AV_DICT_MATCH_CASE); + if (tag) + print_str(tag->key, tag->value); + print_int("size", sd->size); } writer_print_section_footer(w); } @@ -2807,17 +2837,16 @@ static int open_input_file(InputFile *ifile, const char *filename) AVDictionary **opts = setup_find_stream_info_opts(fmt_ctx, codec_opts); int orig_nb_streams = fmt_ctx->nb_streams; - // TODO: reindent - err = avformat_find_stream_info(fmt_ctx, opts); + err = avformat_find_stream_info(fmt_ctx, opts); - for (i = 0; i < orig_nb_streams; i++) - av_dict_free(&opts[i]); - av_freep(&opts); + for (i = 0; i < orig_nb_streams; i++) + av_dict_free(&opts[i]); + av_freep(&opts); - if (err < 0) { - print_error(filename, err); - return err; - } + if (err < 0) { + print_error(filename, err); + return err; + } } av_dump_format(fmt_ctx, 0, filename, 0);