#include "libavutil/audioconvert.h"
#include "libavutil/avstring.h"
#include "libavutil/fifo.h"
#include "asrc_abuffer.h"
#include "internal.h"
Go to the source code of this file.
Data Structures | |
struct | ABufferSourceContext |
Defines | |
#define | FIFO_SIZE 8 |
#define | ADD_FORMAT(fmt_name) |
Functions | |
static void | buf_free (AVFilterBuffer *ptr) |
static void | set_link_source (AVFilterContext *src, AVFilterLink *link) |
static int | reconfigure_filter (ABufferSourceContext *abuffer, AVFilterContext *filt_ctx) |
static int | insert_filter (ABufferSourceContext *abuffer, AVFilterLink *link, AVFilterContext **filt_ctx, const char *filt_name) |
static void | remove_filter (AVFilterContext **filt_ctx) |
static void | log_input_change (void *ctx, AVFilterLink *link, AVFilterBufferRef *ref) |
int | av_asrc_buffer_add_audio_buffer_ref (AVFilterContext *ctx, AVFilterBufferRef *samplesref, int av_unused flags) |
Queue an audio buffer to the audio buffer source. | |
int | av_asrc_buffer_add_samples (AVFilterContext *ctx, uint8_t *data[8], int linesize[8], int nb_samples, int sample_rate, int sample_fmt, int64_t channel_layout, int planar, int64_t pts, int av_unused flags) |
Queue an audio buffer to the audio buffer source. | |
int | av_asrc_buffer_add_buffer (AVFilterContext *ctx, uint8_t *buf, int buf_size, int sample_rate, int sample_fmt, int64_t channel_layout, int planar, int64_t pts, int av_unused flags) |
Queue an audio buffer to the audio buffer source. | |
static av_cold int | init (AVFilterContext *ctx, const char *args0, void *opaque) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | query_formats (AVFilterContext *ctx) |
static int | config_output (AVFilterLink *outlink) |
static int | request_frame (AVFilterLink *outlink) |
static int | poll_frame (AVFilterLink *outlink) |
Variables | |
AVFilter | avfilter_asrc_abuffer |
Definition in file asrc_abuffer.c.
#define ADD_FORMAT | ( | fmt_name | ) |
#define FIFO_SIZE 8 |
int av_asrc_buffer_add_audio_buffer_ref | ( | AVFilterContext * | abuffersrc, | |
AVFilterBufferRef * | samplesref, | |||
int av_unused | flags | |||
) |
Queue an audio buffer to the audio buffer source.
abuffersrc | audio source buffer context | |
samplesref | buffer ref to queue | |
flags | unused |
Definition at line 136 of file asrc_abuffer.c.
Referenced by av_asrc_buffer_add_samples().
int av_asrc_buffer_add_buffer | ( | AVFilterContext * | abuffersrc, | |
uint8_t * | buf, | |||
int | buf_size, | |||
int | sample_rate, | |||
int | sample_fmt, | |||
int64_t | ch_layout, | |||
int | planar, | |||
int64_t | pts, | |||
int av_unused | flags | |||
) |
Queue an audio buffer to the audio buffer source.
This is similar to av_asrc_buffer_add_samples(), but the samples are stored in a buffer with known size.
abuffersrc | audio source buffer context | |
buf | pointer to the samples data, packed is assumed | |
size | the size in bytes of the buffer, it must contain an integer number of samples | |
sample_fmt | sample format of the audio data | |
ch_layout | channel layout of the audio data | |
pts | presentation timestamp of the audio buffer | |
flags | unused |
Definition at line 232 of file asrc_abuffer.c.
int av_asrc_buffer_add_samples | ( | AVFilterContext * | abuffersrc, | |
uint8_t * | data[8], | |||
int | linesize[8], | |||
int | nb_samples, | |||
int | sample_rate, | |||
int | sample_fmt, | |||
int64_t | ch_layout, | |||
int | planar, | |||
int64_t | pts, | |||
int av_unused | flags | |||
) |
Queue an audio buffer to the audio buffer source.
abuffersrc | audio source buffer context | |
data | pointers to the samples planes | |
linesize | linesizes of each audio buffer plane | |
nb_samples | number of samples per channel | |
sample_fmt | sample format of the audio data | |
ch_layout | channel layout of the audio data | |
planar | flag to indicate if audio data is planar or packed | |
pts | presentation timestamp of the audio buffer | |
flags | unused |
Definition at line 210 of file asrc_abuffer.c.
Referenced by av_asrc_buffer_add_buffer().
static void buf_free | ( | AVFilterBuffer * | ptr | ) | [static] |
static int config_output | ( | AVFilterLink * | outlink | ) | [static] |
Definition at line 325 of file asrc_abuffer.c.
static av_cold int init | ( | AVFilterContext * | ctx, | |
const char * | args0, | |||
void * | opaque | |||
) | [static] |
Definition at line 253 of file asrc_abuffer.c.
static int insert_filter | ( | ABufferSourceContext * | abuffer, | |
AVFilterLink * | link, | |||
AVFilterContext ** | filt_ctx, | |||
const char * | filt_name | |||
) | [static] |
static void log_input_change | ( | void * | ctx, | |
AVFilterLink * | link, | |||
AVFilterBufferRef * | ref | |||
) | [inline, static] |
static int poll_frame | ( | AVFilterLink * | outlink | ) | [static] |
Definition at line 350 of file asrc_abuffer.c.
static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 305 of file asrc_abuffer.c.
static int reconfigure_filter | ( | ABufferSourceContext * | abuffer, | |
AVFilterContext * | filt_ctx | |||
) | [static] |
Definition at line 63 of file asrc_abuffer.c.
Referenced by av_asrc_buffer_add_audio_buffer_ref(), and insert_filter().
static void remove_filter | ( | AVFilterContext ** | filt_ctx | ) | [static] |
static int request_frame | ( | AVFilterLink * | outlink | ) | [static] |
Definition at line 332 of file asrc_abuffer.c.
static void set_link_source | ( | AVFilterContext * | src, | |
AVFilterLink * | link | |||
) | [static] |
static av_cold void uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 299 of file asrc_abuffer.c.
Initial value:
{ .name = "abuffer", .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), .priv_size = sizeof(ABufferSourceContext), .query_formats = query_formats, .init = init, .uninit = uninit, .inputs = (const AVFilterPad[]) {{ .name = NULL }}, .outputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_AUDIO, .request_frame = request_frame, .poll_frame = poll_frame, .config_props = config_output, }, { .name = NULL}}, }
Definition at line 356 of file asrc_abuffer.c.