FFmpeg
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
 
const URLProtocol ff_subfile_protocol
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 35 of file subfile.c.

◆ D

Definition at line 36 of file subfile.c.

Function Documentation

◆ slave_seek()

static int slave_seek ( URLContext h)
static

Definition at line 54 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 69 of file subfile.c.

◆ subfile_close()

static int subfile_close ( URLContext h)
static

Definition at line 95 of file subfile.c.

◆ subfile_read()

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

Definition at line 101 of file subfile.c.

◆ subfile_seek()

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

Definition at line 116 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 38 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 47 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 149 of file subfile.c.

end
static av_cold int end(AVCodecContext *avctx)
Definition: avrndec.c:90
start
void INT64 start
Definition: avisynth_c.h:767
OFFSET
#define OFFSET(field)
Definition: subfile.c:35
subfile_open
static int subfile_open(URLContext *h, const char *filename, int flags, AVDictionary **options)
Definition: subfile.c:69
D
#define D
Definition: subfile.c:36
AV_OPT_TYPE_INT64
@ AV_OPT_TYPE_INT64
Definition: opt.h:224
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:101
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
subfile_class
static const AVClass subfile_class
Definition: subfile.c:47
subfile_seek
static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
Definition: subfile.c:116
subfile_options
static const AVOption subfile_options[]
Definition: subfile.c:38
SubfileContext
Definition: subfile.c:27
subfile_close
static int subfile_close(URLContext *h)
Definition: subfile.c:95