FFmpeg
|
Modules | |
Audio channel masks | |
A channel layout is a 64-bits integer with a bit set for every channel. | |
Audio channel convenience macros | |
Functions | |
void | av_audio_fifo_free (AVAudioFifo *af) |
Free an AVAudioFifo. | |
AVAudioFifo * | av_audio_fifo_alloc (enum AVSampleFormat sample_fmt, int channels, int nb_samples) |
Allocate an AVAudioFifo. | |
int | av_audio_fifo_realloc (AVAudioFifo *af, int nb_samples) |
Reallocate an AVAudioFifo. | |
int | av_audio_fifo_write (AVAudioFifo *af, void **data, int nb_samples) |
Write data to an AVAudioFifo. | |
int | av_audio_fifo_read (AVAudioFifo *af, void **data, int nb_samples) |
Read data from an AVAudioFifo. | |
int | av_audio_fifo_drain (AVAudioFifo *af, int nb_samples) |
Drain data from an AVAudioFifo. | |
void | av_audio_fifo_reset (AVAudioFifo *af) |
Reset the AVAudioFifo buffer. | |
int | av_audio_fifo_size (AVAudioFifo *af) |
Get the current number of samples in the AVAudioFifo available for reading. | |
int | av_audio_fifo_space (AVAudioFifo *af) |
Get the current number of samples in the AVAudioFifo available for writing. | |
uint64_t | av_get_channel_layout (const char *name) |
Return a channel layout id that matches name, or 0 if no match is found. | |
void | av_get_channel_layout_string (char *buf, int buf_size, int nb_channels, uint64_t channel_layout) |
Return a description of a channel layout. | |
void | av_bprint_channel_layout (struct AVBPrint *bp, int nb_channels, uint64_t channel_layout) |
Append a description of a channel layout to a bprint buffer. | |
int | av_get_channel_layout_nb_channels (uint64_t channel_layout) |
Return the number of channels in the channel layout. | |
int64_t | av_get_default_channel_layout (int nb_channels) |
Return default channel layout for a given number of channels. | |
int | av_get_channel_layout_channel_index (uint64_t channel_layout, uint64_t channel) |
Get the index of a channel in channel_layout. | |
uint64_t | av_channel_layout_extract_channel (uint64_t channel_layout, int index) |
Get the channel with the given index in channel_layout. | |
const char * | av_get_channel_name (uint64_t channel) |
Get the name of a given channel. | |
const char * | av_get_channel_description (uint64_t channel) |
Get the description of a given channel. | |
int | av_get_standard_channel_layout (unsigned index, uint64_t *layout, const char **name) |
Get the value and name of a standard channel layout. | |
void av_audio_fifo_free | ( | AVAudioFifo * | af | ) |
Free an AVAudioFifo.
af | AVAudioFifo to free |
Definition at line 45 of file audio_fifo.c.
Referenced by av_audio_fifo_alloc(), avresample_close(), and uninit().
AVAudioFifo* av_audio_fifo_alloc | ( | enum AVSampleFormat | sample_fmt, |
int | channels, | ||
int | nb_samples | ||
) |
Allocate an AVAudioFifo.
sample_fmt | sample format |
channels | number of channels |
nb_samples | initial allocation size, in samples |
Definition at line 60 of file audio_fifo.c.
Referenced by av_buffersink_get_samples(), avresample_open(), config_output(), and config_props_output().
int av_audio_fifo_realloc | ( | AVAudioFifo * | af, |
int | nb_samples | ||
) |
Reallocate an AVAudioFifo.
af | AVAudioFifo to reallocate |
nb_samples | new allocation size, in samples |
Definition at line 97 of file audio_fifo.c.
Referenced by av_audio_fifo_write(), and filter_frame().
int av_audio_fifo_write | ( | AVAudioFifo * | af, |
void ** | data, | ||
int | nb_samples | ||
) |
Write data to an AVAudioFifo.
The AVAudioFifo will be reallocated automatically if the available space is less than nb_samples.
af | AVAudioFifo to write to |
data | audio data plane pointers |
nb_samples | number of samples to write |
Definition at line 113 of file audio_fifo.c.
Referenced by av_buffersink_get_samples(), ff_audio_data_add_to_fifo(), and filter_frame().
int av_audio_fifo_read | ( | AVAudioFifo * | af, |
void ** | data, | ||
int | nb_samples | ||
) |
Read data from an AVAudioFifo.
af | AVAudioFifo to read from |
data | audio data plane pointers |
nb_samples | number of samples to read |
Definition at line 139 of file audio_fifo.c.
Referenced by avresample_read(), ff_audio_data_read_from_fifo(), output_frame(), push_samples(), and read_from_fifo().
int av_audio_fifo_drain | ( | AVAudioFifo * | af, |
int | nb_samples | ||
) |
Drain data from an AVAudioFifo.
Removes the data without reading it.
af | AVAudioFifo to drain |
nb_samples | number of samples to drain |
Definition at line 159 of file audio_fifo.c.
Referenced by avresample_read().
void av_audio_fifo_reset | ( | AVAudioFifo * | af | ) |
Reset the AVAudioFifo buffer.
This empties all data in the buffer.
af | AVAudioFifo to reset |
Definition at line 176 of file audio_fifo.c.
int av_audio_fifo_size | ( | AVAudioFifo * | af | ) |
Get the current number of samples in the AVAudioFifo available for reading.
af | the AVAudioFifo to query |
Definition at line 186 of file audio_fifo.c.
Referenced by av_audio_fifo_write(), av_buffersink_get_samples(), avresample_available(), avresample_convert(), avresample_set_compensation(), filter_frame(), get_available_samples(), handle_buffered_output(), push_samples(), and request_samples().
int av_audio_fifo_space | ( | AVAudioFifo * | af | ) |
Get the current number of samples in the AVAudioFifo available for writing.
af | the AVAudioFifo to query |
Definition at line 191 of file audio_fifo.c.
Referenced by av_audio_fifo_write(), and filter_frame().
uint64_t av_get_channel_layout | ( | const char * | name | ) |
Return a channel layout id that matches name, or 0 if no match is found.
name can be one or several of the following notations, separated by '+' or '|':
Example: "stereo+FC" = "2c+FC" = "2c+1c" = "0x7"
Definition at line 181 of file channel_layout.c.
Referenced by av_opt_set(), channelmap_init(), ff_parse_channel_layout(), get_channel(), init(), init_audio(), join_init(), opt_channel_layout(), and parse_channel_name().
void av_get_channel_layout_string | ( | char * | buf, |
int | buf_size, | ||
int | nb_channels, | ||
uint64_t | channel_layout | ||
) |
Return a description of a channel layout.
If nb_channels is <= 0, it is guessed from the channel_layout.
buf | put here the string containing the channel layout |
buf_size | size in bytes of the buffer |
Definition at line 221 of file channel_layout.c.
Referenced by audio_decode_frame(), auto_matrix(), avcodec_open2(), avcodec_string(), channelmap_config_input(), channelmap_init(), clean_layout(), config_output(), config_props(), decode_audio(), dprint_options(), ff_alsa_open(), ff_audio_mix_set_matrix(), ff_tlog_link(), filter_frame(), guess_channel_layout(), guess_input_channel_layout(), init_filters(), main(), oggvorbis_init_encoder(), print_digraph(), print_link_prop(), query_formats(), and swr_init().
Append a description of a channel layout to a bprint buffer.
Definition at line 187 of file channel_layout.c.
Referenced by av_get_channel_layout_string(), config_output(), show_frame(), and show_stream().
int av_get_channel_layout_nb_channels | ( | uint64_t | channel_layout | ) |
Return the number of channels in the channel layout.
Definition at line 230 of file channel_layout.c.
Referenced by audio_decode_frame(), audio_encode_example(), audio_open(), auto_matrix(), av_bprint_channel_layout(), av_buffersrc_add_frame_flags(), av_channel_layout_extract_channel(), av_get_channel_description(), av_get_channel_layout_channel_index(), av_get_channel_name(), avcodec_open2(), avresample_build_matrix(), avresample_get_matrix(), avresample_open(), avresample_set_channel_mapping(), avresample_set_matrix(), buffer_offset(), calc_ptr_alignment(), channelmap_config_input(), channelmap_filter_frame(), channelmap_init(), config_audio_output(), config_output(), config_props(), cook_decode_init(), dca_decode_frame(), ff_default_get_audio_buffer(), ff_filter_frame_framed(), ff_init_buffer_info(), ff_merge_channel_layouts(), ff_mov_get_channel_layout_tag(), ff_parse_channel_layout(), filter_frame(), get_channel(), get_stream_info(), get_valid_channel_layout(), init(), init_audio(), join_init(), main(), mov_read_dec3(), opt_channel_layout(), pick_format(), print_frame(), query_formats(), return_audio_frame(), sane_layout(), select_channel_layout(), send_silence(), swap_channel_layouts_on_filter(), swr_alloc_set_opts(), swr_init(), swr_set_matrix(), swri_rematrix(), swri_rematrix_init(), swri_rematrix_init_x86(), and thd_channel_layout_extract_channel().
int64_t av_get_default_channel_layout | ( | int | nb_channels | ) |
Return default channel layout for a given number of channels.
Definition at line 235 of file channel_layout.c.
Referenced by audio_decode_frame(), audio_open(), channelmap_init(), configure_output_audio_filter(), encode_init(), get_channel_layout_single(), guess_channel_layout(), guess_input_channel_layout(), init(), init_filters(), query_formats(), set_channel_info(), and swr_init().
int av_get_channel_layout_channel_index | ( | uint64_t | channel_layout, |
uint64_t | channel | ||
) |
Get the index of a channel in channel_layout.
channel | a channel layout describing exactly one channel which must be present in channel_layout. |
Definition at line 243 of file channel_layout.c.
Referenced by channelmap_config_input(), channelmap_init(), join_config_output(), parse_maps(), and read_restart_header().
uint64_t av_channel_layout_extract_channel | ( | uint64_t | channel_layout, |
int | index | ||
) |
Get the channel with the given index in channel_layout.
Definition at line 275 of file channel_layout.c.
Referenced by filter_frame(), guess_map_any(), init(), join_config_output(), join_init(), and query_formats().
const char* av_get_channel_name | ( | uint64_t | channel | ) |
Get the name of a given channel.
Definition at line 253 of file channel_layout.c.
Referenced by channelmap_config_input(), init(), join_config_output(), and show_layouts().
const char* av_get_channel_description | ( | uint64_t | channel | ) |
Get the description of a given channel.
channel | a channel layout with a single channel |
Definition at line 264 of file channel_layout.c.
Referenced by show_layouts().
int av_get_standard_channel_layout | ( | unsigned | index, |
uint64_t * | layout, | ||
const char ** | name | ||
) |
Get the value and name of a standard channel layout.
[in] | index | index in an internal list, starting at 0 |
[out] | layout | channel layout mask |
[out] | name | name of the layout |
Definition at line 289 of file channel_layout.c.
Referenced by show_layouts().