Libav
|
Audio sample format enumeration and related convenience functions. More...
Functions | |
const char * | av_get_sample_fmt_name (enum AVSampleFormat sample_fmt) |
Return the name of sample_fmt, or NULL if sample_fmt is not recognized. More... | |
enum AVSampleFormat | av_get_sample_fmt (const char *name) |
Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error. More... | |
enum AVSampleFormat | av_get_packed_sample_fmt (enum AVSampleFormat sample_fmt) |
Get the packed alternative form of the given sample format. More... | |
enum AVSampleFormat | av_get_planar_sample_fmt (enum AVSampleFormat sample_fmt) |
Get the planar alternative form of the given sample format. More... | |
char * | av_get_sample_fmt_string (char *buf, int buf_size, enum AVSampleFormat sample_fmt) |
Generate a string corresponding to the sample format with sample_fmt, or a header if sample_fmt is negative. More... | |
int | av_get_bytes_per_sample (enum AVSampleFormat sample_fmt) |
Return number of bytes per sample. More... | |
int | av_sample_fmt_is_planar (enum AVSampleFormat sample_fmt) |
Check if the sample format is planar. More... | |
int | av_samples_get_buffer_size (int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) |
Get the required buffer size for the given audio parameters. More... | |
Audio sample format enumeration and related convenience functions.
enum AVSampleFormat |
Audio Sample Formats.
Definition at line 61 of file samplefmt.h.
enum AVSampleFormat |
Audio Sample Formats.
Definition at line 61 of file samplefmt.h.
const char * av_get_sample_fmt_name | ( | enum AVSampleFormat | sample_fmt | ) |
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
Definition at line 47 of file samplefmt.c.
Referenced by audio_encode_example(), avcodec_string(), avresample_open(), config_output(), configure_input_audio_filter(), decode_audio(), dprint_options(), ff_all_formats(), ff_audio_convert_set_func(), ff_audio_mix_alloc(), ff_audio_mix_set_func(), ff_audio_resample_init(), ff_dither_alloc(), ff_dlog_link(), filter_frame(), init_filter_graph(), main(), mix_function_init(), and print_digraph().
enum AVSampleFormat av_get_sample_fmt | ( | const char * | name | ) |
Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error.
Definition at line 54 of file samplefmt.c.
Referenced by init(), init_audio(), and new_audio_stream().
enum AVSampleFormat av_get_packed_sample_fmt | ( | enum AVSampleFormat | sample_fmt | ) |
Get the packed alternative form of the given sample format.
If the passed sample_fmt is already in packed format, the format returned is the same as the input.
Definition at line 64 of file samplefmt.c.
Referenced by ff_audio_convert_set_func(), ff_dither_alloc(), ff_volume_init_x86(), filter_frame(), PUT_FUNC(), swap_sample_fmts_on_filter(), update_sample_fmt(), and volume_init().
enum AVSampleFormat av_get_planar_sample_fmt | ( | enum AVSampleFormat | sample_fmt | ) |
Get the planar alternative form of the given sample format.
If the passed sample_fmt is already in planar format, the format returned is the same as the input.
Definition at line 73 of file samplefmt.c.
Referenced by avcodec_open2(), avresample_open(), config_output(), and swap_sample_fmts_on_filter().
char * av_get_sample_fmt_string | ( | char * | buf, |
int | buf_size, | ||
enum AVSampleFormat | sample_fmt | ||
) |
Generate a string corresponding to the sample format with sample_fmt, or a header if sample_fmt is negative.
buf | the buffer where to write the string |
buf_size | the size of buf |
sample_fmt | the number of the sample format to print the corresponding info string, or a negative value to print the corresponding header. |
Definition at line 82 of file samplefmt.c.
Referenced by show_sample_fmts().
int av_get_bytes_per_sample | ( | enum AVSampleFormat | sample_fmt | ) |
Return number of bytes per sample.
sample_fmt | the sample format |
Definition at line 95 of file samplefmt.c.
Referenced by audio_decode_frame(), av_samples_copy(), av_samples_get_buffer_size(), av_samples_set_silence(), available_samples(), avresample_open(), buffer_offset(), copy_samples(), decode_frame(), decode_init(), fdk_aac_decode_frame(), ff_audio_data_alloc(), ff_audio_data_init(), ff_audio_resample(), ff_audio_resample_init(), ff_dither_alloc(), filter_frame(), flac_set_bps(), get_audio_clock(), init_sample_buffers(), libopus_encode(), libopus_encode_init(), mkv_write_track(), process_output(), swap_sample_fmts_on_filter(), synchronize_audio(), vmdaudio_decode_init(), and wavpack_decode_block().
int av_sample_fmt_is_planar | ( | enum AVSampleFormat | sample_fmt | ) |
Check if the sample format is planar.
sample_fmt | the sample format to inspect |
Definition at line 101 of file samplefmt.c.
Referenced by av_audio_fifo_alloc(), av_buffersrc_buffer(), av_frame_get_plane_buffer(), av_samples_copy(), av_samples_fill_arrays(), av_samples_get_buffer_size(), av_samples_set_silence(), available_samples(), avcodec_encode_audio2(), avcodec_fill_audio_frame(), avfilter_copy_buf_props(), avfilter_get_audio_buffer_ref_from_arrays(), buffer_offset(), calc_ptr_alignment(), config_output(), ff_get_buffer(), ff_planar_sample_fmts(), ff_sample_fmt_is_planar(), filter_frame(), flac_set_bps(), frame_copy_audio(), get_audio_buffer(), process_output(), update_frame_pool(), and update_sample_fmt().
int av_samples_get_buffer_size | ( | int * | linesize, |
int | nb_channels, | ||
int | nb_samples, | ||
enum AVSampleFormat | sample_fmt, | ||
int | align | ||
) |
Get the required buffer size for the given audio parameters.
[out] | linesize | calculated linesize, may be NULL |
nb_channels | the number of channels | |
nb_samples | the number of samples in a single channel | |
sample_fmt | the sample format | |
align | buffer size alignment (0 = default, 1 = no alignment) |
Definition at line 108 of file samplefmt.c.
Referenced by allocate_buffers(), audio_decode_example(), audio_decode_frame(), audio_encode_example(), av_audio_fifo_alloc(), av_audio_fifo_realloc(), av_samples_alloc(), av_samples_fill_arrays(), avcodec_fill_audio_frame(), dca_decode_frame(), ff_audio_data_realloc(), get_audio_buffer(), main(), tak_decode_frame(), and update_frame_pool().