diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 18:02:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 18:03:43 +0100 |
commit | 62a82c66cd3f03e045867471c5edcc84b4d2b54e (patch) | |
tree | ed8a8d99a235f959088b28fe131c6c4e5fcbe610 /libavfilter | |
parent | b44456c908965231160f9b8f88de8c0dc447aa1f (diff) | |
parent | 728685f37ab333ca35980bd01766c78d197f784a (diff) | |
download | ffmpeg-62a82c66cd3f03e045867471c5edcc84b4d2b54e.tar.gz |
Merge commit '728685f37ab333ca35980bd01766c78d197f784a'
* commit '728685f37ab333ca35980bd01766c78d197f784a':
Add a side data type for audio service type.
Conflicts:
doc/APIchanges
libavcodec/avcodec.h
libavcodec/version.h
libavutil/frame.h
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_ashowinfo.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c index 0e6c6c06f5..26e4f1ff95 100644 --- a/libavfilter/af_ashowinfo.c +++ b/libavfilter/af_ashowinfo.c @@ -142,6 +142,30 @@ static void dump_replaygain(AVFilterContext *ctx, AVFrameSideData *sd) print_peak(ctx, "album peak", rg->album_peak); } +static void dump_audio_service_type(AVFilterContext *ctx, AVFrameSideData *sd) +{ + enum AVAudioServiceType *ast; + + av_log(ctx, AV_LOG_INFO, "audio service type: "); + if (sd->size < sizeof(*ast)) { + av_log(ctx, AV_LOG_INFO, "invalid data"); + return; + } + ast = (enum AVAudioServiceType*)sd->data; + switch (*ast) { + case AV_AUDIO_SERVICE_TYPE_MAIN: av_log(ctx, AV_LOG_INFO, "Main Audio Service"); break; + case AV_AUDIO_SERVICE_TYPE_EFFECTS: av_log(ctx, AV_LOG_INFO, "Effects"); break; + case AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED: av_log(ctx, AV_LOG_INFO, "Visually Impaired"); break; + case AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED: av_log(ctx, AV_LOG_INFO, "Hearing Impaired"); break; + case AV_AUDIO_SERVICE_TYPE_DIALOGUE: av_log(ctx, AV_LOG_INFO, "Dialogue"); break; + case AV_AUDIO_SERVICE_TYPE_COMMENTARY: av_log(ctx, AV_LOG_INFO, "Commentary"); break; + case AV_AUDIO_SERVICE_TYPE_EMERGENCY: av_log(ctx, AV_LOG_INFO, "Emergency"); break; + case AV_AUDIO_SERVICE_TYPE_VOICE_OVER: av_log(ctx, AV_LOG_INFO, "Voice Over"); break; + case AV_AUDIO_SERVICE_TYPE_KARAOKE: av_log(ctx, AV_LOG_INFO, "Karaoke"); break; + default: av_log(ctx, AV_LOG_INFO, "unknown"); break; + } +} + static void dump_unknown(AVFilterContext *ctx, AVFrameSideData *sd) { av_log(ctx, AV_LOG_INFO, "unknown side data type: %d, size %d bytes", sd->type, sd->size); @@ -200,6 +224,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) case AV_FRAME_DATA_MATRIXENCODING: dump_matrixenc (ctx, sd); break; case AV_FRAME_DATA_DOWNMIX_INFO: dump_downmix (ctx, sd); break; case AV_FRAME_DATA_REPLAYGAIN: dump_replaygain(ctx, sd); break; + case AV_FRAME_DATA_AUDIO_SERVICE_TYPE: dump_audio_service_type(ctx, sd); break; default: dump_unknown (ctx, sd); break; } |