FFmpeg
Data Structures | Macros | Functions | Variables
avf_concat.c File Reference

concat audio-video filter More...

#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "filters.h"
#include "internal.h"
#include "video.h"
#include "audio.h"

Go to the source code of this file.

Data Structures

struct  ConcatContext
 
struct  ConcatContext::concat_in
 

Macros

#define TYPE_ALL   2
 
#define OFFSET(x)   offsetof(ConcatContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM
 
#define F   AV_OPT_FLAG_FILTERING_PARAM
 
#define V   AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (concat)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int push_frame (AVFilterContext *ctx, unsigned in_no, AVFrame *buf)
 
static AVFrameget_video_buffer (AVFilterLink *inlink, int w, int h)
 
static AVFrameget_audio_buffer (AVFilterLink *inlink, int nb_samples)
 
static void close_input (AVFilterContext *ctx, unsigned in_no)
 
static void find_next_delta_ts (AVFilterContext *ctx, int64_t *seg_delta)
 
static int send_silence (AVFilterContext *ctx, unsigned in_no, unsigned out_no, int64_t seg_delta)
 
static int flush_segment (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int activate (AVFilterContext *ctx)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 

Variables

static const AVOption concat_options []
 
AVFilter ff_avf_concat
 

Detailed Description

concat audio-video filter

Definition in file avf_concat.c.

Macro Definition Documentation

#define TYPE_ALL   2

Definition at line 36 of file avf_concat.c.

Referenced by init(), and query_formats().

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

Definition at line 53 of file avf_concat.c.

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 54 of file avf_concat.c.

Definition at line 55 of file avf_concat.c.

#define V   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 56 of file avf_concat.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( concat  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 75 of file avf_concat.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 120 of file avf_concat.c.

Referenced by init().

static int push_frame ( AVFilterContext ctx,
unsigned  in_no,
AVFrame buf 
)
static

Definition at line 174 of file avf_concat.c.

Referenced by activate(), and check_size().

static AVFrame* get_video_buffer ( AVFilterLink inlink,
int  w,
int  h 
)
static

Definition at line 199 of file avf_concat.c.

Referenced by ff_get_video_buffer(), and init().

static AVFrame* get_audio_buffer ( AVFilterLink inlink,
int  nb_samples 
)
static

Definition at line 208 of file avf_concat.c.

Referenced by init().

static void close_input ( AVFilterContext ctx,
unsigned  in_no 
)
static

Definition at line 217 of file avf_concat.c.

Referenced by activate().

static void find_next_delta_ts ( AVFilterContext ctx,
int64_t *  seg_delta 
)
static

Definition at line 227 of file avf_concat.c.

Referenced by flush_segment().

static int send_silence ( AVFilterContext ctx,
unsigned  in_no,
unsigned  out_no,
int64_t  seg_delta 
)
static

Definition at line 241 of file avf_concat.c.

Referenced by flush_segment().

static int flush_segment ( AVFilterContext ctx)
static

Definition at line 274 of file avf_concat.c.

Referenced by activate(), and process_command().

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 301 of file avf_concat.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 346 of file avf_concat.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 358 of file avf_concat.c.

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

Definition at line 433 of file avf_concat.c.

Variable Documentation

const AVOption concat_options[]
static
Initial value:
= {
{ "n", "specify the number of segments", OFFSET(nb_segments),
AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, V|A|F},
{ "v", "specify the number of video streams",
AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, V|F },
{ "a", "specify the number of audio streams",
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A|F},
{ "unsafe", "enable unsafe mode",
OFFSET(unsafe),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, V|A|F},
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define V
Definition: avf_concat.c:56
static int nb_streams
Definition: ffprobe.c:280
#define A
Definition: avf_concat.c:54
#define OFFSET(x)
Definition: avf_concat.c:53
#define F
Definition: avf_concat.c:55

Definition at line 58 of file avf_concat.c.

AVFilter ff_avf_concat
Initial value:
= {
.name = "concat",
.description = NULL_IF_CONFIG_SMALL("Concatenate audio and video streams."),
.init = init,
.uninit = uninit,
.query_formats = query_formats,
.activate = activate,
.priv_size = sizeof(ConcatContext),
.priv_class = &concat_class,
}
#define NULL
Definition: coverity.c:32
static av_cold int init(AVFilterContext *ctx)
Definition: avf_concat.c:301
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:105
static av_cold void uninit(AVFilterContext *ctx)
Definition: avf_concat.c:346
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
Definition: avfilter.h:111
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: avf_concat.c:433
static int activate(AVFilterContext *ctx)
Definition: avf_concat.c:358
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVClass concat_class
Definition: concatdec.c:777
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int query_formats(AVFilterContext *ctx)
Definition: avf_concat.c:75

Definition at line 446 of file avf_concat.c.