FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 "bufferqueue.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 FF_BUFQUEUE_SIZE   256
 
#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 void push_frame (AVFilterContext *ctx, unsigned in_no, AVFilterBufferRef *buf)
 
static void process_frame (AVFilterLink *inlink, AVFilterBufferRef *buf)
 
static AVFilterBufferRefget_video_buffer (AVFilterLink *inlink, int perms, int w, int h)
 
static AVFilterBufferRefget_audio_buffer (AVFilterLink *inlink, int perms, int nb_samples)
 
static int filter_frame (AVFilterLink *inlink, AVFilterBufferRef *buf)
 
static void close_input (AVFilterContext *ctx, unsigned in_no)
 
static void find_next_delta_ts (AVFilterContext *ctx)
 
static void send_silence (AVFilterContext *ctx, unsigned in_no, unsigned out_no)
 
static void flush_segment (AVFilterContext *ctx)
 
static int request_frame (AVFilterLink *outlink)
 
static av_cold int init (AVFilterContext *ctx, const char *args)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption concat_options []
 
AVFilter avfilter_avf_concat
 

Detailed Description

concat audio-video filter

Definition in file avf_concat.c.

Macro Definition Documentation

#define FF_BUFQUEUE_SIZE   256

Definition at line 31 of file avf_concat.c.

#define TYPE_ALL   2

Definition at line 37 of file avf_concat.c.

Referenced by init(), and query_formats().

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

Definition at line 55 of file avf_concat.c.

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 56 of file avf_concat.c.

Definition at line 57 of file avf_concat.c.

#define V   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 58 of file avf_concat.c.

Function Documentation

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

Definition at line 77 of file avf_concat.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 121 of file avf_concat.c.

Referenced by init().

static void push_frame ( AVFilterContext ctx,
unsigned  in_no,
AVFilterBufferRef buf 
)
static

Definition at line 159 of file avf_concat.c.

Referenced by decode_thread(), flush_segment(), and process_frame().

static void process_frame ( AVFilterLink inlink,
AVFilterBufferRef buf 
)
static

Definition at line 185 of file avf_concat.c.

Referenced by filter_frame().

static AVFilterBufferRef* get_video_buffer ( AVFilterLink inlink,
int  perms,
int  w,
int  h 
)
static

Definition at line 202 of file avf_concat.c.

Referenced by ff_get_video_buffer(), and init().

static AVFilterBufferRef* get_audio_buffer ( AVFilterLink inlink,
int  perms,
int  nb_samples 
)
static

Definition at line 212 of file avf_concat.c.

Referenced by init().

static int filter_frame ( AVFilterLink inlink,
AVFilterBufferRef buf 
)
static

Definition at line 222 of file avf_concat.c.

Referenced by init().

static void close_input ( AVFilterContext ctx,
unsigned  in_no 
)
static

Definition at line 228 of file avf_concat.c.

Referenced by request_frame().

static void find_next_delta_ts ( AVFilterContext ctx)
static

Definition at line 238 of file avf_concat.c.

Referenced by flush_segment().

static void send_silence ( AVFilterContext ctx,
unsigned  in_no,
unsigned  out_no 
)
static

Definition at line 251 of file avf_concat.c.

Referenced by flush_segment().

static void flush_segment ( AVFilterContext ctx)
static

Definition at line 281 of file avf_concat.c.

Referenced by request_frame().

static int request_frame ( AVFilterLink outlink)
static

Definition at line 307 of file avf_concat.c.

Referenced by init().

static av_cold int init ( AVFilterContext ctx,
const char *  args 
)
static

Definition at line 343 of file avf_concat.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 393 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 }, 2, INT_MAX, V|A|F},
{ "v", "specify the number of video streams",
OFFSET(nb_streams[AVMEDIA_TYPE_VIDEO]),
AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, V|F },
{ "a", "specify the number of audio streams",
OFFSET(nb_streams[AVMEDIA_TYPE_AUDIO]),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A|F},
{ "unsafe", "enable unsafe mode",
OFFSET(unsafe),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A|A|F},
{ 0 }
}

Definition at line 60 of file avf_concat.c.

AVFilter avfilter_avf_concat
Initial value:
= {
.name = "concat",
.description = NULL_IF_CONFIG_SMALL("Concatenate audio and video streams."),
.init = init,
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(ConcatContext),
.priv_class = &concat_class,
}

Definition at line 407 of file avf_concat.c.