FFmpeg
 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
 

Macros

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

Functions

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)
 

Variables

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)
static

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 
)
static

Definition at line 69 of file subfile.c.

static int subfile_close ( URLContext h)
static

Definition at line 91 of file subfile.c.

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

Definition at line 97 of file subfile.c.

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

Definition at line 112 of file subfile.c.

Variable Documentation

const AVOption subfile_options[]
static
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
static
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.