[FFmpeg-devel] [PATCH 1/5] lavf: add AV_DISPOSITION_CLEAN_EFFECTS flag

Måns Rullgård mans
Mon Feb 14 23:53:25 CET 2011


Anssi Hannula <anssi.hannula at iki.fi> writes:

> ---
>
> M?ns Rullg?rd wrote:
>> Then I suppose it makes sense if our flags are also able to make that
>> distinction.
>
> OK, here goes. Rest of set follows as well.
>
>  doc/APIchanges         |    3 +++
>  libavformat/avformat.h |    1 +
>  libavformat/utils.c    |    2 ++
>  libavformat/version.h  |    2 +-
>  4 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 95f83c7..dd9498f 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,9 @@ libavutil:   2009-03-08
>
>  API changes, most recent first:
>
> +2011-02-14 - xxxxxxx - lavf 52.100.0 - AV_DISPOSITION_CLEAN_EFFECTS
> +  Add AV_DISPOSITION_CLEAN_EFFECTS disposition flag.
> +
>  2011-02-14 - 910b5b8 - lavfi 1.76.0 - AVFilterLink sample_aspect_ratio
>    Add sample_aspect_ratio field to AVFilterLink.
>
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index cd563bd..45f2337 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -476,6 +476,7 @@ typedef struct AVIndexEntry {
>  #define AV_DISPOSITION_FORCED    0x0040
>  #define AV_DISPOSITION_HEARING_IMPAIRED  0x0080  /**< stream for hearing impaired audiences */
>  #define AV_DISPOSITION_VISUAL_IMPAIRED   0x0100  /**< stream for visual impaired audiences */
> +#define AV_DISPOSITION_CLEAN_EFFECTS     0x0200  /**< stream without voice */
>
>  /**
>   * Stream structure.
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index c0f971e..2303244 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -3255,6 +3255,8 @@ static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_out
>          av_log(NULL, AV_LOG_INFO, " (hearing impaired)");
>      if (st->disposition & AV_DISPOSITION_VISUAL_IMPAIRED)
>          av_log(NULL, AV_LOG_INFO, " (visual impaired)");
> +    if (st->disposition & AV_DISPOSITION_CLEAN_EFFECTS)
> +        av_log(NULL, AV_LOG_INFO, " (clean effects)");
>      av_log(NULL, AV_LOG_INFO, "\n");
>      dump_metadata(NULL, st->metadata, "    ");

Looks fine to me.  The exact name could be debated (does music count as
effect?) but that's bikeshed territory.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list