35 #define OFFSET(field) offsetof(SubfileContext, field)
36 #define D AV_OPT_FLAG_DECODING_PARAM
100 int64_t rest = c->
end - c->
pos;
105 size =
FFMIN(size, rest);
115 int64_t new_pos = -1;
122 new_pos = c->
start + pos;
128 new_pos = c->
end + c->
pos;
131 if (new_pos < c->
start)
146 .priv_data_class = &subfile_class,
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)
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)
#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...
int ffurl_open(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
Create an URLContext for accessing to the resource indicated by url, and open it. ...
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...