#include "libavutil/audioconvert.h"
#include "libavutil/avassert.h"
#include "libavutil/fifo.h"
#include "avfilter.h"
#include "buffersink.h"
#include "audio.h"
#include "internal.h"
Go to the source code of this file.
Definition in file sink_buffer.c.
#define FIFO_INIT_SIZE 8 |
static int add_buffer_ref | ( | AVFilterContext * | ctx, | |
AVFilterBufferRef * | ref | |||
) | [static] |
Definition at line 101 of file sink_buffer.c.
Referenced by av_buffersink_read_samples(), and end_frame().
static av_cold int asink_init | ( | AVFilterContext * | ctx, | |
const char * | args, | |||
void * | opaque | |||
) | [static] |
Definition at line 277 of file sink_buffer.c.
static int asink_query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 310 of file sink_buffer.c.
static av_cold void asink_uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 301 of file sink_buffer.c.
AVABufferSinkParams* av_abuffersink_params_alloc | ( | void | ) |
Create an AVABufferSinkParams structure.
Must be freed with av_free().
Definition at line 45 of file sink_buffer.c.
Referenced by init_filters(), and lavfi_read_header().
int av_buffersink_get_buffer_ref | ( | AVFilterContext * | buffer_sink, | |
AVFilterBufferRef ** | bufref, | |||
int | flags | |||
) |
Get an audio/video buffer data from buffer_sink and put it in bufref.
This function works with both audio and video buffer sinks.
buffer_sink | pointer to a buffersink or abuffersink context | |
flags | a combination of AV_BUFFERSINK_FLAG_* flags |
Definition at line 149 of file sink_buffer.c.
Referenced by av_buffersink_read(), av_buffersink_read_samples(), lavfi_read_packet(), main(), reap_filters(), and video_thread().
AVRational av_buffersink_get_frame_rate | ( | AVFilterContext * | ctx | ) |
Get the frame rate of the input.
Definition at line 181 of file sink_buffer.c.
Referenced by transcode_init().
AVBufferSinkParams* av_buffersink_params_alloc | ( | void | ) |
Create an AVBufferSinkParams structure.
Must be freed with av_free().
Definition at line 34 of file sink_buffer.c.
Referenced by configure_output_video_filter(), init_filters(), and lavfi_read_header().
int av_buffersink_poll_frame | ( | AVFilterContext * | ctx | ) |
void av_buffersink_set_frame_size | ( | AVFilterContext * | ctx, | |
unsigned | frame_size | |||
) |
Set the frame size for an audio buffer sink.
All calls to av_buffersink_get_buffer_ref will return a buffer with exactly the specified number of samples, or AVERROR(EAGAIN) if there is not enough. The last buffer at EOF will be padded with 0.
Definition at line 141 of file sink_buffer.c.
Referenced by decode_audio(), and transcode_init().
static av_cold int common_init | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 73 of file sink_buffer.c.
static av_cold void common_uninit | ( | AVFilterContext * | ctx | ) | [static] |
static int end_frame | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 120 of file sink_buffer.c.
static int filter_samples | ( | AVFilterLink * | link, | |
AVFilterBufferRef * | samplesref | |||
) | [static] |
Definition at line 271 of file sink_buffer.c.
static av_cold int vsink_init | ( | AVFilterContext * | ctx, | |
const char * | args, | |||
void * | opaque | |||
) | [static] |
Definition at line 202 of file sink_buffer.c.
static int vsink_query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 225 of file sink_buffer.c.
static av_cold void vsink_uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 218 of file sink_buffer.c.
Initial value:
{ .name = "abuffersink", .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."), .init_opaque = asink_init, .uninit = asink_uninit, .priv_size = sizeof(BufferSinkContext), .query_formats = asink_query_formats, .inputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_AUDIO, .filter_samples = filter_samples, .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, }, { .name = NULL }}, .outputs = (const AVFilterPad[]) {{ .name = NULL }}, }
Definition at line 347 of file sink_buffer.c.
Initial value:
{ .name = "ffabuffersink", .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."), .init_opaque = asink_init, .uninit = asink_uninit, .priv_size = sizeof(BufferSinkContext), .query_formats = asink_query_formats, .inputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_AUDIO, .filter_samples = filter_samples, .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, }, { .name = NULL }}, .outputs = (const AVFilterPad[]) {{ .name = NULL }}, }
Definition at line 331 of file sink_buffer.c.
Initial value:
{ .name = "buffersink", .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), .priv_size = sizeof(BufferSinkContext), .init_opaque = vsink_init, .uninit = vsink_uninit, .query_formats = vsink_query_formats, .inputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_VIDEO, .end_frame = end_frame, .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, }, { .name = NULL }}, .outputs = (const AVFilterPad[]) {{ .name = NULL }}, }
Definition at line 254 of file sink_buffer.c.
Initial value:
{ .name = "ffbuffersink", .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), .priv_size = sizeof(BufferSinkContext), .init_opaque = vsink_init, .uninit = vsink_uninit, .query_formats = vsink_query_formats, .inputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_VIDEO, .end_frame = end_frame, .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, }, { .name = NULL }}, .outputs = (const AVFilterPad[]) {{ .name = NULL }}, }
Definition at line 237 of file sink_buffer.c.