libavfilter/vsrc_buffer.c File Reference

memory buffer source filter More...

#include "avfilter.h"
#include "internal.h"
#include "avcodec.h"
#include "buffersrc.h"
#include "vsrc_buffer.h"
#include "libavutil/imgutils.h"

Go to the source code of this file.

Data Structures

struct  BufferSourceContext

Defines

#define CHECK_PARAM_CHANGE(s, c, width, height, format)

Functions

int av_vsrc_buffer_add_video_buffer_ref (AVFilterContext *buffer_filter, AVFilterBufferRef *picref, int flags)
 Add video buffer data in picref to buffer_src.
int av_buffersrc_buffer (AVFilterContext *s, AVFilterBufferRef *buf)
 Add a buffer to the filtergraph s.
static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
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

AVFilter avfilter_vsrc_buffer


Detailed Description

memory buffer source filter

Definition in file vsrc_buffer.c.


Define Documentation

#define CHECK_PARAM_CHANGE ( s,
c,
width,
height,
format   ) 

Value:

if (c->w != width || c->h != height || c->pix_fmt != format) {\
        av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\
        return AVERROR(EINVAL);\
    }

Definition at line 42 of file vsrc_buffer.c.


Function Documentation

int av_buffersrc_buffer ( AVFilterContext s,
AVFilterBufferRef buf 
)

Add a buffer to the filtergraph s.

Parameters:
buf buffer containing frame data to be passed down the filtergraph. This function will take ownership of buf, the user must not free it.

Definition at line 122 of file vsrc_buffer.c.

Referenced by transcode_video().

int av_vsrc_buffer_add_video_buffer_ref ( AVFilterContext buffer_src,
AVFilterBufferRef picref,
int  flags 
)

Add video buffer data in picref to buffer_src.

Parameters:
buffer_src pointer to a buffer source context
flags a combination of AV_VSRC_BUF_FLAG_* flags
Returns:
>= 0 in case of success, a negative AVERROR code in case of failure

Definition at line 48 of file vsrc_buffer.c.

static int config_props ( AVFilterLink link  )  [static]

Definition at line 202 of file vsrc_buffer.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args,
void *  opaque 
) [static]

Definition at line 160 of file vsrc_buffer.c.

static int poll_frame ( AVFilterLink link  )  [static]

Definition at line 233 of file vsrc_buffer.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 193 of file vsrc_buffer.c.

static int request_frame ( AVFilterLink link  )  [static]

Definition at line 214 of file vsrc_buffer.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 185 of file vsrc_buffer.c.


Variable Documentation

Initial value:

 {
    .name      = "buffer",
    .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."),
    .priv_size = sizeof(BufferSourceContext),
    .query_formats = query_formats,

    .init      = init,
    .uninit    = uninit,

    .inputs    = (const AVFilterPad[]) {{ .name = NULL }},
    .outputs   = (const AVFilterPad[]) {{ .name      = "default",
                                    .type            = AVMEDIA_TYPE_VIDEO,
                                    .request_frame   = request_frame,
                                    .poll_frame      = poll_frame,
                                    .config_props    = config_props, },
                                  { .name = NULL}},
}

Definition at line 239 of file vsrc_buffer.c.

Referenced by avfilter_register_all().


Generated on Fri Oct 26 02:46:12 2012 for FFmpeg by  doxygen 1.5.8