FFmpeg
|
buffer sink More...
#include "libavutil/audio_fifo.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "buffersink.h"
#include "internal.h"
Go to the source code of this file.
Data Structures | |
struct | BufferSinkContext |
Macros | |
#define | NB_ITEMS(list) (list ## _size / sizeof(*list)) |
#define | FIFO_INIT_SIZE 8 |
#define | CHECK_LIST_SIZE(field) |
#define | OFFSET(x) offsetof(BufferSinkContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Variables | |
static const AVOption | buffersink_options [] |
static const AVOption | abuffersink_options [] |
static const AVFilterPad | avfilter_vsink_buffer_inputs [] |
AVFilter | avfilter_vsink_buffer |
static const AVFilterPad | avfilter_asink_abuffer_inputs [] |
AVFilter | avfilter_asink_abuffer |
Detailed Description
buffer sink
Definition in file buffersink.c.
Macro Definition Documentation
#define CHECK_LIST_SIZE | ( | field | ) |
Definition at line 387 of file buffersink.c.
Referenced by asink_query_formats(), and vsink_query_formats().
#define FIFO_INIT_SIZE 8 |
Definition at line 243 of file buffersink.c.
Referenced by common_init().
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 487 of file buffersink.c.
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 487 of file buffersink.c.
Definition at line 63 of file buffersink.c.
Referenced by asink_query_formats(), and vsink_query_formats().
#define OFFSET | ( | x | ) | offsetof(BufferSinkContext, x) |
Definition at line 480 of file buffersink.c.
Function Documentation
|
static |
Definition at line 83 of file buffersink.c.
Referenced by filter_frame().
|
static |
Definition at line 414 of file buffersink.c.
|
static |
Definition at line 431 of file buffersink.c.
AVABufferSinkParams* av_abuffersink_params_alloc | ( | void | ) |
Create an AVABufferSinkParams structure.
Must be freed with av_free().
Definition at line 234 of file buffersink.c.
int av_buffersink_get_frame | ( | AVFilterContext * | ctx, |
AVFrame * | frame | ||
) |
Get a frame with filtered data from sink and put it in frame.
- Parameters
-
ctx pointer to a context of a buffersink or abuffersink AVFilter. frame pointer to an allocated frame that will be filled with data. The data must be freed using av_frame_unref() / av_frame_free()
- Returns
- >= 0 in case of success, a negative AVERROR code in case of failure.
Definition at line 121 of file buffersink.c.
Referenced by main().
int attribute_align_arg av_buffersink_get_frame_flags | ( | AVFilterContext * | ctx, |
AVFrame * | frame, | ||
int | flags | ||
) |
Get a frame with filtered data from sink and put it in frame.
- Parameters
-
ctx pointer to a buffersink or abuffersink filter context. frame pointer to an allocated frame that will be filled with data. The data must be freed using av_frame_unref() / av_frame_free() flags a combination of AV_BUFFERSINK_FLAG_* flags
- Returns
- >= 0 in for success, a negative AVERROR code for failure.
Definition at line 126 of file buffersink.c.
Referenced by audio_decode_frame(), av_buffersink_get_frame(), av_buffersink_get_samples(), av_buffersink_set_frame_size(), lavfi_read_packet(), reap_filters(), and video_thread().
AVRational av_buffersink_get_frame_rate | ( | AVFilterContext * | ctx | ) |
Get the frame rate of the input.
Definition at line 352 of file buffersink.c.
Referenced by transcode_init().
int attribute_align_arg av_buffersink_get_samples | ( | AVFilterContext * | ctx, |
AVFrame * | frame, | ||
int | nb_samples | ||
) |
Same as av_buffersink_get_frame(), but with the ability to specify the number of samples read.
This function is less efficient than av_buffersink_get_frame(), because it copies the data around.
- Parameters
-
ctx pointer to a context of the abuffersink AVFilter. frame pointer to an allocated frame that will be filled with data. The data must be freed using av_frame_unref() / av_frame_free() frame will contain exactly nb_samples audio samples, except at the end of stream, when it can contain less than nb_samples.
- Warning
- do not mix this function with av_buffersink_get_frame(). Use only one or the other with a single sink, not both.
Definition at line 179 of file buffersink.c.
Referenced by av_buffersink_set_frame_size().
AVBufferSinkParams* av_buffersink_params_alloc | ( | void | ) |
Create an AVBufferSinkParams structure.
Must be freed with av_free().
Definition at line 223 of file buffersink.c.
Referenced by init_filters().
int attribute_align_arg av_buffersink_poll_frame | ( | AVFilterContext * | ctx | ) |
Definition at line 360 of file buffersink.c.
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 258 of file buffersink.c.
Referenced by decode_audio(), and transcode_init().
AVFILTER_DEFINE_CLASS | ( | buffersink | ) |
AVFILTER_DEFINE_CLASS | ( | abuffersink | ) |
|
static |
Definition at line 245 of file buffersink.c.
Referenced by asink_init(), and vsink_init().
|
static |
Definition at line 102 of file buffersink.c.
|
static |
Definition at line 157 of file buffersink.c.
Referenced by av_buffersink_get_samples().
|
static |
Definition at line 65 of file buffersink.c.
|
static |
Definition at line 373 of file buffersink.c.
|
static |
Definition at line 394 of file buffersink.c.
Variable Documentation
|
static |
Definition at line 488 of file buffersink.c.
AVFilter avfilter_asink_abuffer |
Definition at line 583 of file buffersink.c.
|
static |
Definition at line 574 of file buffersink.c.
AVFilter avfilter_vsink_buffer |
Definition at line 561 of file buffersink.c.
|
static |
Definition at line 552 of file buffersink.c.
|
static |
Definition at line 482 of file buffersink.c.
Generated on Fri Dec 20 2024 06:56:11 for FFmpeg by 1.8.11