Go to the documentation of this file.
34 #define OFFSET(field) offsetof(SubfileContext, field)
35 #define D AV_OPT_FLAG_DECODING_PARAM
77 if (
c->end <=
c->start) {
83 options,
h->protocol_whitelist,
h->protocol_blacklist,
h);
103 int64_t rest =
c->end -
c->pos;
118 int64_t new_pos, end;
128 return end -
c->start;
131 new_pos =
c->start +
pos;
134 new_pos =
c->pos +
pos;
140 if (new_pos < c->start)
145 return c->pos -
c->start;
156 .default_whitelist =
"file",
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
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.
#define AVERROR_EOF
End of file.
#define AVSEEK_SIZE
ORing this as the "whence" parameter to a seek function causes it to return the filesize without seek...
static int subfile_open(URLContext *h, const char *filename, int flags, AVDictionary **options)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
static int subfile_read(URLContext *h, unsigned char *buf, int size)
const char * av_default_item_name(void *ptr)
Return the context name.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
const OptionDef options[]
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
static const AVClass subfile_class
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
int ffurl_closep(URLContext **hh)
Close the resource accessed by the URLContext h, and free the memory used by it.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
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.
static const AVOption subfile_options[]
#define flags(name, subs,...)
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
static int slave_seek(URLContext *h)
const URLProtocol ff_subfile_protocol
static int subfile_close(URLContext *h)