FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
concatdec.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avformat.h"
#include "internal.h"
#include "url.h"

Go to the source code of this file.

Data Structures

struct  ConcatStream
 
struct  ConcatFile
 
struct  ConcatContext
 

Macros

#define FAIL(retcode)   do { ret = (retcode); goto fail; } while(0)
 
#define OFFSET(x)   offsetof(ConcatContext, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Enumerations

enum  ConcatMatchMode { MATCH_ONE_TO_ONE, MATCH_EXACT_ID }
 

Functions

static int concat_probe (AVProbeData *probe)
 
static char * get_keyword (uint8_t **cursor)
 
static int safe_filename (const char *f)
 
static int add_file (AVFormatContext *avf, char *filename, ConcatFile **rfile, unsigned *nb_files_alloc)
 
static int copy_stream_props (AVStream *st, AVStream *source_st)
 
static int detect_stream_specific (AVFormatContext *avf, int idx)
 
static int match_streams_one_to_one (AVFormatContext *avf)
 
static int match_streams_exact_id (AVFormatContext *avf)
 
static int match_streams (AVFormatContext *avf)
 
static int open_file (AVFormatContext *avf, unsigned fileno)
 
static int concat_read_close (AVFormatContext *avf)
 
static int concat_read_header (AVFormatContext *avf)
 
static int open_next_file (AVFormatContext *avf)
 
static int filter_packet (AVFormatContext *avf, ConcatStream *cs, AVPacket *pkt)
 
static int concat_read_packet (AVFormatContext *avf, AVPacket *pkt)
 
static void rescale_interval (AVRational tb_in, AVRational tb_out, int64_t *min_ts, int64_t *ts, int64_t *max_ts)
 
static int try_seek (AVFormatContext *avf, int stream, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
 
static int real_seek (AVFormatContext *avf, int stream, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
 
static int concat_seek (AVFormatContext *avf, int stream, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
 

Variables

static const AVOption options []
 
static const AVClass concat_class
 
AVInputFormat ff_concat_demuxer
 

Macro Definition Documentation

#define FAIL (   retcode)    do { ret = (retcode); goto fail; } while(0)

Definition at line 96 of file concatdec.c.

Referenced by add_file(), and concat_read_header().

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

Definition at line 602 of file concatdec.c.

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 603 of file concatdec.c.

Enumeration Type Documentation

Enumerator:
MATCH_ONE_TO_ONE 
MATCH_EXACT_ID 

Definition at line 30 of file concatdec.c.

Function Documentation

static int concat_probe ( AVProbeData probe)
static

Definition at line 60 of file concatdec.c.

static char* get_keyword ( uint8_t **  cursor)
static

Definition at line 66 of file concatdec.c.

Referenced by concat_read_header().

static int safe_filename ( const char *  f)
static

Definition at line 77 of file concatdec.c.

Referenced by add_file().

static int add_file ( AVFormatContext avf,
char *  filename,
ConcatFile **  rfile,
unsigned *  nb_files_alloc 
)
static

Definition at line 98 of file concatdec.c.

Referenced by concat_read_header().

static int copy_stream_props ( AVStream st,
AVStream source_st 
)
static

Definition at line 153 of file concatdec.c.

Referenced by match_streams_exact_id(), and match_streams_one_to_one().

static int detect_stream_specific ( AVFormatContext avf,
int  idx 
)
static

Definition at line 177 of file concatdec.c.

Referenced by match_streams().

static int match_streams_one_to_one ( AVFormatContext avf)
static

Definition at line 198 of file concatdec.c.

Referenced by match_streams().

static int match_streams_exact_id ( AVFormatContext avf)
static

Definition at line 218 of file concatdec.c.

Referenced by match_streams().

static int match_streams ( AVFormatContext avf)
static

Definition at line 240 of file concatdec.c.

Referenced by concat_read_packet(), and open_file().

static int open_file ( AVFormatContext avf,
unsigned  fileno 
)
static

Definition at line 277 of file concatdec.c.

Referenced by concat_read_header(), open_files(), open_next_file(), and real_seek().

static int concat_read_close ( AVFormatContext avf)
static

Definition at line 307 of file concatdec.c.

Referenced by concat_read_header().

static int concat_read_header ( AVFormatContext avf)
static

Definition at line 322 of file concatdec.c.

static int open_next_file ( AVFormatContext avf)
static

Definition at line 419 of file concatdec.c.

Referenced by concat_read_packet().

static int filter_packet ( AVFormatContext avf,
ConcatStream cs,
AVPacket pkt 
)
static

Definition at line 432 of file concatdec.c.

Referenced by concat_read_packet().

static int concat_read_packet ( AVFormatContext avf,
AVPacket pkt 
)
static

Definition at line 472 of file concatdec.c.

static void rescale_interval ( AVRational  tb_in,
AVRational  tb_out,
int64_t *  min_ts,
int64_t *  ts,
int64_t *  max_ts 
)
static

Definition at line 513 of file concatdec.c.

Referenced by real_seek(), and try_seek().

static int try_seek ( AVFormatContext avf,
int  stream,
int64_t  min_ts,
int64_t  ts,
int64_t  max_ts,
int  flags 
)
static

Definition at line 523 of file concatdec.c.

Referenced by real_seek().

static int real_seek ( AVFormatContext avf,
int  stream,
int64_t  min_ts,
int64_t  ts,
int64_t  max_ts,
int  flags 
)
static

Definition at line 541 of file concatdec.c.

Referenced by concat_seek().

static int concat_seek ( AVFormatContext avf,
int  stream,
int64_t  min_ts,
int64_t  ts,
int64_t  max_ts,
int  flags 
)
static

Definition at line 578 of file concatdec.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "safe", "enable safe mode",
OFFSET(safe), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, DEC },
{ "auto_convert", "automatically convert bitstream format",
OFFSET(auto_convert), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC },
{ NULL }
}

Definition at line 605 of file concatdec.c.

const AVClass concat_class
static
Initial value:
= {
.class_name = "concat demuxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 613 of file concatdec.c.

AVInputFormat ff_concat_demuxer
Initial value:
= {
.name = "concat",
.long_name = NULL_IF_CONFIG_SMALL("Virtual concatenation script"),
.priv_data_size = sizeof(ConcatContext),
.read_seek2 = concat_seek,
.priv_class = &concat_class,
}

Definition at line 621 of file concatdec.c.