FFmpeg
|
memory buffer source filter More...
#include <float.h>
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/fifo.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "audio.h"
#include "avfilter.h"
#include "buffersrc.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "avcodec.h"
Go to the source code of this file.
Data Structures | |
struct | BufferSourceContext |
Macros | |
#define | CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format) |
#define | CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout, ch_count, format) |
#define | OFFSET(x) offsetof(BufferSourceContext, x) |
#define | A AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM |
#define | V AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Functions | |
int | av_buffersrc_write_frame (AVFilterContext *ctx, const AVFrame *frame) |
Add a frame to the buffer source. More... | |
int | av_buffersrc_add_frame (AVFilterContext *ctx, AVFrame *frame) |
Add a frame to the buffer source. More... | |
static int | av_buffersrc_add_frame_internal (AVFilterContext *ctx, AVFrame *frame, int flags) |
int | av_buffersrc_add_frame_flags (AVFilterContext *ctx, AVFrame *frame, int flags) |
Add a frame to the buffer source. More... | |
static av_cold int | init_video (AVFilterContext *ctx) |
unsigned | av_buffersrc_get_nb_failed_requests (AVFilterContext *buffer_src) |
Get the number of failed requests. More... | |
AVFILTER_DEFINE_CLASS (buffer) | |
AVFILTER_DEFINE_CLASS (abuffer) | |
static av_cold int | init_audio (AVFilterContext *ctx) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | query_formats (AVFilterContext *ctx) |
static int | config_props (AVFilterLink *link) |
static int | request_frame (AVFilterLink *link) |
static int | poll_frame (AVFilterLink *link) |
Variables | |
static const AVOption | buffer_options [] |
static const AVOption | abuffer_options [] |
static const AVFilterPad | avfilter_vsrc_buffer_outputs [] |
AVFilter | avfilter_vsrc_buffer |
static const AVFilterPad | avfilter_asrc_abuffer_outputs [] |
AVFilter | avfilter_asrc_abuffer |
Detailed Description
memory buffer source filter
Definition in file buffersrc.c.
Macro Definition Documentation
Definition at line 320 of file buffersrc.c.
Definition at line 74 of file buffersrc.c.
Referenced by av_buffersrc_add_frame_internal().
Definition at line 69 of file buffersrc.c.
Referenced by av_buffersrc_add_frame_internal().
#define OFFSET | ( | x | ) | offsetof(BufferSourceContext, x) |
Definition at line 319 of file buffersrc.c.
Definition at line 321 of file buffersrc.c.
Function Documentation
int av_buffersrc_add_frame | ( | AVFilterContext * | ctx, |
AVFrame * | frame | ||
) |
Add a frame to the buffer source.
- Parameters
-
s an instance of the buffersrc filter. frame frame to be added. If the frame is reference counted, this function will take ownership of the reference(s) and reset the frame. Otherwise the frame data will be copied. If this function returns an error, the input frame is not touched.
- Returns
- 0 on success, a negative AVERROR on error.
- Note
- the difference between this function and av_buffersrc_write_frame() is that av_buffersrc_write_frame() creates a new reference to the input frame, while this function takes ownership of the reference passed to it.
This function is equivalent to av_buffersrc_add_frame_flags() without the AV_BUFFERSRC_FLAG_KEEP_REF flag.
Definition at line 87 of file buffersrc.c.
Referenced by audio_decode_frame(), decode_audio(), decode_video(), and video_thread().
int av_buffersrc_add_frame_flags | ( | AVFilterContext * | buffer_src, |
AVFrame * | frame, | ||
int | flags | ||
) |
Add a frame to the buffer source.
By default, if the frame is reference-counted, this function will take ownership of the reference(s) and reset the frame. This can be controled using the flags.
If this function returns an error, the input frame is not touched.
- Parameters
-
buffer_src pointer to a buffer source context frame a frame, or NULL to mark EOF flags a combination of AV_BUFFERSRC_FLAG_*
- Returns
- >= 0 in case of success, a negative AVERROR code in case of failure
Definition at line 95 of file buffersrc.c.
Referenced by av_buffersrc_add_frame(), av_buffersrc_add_frame_internal(), av_buffersrc_write_frame(), decode_audio(), decode_video(), main(), and sub2video_push_ref().
|
static |
Definition at line 119 of file buffersrc.c.
Referenced by av_buffersrc_add_frame(), and av_buffersrc_add_frame_flags().
unsigned av_buffersrc_get_nb_failed_requests | ( | AVFilterContext * | buffer_src | ) |
Get the number of failed requests.
A failed request is when the request_frame method is called while no frame is present in the buffer. The number is reset when a frame is added.
Definition at line 314 of file buffersrc.c.
Referenced by sub2video_heartbeat(), and transcode_from_filter().
int av_buffersrc_write_frame | ( | AVFilterContext * | s, |
const AVFrame * | frame | ||
) |
Add a frame to the buffer source.
- Parameters
-
s an instance of the buffersrc filter. frame frame to be added. If the frame is reference counted, this function will make a new reference to it. Otherwise the frame data will be copied.
- Returns
- 0 on success, a negative AVERROR on error
This function is equivalent to av_buffersrc_add_frame_flags() with the AV_BUFFERSRC_FLAG_KEEP_REF flag.
Definition at line 81 of file buffersrc.c.
AVFILTER_DEFINE_CLASS | ( | buffer | ) |
AVFILTER_DEFINE_CLASS | ( | abuffer | ) |
|
static |
Definition at line 453 of file buffersrc.c.
|
static |
Definition at line 357 of file buffersrc.c.
|
static |
Definition at line 294 of file buffersrc.c.
|
static |
Definition at line 492 of file buffersrc.c.
|
static |
Definition at line 422 of file buffersrc.c.
|
static |
Definition at line 476 of file buffersrc.c.
|
static |
Definition at line 410 of file buffersrc.c.
Variable Documentation
|
static |
AVFilter avfilter_asrc_abuffer |
Definition at line 537 of file buffersrc.c.
|
static |
Definition at line 526 of file buffersrc.c.
AVFilter avfilter_vsrc_buffer |
Definition at line 512 of file buffersrc.c.
|
static |
Definition at line 501 of file buffersrc.c.
|
static |
Definition at line 323 of file buffersrc.c.
Generated on Tue Jan 21 2025 06:52:32 for FFmpeg by 1.8.11