FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
f_streamselect.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "formats.h"
#include "framesync.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  StreamSelectContext
 

Macros

#define OFFSET(x)   offsetof(StreamSelectContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 
#define astreamselect_options   streamselect_options
 

Functions

 AVFILTER_DEFINE_CLASS (streamselect)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int process_frame (FFFrameSync *fs)
 
static int request_frame (AVFilterLink *outlink)
 
static int config_output (AVFilterLink *outlink)
 
static int parse_definition (AVFilterContext *ctx, int nb_pads, void *filter_frame, int is_audio)
 
static int parse_mapping (AVFilterContext *ctx, const char *map)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (astreamselect)
 

Variables

static const AVOption streamselect_options []
 
AVFilter ff_vf_streamselect
 
AVFilter ff_af_astreamselect
 

Macro Definition Documentation

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

Definition at line 41 of file f_streamselect.c.

Definition at line 42 of file f_streamselect.c.

#define astreamselect_options   streamselect_options

Definition at line 340 of file f_streamselect.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( streamselect  )
static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 51 of file f_streamselect.c.

Referenced by init(), and parse_definition().

static int process_frame ( FFFrameSync fs)
static

Definition at line 57 of file f_streamselect.c.

Referenced by config_output().

static int request_frame ( AVFilterLink outlink)
static

Definition at line 93 of file f_streamselect.c.

Referenced by parse_definition().

static int config_output ( AVFilterLink outlink)
static

Definition at line 99 of file f_streamselect.c.

Referenced by parse_definition().

static int parse_definition ( AVFilterContext ctx,
int  nb_pads,
void filter_frame,
int  is_audio 
)
static

Definition at line 154 of file f_streamselect.c.

Referenced by init().

static int parse_mapping ( AVFilterContext ctx,
const char *  map 
)
static

Definition at line 189 of file f_streamselect.c.

Referenced by init(), and process_command().

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 248 of file f_streamselect.c.

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 261 of file f_streamselect.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 294 of file f_streamselect.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 304 of file f_streamselect.c.

AVFILTER_DEFINE_CLASS ( astreamselect  )

Variable Documentation

const AVOption streamselect_options[]
static
Initial value:
= {
{ "inputs", "number of input streams", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=2}, 2, INT_MAX, .flags=FLAGS },
{ "map", "input indexes to remap to outputs", OFFSET(map_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags=FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)

Definition at line 43 of file f_streamselect.c.

AVFilter ff_vf_streamselect
Initial value:
= {
.name = "streamselect",
.description = NULL_IF_CONFIG_SMALL("Select video streams"),
.init = init,
.query_formats = query_formats,
.process_command = process_command,
.uninit = uninit,
.priv_size = sizeof(StreamSelectContext),
.priv_class = &streamselect_class,
}
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static av_cold void uninit(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx)
static av_cold int init(AVFilterContext *ctx)
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:105
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
Definition: avfilter.h:111
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static int flags
Definition: cpu.c:47

Definition at line 328 of file f_streamselect.c.

AVFilter ff_af_astreamselect
Initial value:
= {
.name = "astreamselect",
.description = NULL_IF_CONFIG_SMALL("Select audio streams"),
.init = init,
.query_formats = query_formats,
.process_command = process_command,
.uninit = uninit,
.priv_size = sizeof(StreamSelectContext),
.priv_class = &astreamselect_class,
}
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static av_cold void uninit(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx)
static av_cold int init(AVFilterContext *ctx)
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:105
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
Definition: avfilter.h:111
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static int flags
Definition: cpu.c:47

Definition at line 343 of file f_streamselect.c.