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

Go to the source code of this file.

Data Structures

struct  TeeSlave
 
struct  TeeContext
 

Macros

#define MAX_SLAVES   16
 
#define STEAL_OPTION(option, field)
 

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.
 
static int open_slave (AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
 
static void close_slaves (AVFormatContext *avf)
 
static void log_slave (TeeSlave *slave, void *log_ctx, int log_level)
 
static int tee_write_header (AVFormatContext *avf)
 
static int filter_packet (void *log_ctx, AVPacket *pkt, AVFormatContext *fmt_ctx, AVBitStreamFilterContext *bsf_ctx)
 
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 AVClass tee_muxer_class
 
AVOutputFormat ff_tee_muxer
 

Macro Definition Documentation

#define MAX_SLAVES   16

Definition at line 28 of file tee.c.

Referenced by tee_write_header().

#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 */ \
av_dict_set(&options, option, NULL, 0); \
} \
} while (0)

Referenced by open_slave().

Function Documentation

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

Definition at line 57 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 102 of file tee.c.

Referenced by open_slave().

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

Definition at line 135 of file tee.c.

Referenced by tee_write_header().

static void close_slaves ( AVFormatContext avf)
static

Definition at line 288 of file tee.c.

Referenced by tee_write_header(), and tee_write_trailer().

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

Definition at line 315 of file tee.c.

Referenced by tee_write_header().

static int tee_write_header ( AVFormatContext avf)
static

Definition at line 339 of file tee.c.

static int filter_packet ( void log_ctx,
AVPacket pkt,
AVFormatContext fmt_ctx,
AVBitStreamFilterContext bsf_ctx 
)
static

Definition at line 388 of file tee.c.

Referenced by tee_write_packet().

static int tee_write_trailer ( AVFormatContext avf)
static

Definition at line 427 of file tee.c.

static int tee_write_packet ( AVFormatContext avf,
AVPacket pkt 
)
static

Definition at line 450 of file tee.c.

Variable Documentation

const char* const slave_delim = "|"
static

Definition at line 45 of file tee.c.

Referenced by tee_write_header().

const char* const slave_opt_open = "["
static

Definition at line 46 of file tee.c.

Referenced by parse_slave_options().

const char* const slave_opt_close = "]"
static

Definition at line 47 of file tee.c.

Referenced by parse_slave_options().

const char* const slave_opt_delim = ":]"
static

Definition at line 48 of file tee.c.

Referenced by parse_slave_options().

const char* const slave_bsfs_spec_sep = "/"
static

Definition at line 49 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,
}

Definition at line 51 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,
}

Definition at line 488 of file tee.c.