diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-02-01 12:34:23 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-05-09 20:26:19 +0200 |
commit | e727bca392995e4fec0104b7f75f89a66618c120 (patch) | |
tree | 87795d9f2a31f7fc1a1dbd16a74827de5b6af3bf /libavfilter/avfilter.h | |
parent | c8b4a3999bc7f3732a537cdec6475918a65d6e78 (diff) | |
download | ffmpeg-e727bca392995e4fec0104b7f75f89a66618c120.tar.gz |
lavfi: cleanup avfilter_get_audio_buffer() and pals.
Remove AVFilterBufferRefAudioProps.size, and use nb_samples in its place
everywhere.
This is required as the size in the audio buffer may be aligned, so it
may not contain a well defined number of samples.
Also remove the useless planar parameter, which can be deduced from the
sample format.
This is technically an API and ABI break, but since the audio part of
lavfi is not usable now, this should not be a problem in practice.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r-- | libavfilter/avfilter.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 6555744f12..19ac057ed4 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -109,7 +109,6 @@ typedef struct AVFilterBuffer { typedef struct AVFilterBufferRefAudioProps { uint64_t channel_layout; ///< channel layout of audio buffer int nb_samples; ///< number of audio samples - int size; ///< audio buffer size uint32_t sample_rate; ///< audio buffer sample rate int planar; ///< audio buffer - planar or packed } AVFilterBufferRefAudioProps; @@ -388,8 +387,8 @@ struct AVFilterPad { * Input audio pads only. */ AVFilterBufferRef *(*get_audio_buffer)(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int size, - uint64_t channel_layout, int planar); + enum AVSampleFormat sample_fmt, int nb_samples, + uint64_t channel_layout); /** * Callback called after the slices of a frame are completely sent. If @@ -474,8 +473,9 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, /** default handler for get_audio_buffer() for audio inputs */ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int size, - uint64_t channel_layout, int planar); + enum AVSampleFormat sample_fmt, + int nb_samples, + uint64_t channel_layout); /** * A helper for query_formats() which sets all links to the same list of @@ -505,8 +505,8 @@ AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, /** get_audio_buffer() handler for filters which simply pass audio along */ AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int size, - uint64_t channel_layout, int planar); + enum AVSampleFormat sample_fmt, int nb_samples, + uint64_t channel_layout); /** * Filter definition. This defines the pads a filter contains, and all the @@ -690,15 +690,15 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int * be requested * @param perms the required access permissions * @param sample_fmt the format of each sample in the buffer to allocate - * @param size the buffer size in bytes + * @param nb_samples the number of samples per channel * @param channel_layout the number and type of channels per sample in the buffer to allocate * @param planar audio data layout - planar or packed * @return A reference to the samples. This must be unreferenced with * avfilter_unref_buffer when you are finished with it. */ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int size, - uint64_t channel_layout, int planar); + enum AVSampleFormat sample_fmt, int nb_samples, + uint64_t channel_layout); /** * Create an audio buffer reference wrapped around an already |