35 #define OFFSET(field) offsetof(SubfileContext, field)
36 #define D AV_OPT_FLAG_DECODING_PARAM
101 int64_t rest = c->
end - c->
pos;
106 size =
FFMIN(size, rest);
116 int64_t new_pos = -1;
123 new_pos = c->
start + pos;
129 new_pos = c->
end + c->
pos;
132 if (new_pos < c->
start)
147 .priv_data_class = &subfile_class,
148 .default_whitelist =
"file",
static int slave_seek(URLContext *h)
#define LIBAVUTIL_VERSION_INT
AVIOInterruptCB interrupt_callback
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static av_cold int end(AVCodecContext *avctx)
URLProtocol ff_subfile_protocol
const OptionDef options[]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const AVOption subfile_options[]
static int subfile_read(URLContext *h, unsigned char *buf, int size)
const char * protocol_whitelist
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
static int subfile_open(URLContext *h, const char *filename, int flags, AVDictionary **options)
int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist)
Create an URLContext for accessing to the resource indicated by url, and open it. ...
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Describe the class of an AVClass context structure.
int ffurl_close(URLContext *h)
static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
int64_t ffurl_seek(URLContext *h, int64_t pos, int whence)
Change the position that will be used by the next read/write operation on the resource accessed by h...
static int subfile_close(URLContext *h)
#define AVSEEK_SIZE
Passing this as the "whence" parameter to a seek function causes it to return the filesize without se...
unbuffered private I/O API
static const AVClass subfile_class
int ffurl_read(URLContext *h, unsigned char *buf, int size)
Read up to size bytes from the resource accessed by h, and store the read bytes in buf...