FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
f_sendcmd.c File Reference

send commands filter More...

#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/file.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "internal.h"
#include "avfiltergraph.h"
#include "audio.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  Command
 
struct  Interval
 
struct  SendCmdContext
 

Macros

#define COMMAND_FLAG_ENTER   1
 
#define COMMAND_FLAG_LEAVE   2
 
#define OFFSET(x)   offsetof(SendCmdContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM
 
#define SPACES   " \f\t\n\r"
 
#define COMMAND_DELIMS   " \f\t\n\r,;"
 
#define DELIMS   " \f\t\n\r,;"
 
#define WITHIN_INTERVAL(ts, start_ts, end_ts)   ((ts) >= (start_ts) && (ts) < (end_ts))
 

Functions

static char * make_command_flags_str (AVBPrint *pbuf, int flags)
 
static void skip_comments (const char **buf)
 
static int parse_command (Command *cmd, int cmd_count, int interval_count, const char **buf, void *log_ctx)
 
static int parse_commands (Command **cmds, int *nb_cmds, int interval_count, const char **buf, void *log_ctx)
 
static int parse_interval (Interval *interval, int interval_count, const char **buf, void *log_ctx)
 
static int parse_intervals (Interval **intervals, int *nb_intervals, const char *buf, void *log_ctx)
 
static int cmp_intervals (const void *a, const void *b)
 
static av_cold int init (AVFilterContext *ctx, const char *args, const AVClass *class)
 
static void av_cold uninit (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFilterBufferRef *ref)
 

Variables

static const AVOption options []
 

Detailed Description

send commands filter

Definition in file f_sendcmd.c.

Macro Definition Documentation

#define COMMAND_FLAG_ENTER   1

Definition at line 37 of file f_sendcmd.c.

Referenced by filter_frame(), and parse_command().

#define COMMAND_FLAG_LEAVE   2

Definition at line 38 of file f_sendcmd.c.

Referenced by filter_frame(), and parse_command().

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

Definition at line 82 of file f_sendcmd.c.

#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM

Definition at line 83 of file f_sendcmd.c.

#define SPACES   " \f\t\n\r"
#define COMMAND_DELIMS   " \f\t\n\r,;"

Definition at line 111 of file f_sendcmd.c.

Referenced by parse_command().

#define DELIMS   " \f\t\n\r,;"

Definition at line 247 of file f_sendcmd.c.

Referenced by parse_interval().

#define WITHIN_INTERVAL (   ts,
  start_ts,
  end_ts 
)    ((ts) >= (start_ts) && (ts) < (end_ts))

Referenced by filter_frame().

Function Documentation

static char* make_command_flags_str ( AVBPrint pbuf,
int  flags 
)
inlinestatic

Definition at line 40 of file f_sendcmd.c.

Referenced by filter_frame(), init(), and parse_commands().

static void skip_comments ( const char **  buf)
static

Definition at line 94 of file f_sendcmd.c.

Referenced by parse_intervals().

static int parse_command ( Command cmd,
int  cmd_count,
int  interval_count,
const char **  buf,
void log_ctx 
)
static

Definition at line 113 of file f_sendcmd.c.

Referenced by parse_commands().

static int parse_commands ( Command **  cmds,
int *  nb_cmds,
int  interval_count,
const char **  buf,
void log_ctx 
)
static

Definition at line 197 of file f_sendcmd.c.

Referenced by parse_interval().

static int parse_interval ( Interval interval,
int  interval_count,
const char **  buf,
void log_ctx 
)
static

Definition at line 249 of file f_sendcmd.c.

Referenced by parse_intervals().

static int parse_intervals ( Interval **  intervals,
int *  nb_intervals,
const char *  buf,
void log_ctx 
)
static

Definition at line 312 of file f_sendcmd.c.

Referenced by init().

static int cmp_intervals ( const void a,
const void b 
)
static

Definition at line 360 of file f_sendcmd.c.

Referenced by init().

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

Definition at line 371 of file f_sendcmd.c.

static void av_cold uninit ( AVFilterContext ctx)
static

Definition at line 431 of file f_sendcmd.c.

static int filter_frame ( AVFilterLink inlink,
AVFilterBufferRef ref 
)
static

Definition at line 451 of file f_sendcmd.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "commands", "set commands", OFFSET(commands_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
{ "c", "set commands", OFFSET(commands_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
{ "filename", "set commands file", OFFSET(commands_filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
{ "f", "set commands file", OFFSET(commands_filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
{NULL},
}

Definition at line 84 of file f_sendcmd.c.