FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
tee.c File Reference
#include "libavutil/avutil.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "avformat.h"
#include "avio_internal.h"

Go to the source code of this file.

Data Structures

struct  TeeSlave
 
struct  TeeContext
 

Macros

#define DEFAULT_SLAVE_FAILURE_POLICY   ON_SLAVE_FAILURE_ABORT
 
#define STEAL_OPTION(option, field)
 

Enumerations

enum  SlaveFailurePolicy { ON_SLAVE_FAILURE_ABORT = 1, ON_SLAVE_FAILURE_IGNORE = 2 }
 

Functions

static int parse_slave_options (void *log, char *slave, AVDictionary **options, char **filename)
 
static int parse_bsfs (void *log_ctx, const char *bsfs_spec, AVBitStreamFilterContext **bsfs)
 Parse list of bitstream filters and add them to the list of filters pointed to by bsfs. More...
 
static int parse_slave_failure_policy_option (const char *opt, TeeSlave *tee_slave)
 
static int close_slave (TeeSlave *tee_slave)
 
static void close_slaves (AVFormatContext *avf)
 
static int open_slave (AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
 
static void log_slave (TeeSlave *slave, void *log_ctx, int log_level)
 
static int tee_process_slave_failure (AVFormatContext *avf, unsigned slave_idx, int err_n)
 
static int tee_write_header (AVFormatContext *avf)
 
static int tee_write_trailer (AVFormatContext *avf)
 
static int tee_write_packet (AVFormatContext *avf, AVPacket *pkt)
 

Variables

static const char *const slave_delim = "|"
 
static const char *const slave_opt_open = "["
 
static const char *const slave_opt_close = "]"
 
static const char *const slave_opt_delim = ":]"
 
static const char *const slave_bsfs_spec_sep = "/"
 
static const char *const slave_select_sep = ","
 
static const AVClass tee_muxer_class
 
AVOutputFormat ff_tee_muxer
 

Macro Definition Documentation

#define DEFAULT_SLAVE_FAILURE_POLICY   ON_SLAVE_FAILURE_ABORT

Definition at line 35 of file tee.c.

Referenced by parse_slave_failure_policy_option().

#define STEAL_OPTION (   option,
  field 
)
Value:
do { \
if ((entry = av_dict_get(options, option, NULL, 0))) { \
field = entry->value; \
entry->value = NULL; /* prevent it from being freed */ \
} \
} while (0)
#define NULL
Definition: coverity.c:32
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:39
const OptionDef options[]
Definition: ffserver.c:3969
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:69
option
Definition: libkvazaar.c:278
if(ret< 0)
Definition: vf_mcdeint.c:282

Referenced by open_slave().

Enumeration Type Documentation

Enumerator
ON_SLAVE_FAILURE_ABORT 
ON_SLAVE_FAILURE_IGNORE 

Definition at line 30 of file tee.c.

Function Documentation

static int parse_slave_options ( void log,
char *  slave,
AVDictionary **  options,
char **  filename 
)
static

Definition at line 69 of file tee.c.

Referenced by open_slave().

static int parse_bsfs ( void log_ctx,
const char *  bsfs_spec,
AVBitStreamFilterContext **  bsfs 
)
static

Parse list of bitstream filters and add them to the list of filters pointed to by bsfs.

The list must be specified in the form: BSFS ::= BSF[,BSFS]

Definition at line 114 of file tee.c.

Referenced by open_slave().

static int parse_slave_failure_policy_option ( const char *  opt,
TeeSlave tee_slave 
)
inlinestatic

Definition at line 147 of file tee.c.

Referenced by open_slave().

static int close_slave ( TeeSlave tee_slave)
static

Definition at line 164 of file tee.c.

Referenced by close_slaves(), tee_process_slave_failure(), and tee_write_trailer().

static void close_slaves ( AVFormatContext avf)
static

Definition at line 196 of file tee.c.

Referenced by tee_write_header().

static int open_slave ( AVFormatContext avf,
char *  slave,
TeeSlave tee_slave 
)
static

Definition at line 207 of file tee.c.

Referenced by tee_write_header().

static void log_slave ( TeeSlave slave,
void log_ctx,
int  log_level 
)
static

Definition at line 394 of file tee.c.

Referenced by tee_write_header().

static int tee_process_slave_failure ( AVFormatContext avf,
unsigned  slave_idx,
int  err_n 
)
static

Definition at line 418 of file tee.c.

Referenced by tee_write_header(), tee_write_packet(), and tee_write_trailer().

static int tee_write_header ( AVFormatContext avf)
static

Definition at line 440 of file tee.c.

static int tee_write_trailer ( AVFormatContext avf)
static

Definition at line 500 of file tee.c.

static int tee_write_packet ( AVFormatContext avf,
AVPacket pkt 
)
static

Definition at line 517 of file tee.c.

Variable Documentation

const char* const slave_delim = "|"
static

Definition at line 56 of file tee.c.

Referenced by tee_write_header().

const char* const slave_opt_open = "["
static

Definition at line 57 of file tee.c.

Referenced by parse_slave_options().

const char* const slave_opt_close = "]"
static

Definition at line 58 of file tee.c.

Referenced by parse_slave_options().

const char* const slave_opt_delim = ":]"
static

Definition at line 59 of file tee.c.

Referenced by parse_slave_options().

const char* const slave_bsfs_spec_sep = "/"
static

Definition at line 60 of file tee.c.

Referenced by open_slave().

const char* const slave_select_sep = ","
static

Definition at line 61 of file tee.c.

Referenced by open_slave().

const AVClass tee_muxer_class
static
Initial value:
= {
.class_name = "Tee muxer",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:70
av_default_item_name

Definition at line 63 of file tee.c.

AVOutputFormat ff_tee_muxer
Initial value:
= {
.name = "tee",
.long_name = NULL_IF_CONFIG_SMALL("Multiple muxer tee"),
.priv_data_size = sizeof(TeeContext),
.priv_class = &tee_muxer_class,
}
static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt)
Definition: tee.c:517
static int tee_write_trailer(AVFormatContext *avf)
Definition: tee.c:500
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVClass tee_muxer_class
Definition: tee.c:63
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
Definition: tee.c:49
static int flags
Definition: cpu.c:47
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:476
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:498
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:86
static int tee_write_header(AVFormatContext *avf)
Definition: tee.c:440

Definition at line 560 of file tee.c.