FFmpeg
Data Structures | Macros | Functions | Variables
split.c File Reference
#include <stdio.h>
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  SplitContext
 

Macros

#define OFFSET(x)   offsetof(SplitContext, x)
 
#define FLAGS   (AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM)
 
#define split_options   options
 
#define asplit_options   options
 

Functions

static av_cold int split_init (AVFilterContext *ctx)
 
static av_cold void split_uninit (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
 AVFILTER_DEFINE_CLASS (split)
 
 AVFILTER_DEFINE_CLASS (asplit)
 

Variables

static const AVOption options []
 
static const AVFilterPad avfilter_vf_split_inputs []
 
AVFilter ff_vf_split
 
static const AVFilterPad avfilter_af_asplit_inputs []
 
AVFilter ff_af_asplit
 

Detailed Description

audio and video splitter

Definition in file split.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(SplitContext, x)

Definition at line 101 of file split.c.

◆ FLAGS

Definition at line 102 of file split.c.

◆ split_options

#define split_options   options

Definition at line 108 of file split.c.

◆ asplit_options

#define asplit_options   options

Definition at line 111 of file split.c.

Function Documentation

◆ split_init()

static av_cold int split_init ( AVFilterContext ctx)
static

Definition at line 45 of file split.c.

◆ split_uninit()

static av_cold void split_uninit ( AVFilterContext ctx)
static

Definition at line 69 of file split.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 77 of file split.c.

◆ AVFILTER_DEFINE_CLASS() [1/2]

AVFILTER_DEFINE_CLASS ( split  )

◆ AVFILTER_DEFINE_CLASS() [2/2]

AVFILTER_DEFINE_CLASS ( asplit  )

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "outputs", "set number of outputs", OFFSET(nb_outputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, FLAGS },
{ NULL }
}

Definition at line 103 of file split.c.

◆ avfilter_vf_split_inputs

const AVFilterPad avfilter_vf_split_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 114 of file split.c.

◆ ff_vf_split

AVFilter ff_vf_split
Initial value:
= {
.name = "split",
.description = NULL_IF_CONFIG_SMALL("Pass on the input to N video outputs."),
.priv_size = sizeof(SplitContext),
.priv_class = &split_class,
}

Definition at line 123 of file split.c.

◆ avfilter_af_asplit_inputs

const AVFilterPad avfilter_af_asplit_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 135 of file split.c.

◆ ff_af_asplit

AVFilter ff_af_asplit
Initial value:
= {
.name = "asplit",
.description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."),
.priv_size = sizeof(SplitContext),
.priv_class = &asplit_class,
}

Definition at line 144 of file split.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: split.c:77
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
OFFSET
#define OFFSET(x)
Definition: split.c:101
split_uninit
static av_cold void split_uninit(AVFilterContext *ctx)
Definition: split.c:69
split_init
static av_cold int split_init(AVFilterContext *ctx)
Definition: split.c:45
FLAGS
#define FLAGS
Definition: split.c:102
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
SplitContext
Definition: split.c:40
NULL
#define NULL
Definition: coverity.c:32
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
AVFILTER_FLAG_DYNAMIC_OUTPUTS
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
Definition: avfilter.h:111
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
avfilter_af_asplit_inputs
static const AVFilterPad avfilter_af_asplit_inputs[]
Definition: split.c:135
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
avfilter_vf_split_inputs
static const AVFilterPad avfilter_vf_split_inputs[]
Definition: split.c:114