diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-12-02 16:39:41 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-12-20 13:03:41 +0100 |
commit | 34de47aa35a39ddcf085b28f7c99f8de8f6c3c9c (patch) | |
tree | 6fa12b45581760fcfea8c9b6504fff00cdd2963d /libavfilter | |
parent | 238edd2fe33da8281b3774196c3de503ea64b745 (diff) | |
download | ffmpeg-34de47aa35a39ddcf085b28f7c99f8de8f6c3c9c.tar.gz |
lavfi: add an accessor for ref->audio->channels.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/audio.c | 5 | ||||
-rw-r--r-- | libavfilter/avfilter.h | 7 | ||||
-rw-r--r-- | libavfilter/version.h | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/libavfilter/audio.c b/libavfilter/audio.c index 565f2e264c..3564896534 100644 --- a/libavfilter/audio.c +++ b/libavfilter/audio.c @@ -27,6 +27,11 @@ #include "avfilter.h" #include "internal.h" +int avfilter_ref_get_channels(AVFilterBufferRef *ref) +{ + return ref->audio ? ref->audio->channels : 0; +} + AVFilterBufferRef *ff_null_get_audio_buffer(AVFilterLink *link, int perms, int nb_samples) { diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 5234a66201..3849c7b0b4 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -128,7 +128,7 @@ typedef struct AVFilterBufferRefAudioProps { uint64_t channel_layout; ///< channel layout of audio buffer int nb_samples; ///< number of audio samples per channel int sample_rate; ///< audio buffer sample rate - int channels; ///< number of channels + int channels; ///< number of channels (do not access directly) } AVFilterBufferRefAudioProps; /** @@ -233,6 +233,11 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref); */ void avfilter_unref_bufferp(AVFilterBufferRef **ref); +/** + * Get the number of channels of a buffer reference. + */ +int avfilter_ref_get_channels(AVFilterBufferRef *ref); + #if FF_API_AVFILTERPAD_PUBLIC /** * A filter pad used for either input or output. diff --git a/libavfilter/version.h b/libavfilter/version.h index ee6525f549..d8061de811 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -29,8 +29,8 @@ #include "libavutil/avutil.h" #define LIBAVFILTER_VERSION_MAJOR 3 -#define LIBAVFILTER_VERSION_MINOR 28 -#define LIBAVFILTER_VERSION_MICRO 102 +#define LIBAVFILTER_VERSION_MINOR 29 +#define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ |