FFmpeg
Loading...
Searching...
No Matches
f_streamselect.c File Reference
#include "libavutil/avstring.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 "framesync.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  StreamSelectContext
 

Macros

#define OFFSET(x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 
#define TFLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS_EXT (streamselect, "(a)streamselect", streamselect_options)
 
static int process_frame (FFFrameSync *fs)
 
static int activate (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int parse_definition (AVFilterContext *ctx, int nb_pads, int is_input, 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)
 

Variables

static const AVOption streamselect_options []
 
const FFFilter ff_vf_streamselect
 
const FFFilter ff_af_astreamselect
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 42 of file f_streamselect.c.

◆ FLAGS

◆ TFLAGS

Function Documentation

◆ AVFILTER_DEFINE_CLASS_EXT()

AVFILTER_DEFINE_CLASS_EXT ( streamselect ,
"(a)streamselect" ,
streamselect_options  )

◆ process_frame()

static int process_frame ( FFFrameSync * fs)
static

Definition at line 53 of file f_streamselect.c.

◆ activate()

static int activate ( AVFilterContext * ctx)
static

Definition at line 93 of file f_streamselect.c.

◆ config_output()

static int config_output ( AVFilterLink * outlink)
static

Definition at line 99 of file f_streamselect.c.

◆ parse_definition()

static int parse_definition ( AVFilterContext * ctx,
int nb_pads,
int is_input,
int is_audio )
static

Definition at line 155 of file f_streamselect.c.

Referenced by init().

◆ parse_mapping()

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

Definition at line 184 of file f_streamselect.c.

Referenced by init(), and process_command().

◆ 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 243 of file f_streamselect.c.

◆ init()

static av_cold int init ( AVFilterContext * ctx)
static

Definition at line 256 of file f_streamselect.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext * ctx)
static

Definition at line 289 of file f_streamselect.c.

Variable Documentation

◆ streamselect_options

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=TFLAGS },
{ NULL }
}
#define TFLAGS
Definition af_afade.c:66
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275

Definition at line 45 of file f_streamselect.c.

Referenced by AVFILTER_DEFINE_CLASS_EXT().

◆ ff_vf_streamselect

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

Definition at line 299 of file f_streamselect.c.

◆ ff_af_astreamselect

const FFFilter ff_af_astreamselect
Initial value:
= {
.p.name = "astreamselect",
.p.description = NULL_IF_CONFIG_SMALL("Select audio streams"),
.p.priv_class = &streamselect_class,
.init = init,
.process_command = process_command,
.uninit = uninit,
.activate = activate,
.priv_size = sizeof(StreamSelectContext),
}

Definition at line 311 of file f_streamselect.c.