FFmpeg 5.1.6
|
Audio sample format enumeration and related convenience functions. More...
Enumerations | |
enum | AVSampleFormat { AV_SAMPLE_FMT_NONE = -1 , AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_S16 , AV_SAMPLE_FMT_S32 , AV_SAMPLE_FMT_FLT , AV_SAMPLE_FMT_DBL , AV_SAMPLE_FMT_U8P , AV_SAMPLE_FMT_S16P , AV_SAMPLE_FMT_S32P , AV_SAMPLE_FMT_FLTP , AV_SAMPLE_FMT_DBLP , AV_SAMPLE_FMT_S64 , AV_SAMPLE_FMT_S64P , AV_SAMPLE_FMT_NB } |
Audio sample formats. 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_alt_sample_fmt (enum AVSampleFormat sample_fmt, int planar) |
Return the planar<->packed alternative form of the given sample format, 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 55 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.
Referenced by get_format_from_sample_fmt(), init_filter(), init_filter_graph(), init_filters(), and main().
enum AVSampleFormat av_get_sample_fmt | ( | const char * | name | ) |
Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error.
enum AVSampleFormat av_get_alt_sample_fmt | ( | enum AVSampleFormat | sample_fmt, |
int | planar | ||
) |
Return the planar<->packed alternative form of the given sample format, or AV_SAMPLE_FMT_NONE on error.
If the passed sample_fmt is already in the requested planar/packed format, the format returned is the same as the input.
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.
Referenced by main().
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.
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. |
int av_get_bytes_per_sample | ( | enum AVSampleFormat | sample_fmt | ) |
Return number of bytes per sample.
sample_fmt | the sample format |
Referenced by decode(), output_audio_frame(), and process_output().
int av_sample_fmt_is_planar | ( | enum AVSampleFormat | sample_fmt | ) |
Check if the sample format is planar.
sample_fmt | the sample format to inspect |
Referenced by main(), and process_output().
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) |
Referenced by main().