On Sun, Oct 19, 2014 at 01:40:38PM +0200, Stefano Sabatini wrote: > On date Friday 2014-10-10 05:29:00 +0200, Michael Niedermayer encoded: > > Idea from: a2c00d22e71d13b72828147be86aa9e961c6cae6 > > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > > --- > > doc/ffprobe.xsd | 3 +++ > > ffprobe.c | 16 ++++++++++++++++ > > tests/ref/fate/ffprobe_compact | 4 ++-- > > tests/ref/fate/ffprobe_csv | 4 ++-- > > tests/ref/fate/ffprobe_default | 6 ++++++ > > tests/ref/fate/ffprobe_flat | 6 ++++++ > > tests/ref/fate/ffprobe_ini | 6 ++++++ > > 7 files changed, 41 insertions(+), 4 deletions(-) > > > > diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd > > index 84b3810..2cbb9c2 100644 > > --- a/doc/ffprobe.xsd > > +++ b/doc/ffprobe.xsd > > @@ -167,6 +167,9 @@ > > <xsd:attribute name="level" type="xsd:int"/> > > <xsd:attribute name="color_range" type="xsd:string"/> > > <xsd:attribute name="color_space" type="xsd:string"/> > > + <xsd:attribute name="color_trc" type="xsd:string"/> > > + <xsd:attribute name="color_pri" type="xsd:string"/> > > + <xsd:attribute name="chroma_loc" type="xsd:string"/> > > <xsd:attribute name="timecode" type="xsd:string"/> > > > > <!-- audio attributes --> > > diff --git a/ffprobe.c b/ffprobe.c > > index 304ec8e..df10493 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_trc", > > av_color_transfer_name(dec_ctx->color_trc)); > > + else > > + print_str_opt("color_trc", > > av_color_transfer_name(dec_ctx->color_trc)); > > + > > + if (dec_ctx->color_primaries != AVCOL_PRI_UNSPECIFIED) > > + print_str("color_pri", > > av_color_primaries_name(dec_ctx->color_primaries)); > > + else > > + print_str_opt("color_pri", > > av_color_primaries_name(dec_ctx->color_primaries)); > > + > > + if (dec_ctx->chroma_sample_location != > > AVCHROMA_LOC_UNSPECIFIED) > > + print_str("chroma_loc", > > av_chroma_location_name(dec_ctx->chroma_sample_location)); > > + else > > + print_str_opt("chroma_loc", > > av_chroma_location_name(dec_ctx->chroma_sample_location)); > > Alternatively, more descriptive names (color_transfer, > color_primaries, chroma_location).
changed, applied [...] > > @@ -552,6 +555,9 @@ streams.stream.2.pix_fmt="rgb24" > > streams.stream.2.level=-99 > > streams.stream.2.color_range="N/A" > > streams.stream.2.color_space="unknown" > > +streams.stream.2.color_trc="unknown" > > +streams.stream.2.color_pri="unknown" > > +streams.stream.2.chroma_loc="unspecified" > > LGTM even if I don't know why there is no consistency between enum > names and strings. iam not opposed to change them if people think changing them is a good idea ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel