36#define OFFSET(field) offsetof(SubfileContext, field)
37#define D AV_OPT_FLAG_DECODING_PARAM
49 .class_name =
"subfile",
79 if (
c->end <=
c->start) {
85 options,
h->protocol_whitelist,
h->protocol_blacklist,
h);
129 return end -
c->start;
134 new_pos =
c->pos +
av_clip(
pos, -(
c->pos -
c->start), end -
c->pos);
137 new_pos = end +
av_clip(
pos, -(end -
c->start), 0);
142 if (new_pos < c->start)
147 return c->pos -
c->start;
158 .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_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.
int ffurl_closep(URLContext **hh)
Close the resource accessed by the URLContext h, and free the memory used by it.
#define AVSEEK_SIZE
Passing this as the "whence" parameter to a seek function causes it to return the filesize without se...
#define flags(name, subs,...)
common internal and external API header
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
#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
const URLProtocol ff_subfile_protocol
Describe the class of an AVClass context structure.
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
static 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 ffurl_read(URLContext *h, uint8_t *buf, int size)
Read up to size bytes from the resource accessed by h, and store the read bytes in buf.