35 #define OFFSET(field) offsetof(SubfileContext, field)
36 #define D AV_OPT_FLAG_DECODING_PARAM
78 if (
c->end <=
c->start) {
84 options,
h->protocol_whitelist,
h->protocol_blacklist,
h);
130 return end -
c->start;
132 new_pos =
c->start +
pos;
135 new_pos =
c->pos +
pos;
143 if (new_pos < c->start)
148 return c->pos -
c->start;
159 .default_whitelist =
"file",
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
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.
int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist, URLContext *parent)
Create an URLContext for accessing to the resource indicated by url, and open it.
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.
int ffurl_closep(URLContext **hh)
Close the resource accessed by the URLContext h, and free the memory used by it.
#define AVSEEK_SIZE
ORing this as the "whence" parameter to a seek function causes it to return the filesize without seek...
#define flags(name, subs,...)
const OptionDef options[]
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
#define AVERROR_EOF
End of file.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
const URLProtocol ff_subfile_protocol
static int slave_seek(URLContext *h)
static const AVClass subfile_class
static int subfile_read(URLContext *h, unsigned char *buf, int size)
static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
static int subfile_close(URLContext *h)
static const AVOption subfile_options[]
static int subfile_open(URLContext *h, const char *filename, int flags, AVDictionary **options)
unbuffered private I/O API