Functions that manipulate audio samples. More...
Functions that manipulate audio samples.
Fill plane data pointers and linesize for samples with sample format sample_fmt.
The audio_data array is filled with the pointers to the samples data planes: for planar, set the start point of each channel's data within the buffer, for packed, set the start point of the entire buffer only.
The value pointed to by linesize is set to the aligned size of each channel's data buffer for planar layout, or to the aligned size of the buffer for all channels for packed layout.
The buffer in buf must be big enough to contain all the samples (use av_samples_get_buffer_size() to compute its minimum size), otherwise the audio_data pointers will point to invalid data.
Definition at line 151 of file samplefmt.c.
Referenced by allocate_buffers(), av_samples_alloc(), avcodec_fill_audio_frame(), ff_audio_data_realloc(), main(), and tak_decode_frame().
Allocate a samples buffer for nb_samples samples, and fill data pointers and linesize accordingly.
The allocated samples buffer can be freed by using av_freep(&audio_data[0]) Allocated data will be initialized to silence.
Definition at line 173 of file samplefmt.c.
Referenced by av_samples_alloc_array_and_samples(), ff_audio_data_realloc(), init_converted_samples(), and main().
Allocate a data pointers array, samples buffer for nb_samples samples, and fill data pointers and linesize accordingly.
This is the same as av_samples_alloc(), but also allocates the data pointers array.
Definition at line 198 of file samplefmt.c.
Referenced by config_input(), config_output(), and main().
Copy samples from src to dst.
Definition at line 213 of file samplefmt.c.
Referenced by decode_simple_internal(), ff_inlink_make_frame_writable(), frame_copy_audio(), pad_last_frame(), return_audio_frame(), and take_samples().
Fill an audio buffer with silence.
Definition at line 237 of file samplefmt.c.
Referenced by av_samples_alloc(), ff_audio_data_copy(), ff_audio_mix(), ff_default_get_audio_buffer(), pad_last_frame(), push_samples(), request_frame(), return_audio_frame(), and send_silence().