FFmpeg
Data Structures | Macros | Functions | Variables
subfile.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.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
 
const URLProtocol ff_subfile_protocol
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 34 of file subfile.c.

◆ D

Definition at line 35 of file subfile.c.

Function Documentation

◆ slave_seek()

static int slave_seek ( URLContext h)
static

Definition at line 53 of file subfile.c.

Referenced by subfile_open(), and subfile_seek().

◆ subfile_open()

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

Definition at line 68 of file subfile.c.

◆ subfile_close()

static int subfile_close ( URLContext h)
static

Definition at line 94 of file subfile.c.

◆ subfile_read()

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

Definition at line 100 of file subfile.c.

◆ subfile_seek()

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

Definition at line 115 of file subfile.c.

Variable Documentation

◆ subfile_options

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 37 of file subfile.c.

◆ subfile_class

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

Definition at line 46 of file subfile.c.

◆ ff_subfile_protocol

const 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,
.default_whitelist = "file",
}

Definition at line 150 of file subfile.c.

OFFSET
#define OFFSET(field)
Definition: subfile.c:34
subfile_open
static int subfile_open(URLContext *h, const char *filename, int flags, AVDictionary **options)
Definition: subfile.c:68
D
#define D
Definition: subfile.c:35
AV_OPT_TYPE_INT64
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
Definition: opt.h:263
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
subfile_read
static int subfile_read(URLContext *h, unsigned char *buf, int size)
Definition: subfile.c:100
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
subfile_class
static const AVClass subfile_class
Definition: subfile.c:46
subfile_seek
static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
Definition: subfile.c:115
subfile_options
static const AVOption subfile_options[]
Definition: subfile.c:37
SubfileContext
Definition: subfile.c:26
subfile_close
static int subfile_close(URLContext *h)
Definition: subfile.c:94