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

Go to the source code of this file.

Data Structures

struct  SubfileContext


#define OFFSET(field)   offsetof(SubfileContext, field)


static int slave_seek (URLContext *h)
static int subfile_open (URLContext *h, const char *filename, int flags, AVDictionary **options)
static int subfile_close (URLContext *h)
static int subfile_read (URLContext *h, unsigned char *buf, int size)
static int64_t subfile_seek (URLContext *h, int64_t pos, int whence)


static const AVOption subfile_options []
static const AVClass subfile_class
URLProtocol ff_subfile_protocol

Macro Definition Documentation

#define OFFSET (   field)    offsetof(SubfileContext, field)

Definition at line 35 of file subfile.c.

Definition at line 36 of file subfile.c.

Function Documentation

static int slave_seek ( URLContext h)

Definition at line 54 of file subfile.c.

Referenced by subfile_open(), and subfile_seek().

static int subfile_open ( URLContext h,
const char *  filename,
int  flags,
AVDictionary **  options 

Definition at line 69 of file subfile.c.

static int subfile_close ( URLContext h)

Definition at line 91 of file subfile.c.

static int subfile_read ( URLContext h,
unsigned char *  buf,
int  size 

Definition at line 97 of file subfile.c.

static int64_t subfile_seek ( URLContext h,
int64_t  pos,
int  whence 

Definition at line 112 of file subfile.c.

Variable Documentation

const AVOption subfile_options[]
Initial value:
= {
{ "start", "start offset", OFFSET(start), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D },
{ "end", "end offset", OFFSET(end), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, D },
{ NULL }

Definition at line 38 of file subfile.c.

const AVClass subfile_class
Initial value:
= {
.class_name = "subfile",
.item_name = av_default_item_name,
.option = subfile_options,

Definition at line 47 of file subfile.c.

URLProtocol ff_subfile_protocol
Initial value:
= {
.name = "subfile",
.url_open2 = subfile_open,
.url_read = subfile_read,
.url_seek = subfile_seek,
.url_close = subfile_close,
.priv_data_size = sizeof(SubfileContext),
.priv_data_class = &subfile_class,

Definition at line 139 of file subfile.c.