concatdec.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avformat.h"
#include "internal.h"
Include dependency graph for concatdec.c:

Go to the source code of this file.

Data Structures

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
 

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 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 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 DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 379 of file concatdec.c.

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

Definition at line 79 of file concatdec.c.

Referenced by add_file(), and concat_read_header().

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

Definition at line 378 of file concatdec.c.

Function Documentation

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

Definition at line 81 of file concatdec.c.

Referenced by concat_read_header().

static int concat_probe ( AVProbeData probe)
static

Definition at line 43 of file concatdec.c.

static int concat_read_close ( AVFormatContext avf)
static

Definition at line 147 of file concatdec.c.

Referenced by concat_read_header().

static int concat_read_header ( AVFormatContext avf)
static

Definition at line 160 of file concatdec.c.

static int concat_read_packet ( AVFormatContext avf,
AVPacket pkt 
)
static

Definition at line 268 of file concatdec.c.

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 354 of file concatdec.c.

static char* get_keyword ( uint8_t **  cursor)
static

Definition at line 49 of file concatdec.c.

Referenced by concat_read_header().

static int open_file ( AVFormatContext avf,
unsigned  fileno 
)
static

Definition at line 126 of file concatdec.c.

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

static int open_next_file ( AVFormatContext avf)
static

Definition at line 255 of file concatdec.c.

Referenced by concat_read_packet().

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 317 of file concatdec.c.

Referenced by concat_seek().

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 289 of file concatdec.c.

Referenced by real_seek(), and try_seek().

static int safe_filename ( const char *  f)
static

Definition at line 60 of file concatdec.c.

Referenced by add_file().

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 299 of file concatdec.c.

Referenced by real_seek().

Variable Documentation

const AVClass concat_class
static
Initial value:
= {
.class_name = "concat demuxer",
.item_name = av_default_item_name,
.option = options,
}
av_default_item_name
static const AVOption options[]
Definition: concatdec.c:381
LIBAVUTIL_VERSION_INT
Definition: eval.c:55

Definition at line 387 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,
}
static int concat_read_close(AVFormatContext *avf)
Definition: concatdec.c:147
static int concat_seek(AVFormatContext *avf, int stream, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Definition: concatdec.c:354
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
static int concat_read_header(AVFormatContext *avf)
Definition: concatdec.c:160
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int concat_probe(AVProbeData *probe)
Definition: concatdec.c:43
static int read_probe(AVProbeData *pd)
static const AVClass concat_class
Definition: concatdec.c:387
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:517
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114
static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
Definition: concatdec.c:268

Definition at line 395 of file concatdec.c.

const AVOption options[]
static
Initial value:
= {
{ "safe", "enable safe mode",
OFFSET(safe), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, DEC },
{ NULL }
}
#define DEC
Definition: concatdec.c:379
NULL
Definition: eval.c:55
#define OFFSET(x)
Definition: concatdec.c:378

Definition at line 381 of file concatdec.c.