Anonymous typedef structs prevent forward declaration, this
change gives the AVIOContext and AVIOInterruptCB structures
a name. These structures are now in line with other common
structures such as AVFormatContext and AVCodecContext.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Fix this warning:
libavformat/aviobuf.c:663:20: warning: assignment discards qualifiers from pointer target type
Although this is a public header, it should remain source and
binary compatible.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Allows avoiding the buffer when using avio read, write and seek functions.
When using the ffmpeg executable -avioflags direct can be used to enable
this mode for input files, but has no effect on output files.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This isn't used in practice anywhere within libav at the moment,
but change it for consistency until it is removed.
URL_RDONLY/WRONLY were fixed in commit 5b81e29593 (after the
values that actually were used were changed at the major bump,
in commit cbea3ac8), but this flag was unintentionally left unfixed.
Signed-off-by: Martin Storsjö <martin@martin.st>
This definition is in two files, since the definitions will move
to the private header at the next bump.
Signed-off-by: Martin Storsjö <martin@martin.st>
The interrupt callback has to be passed in during opening (setting it
after opening isn't enough), since a blocking open couldn't be
interrupted otherwise.
Options are passed down to procotols and also need to be available
during open() in most cases.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This is a better io interrupt callback function, which has an
opaque parameter, which is given to the interrupt callback.
This allows callers to precisely cancel IO for one single
AVFormatContext, without interrupt other ones in the same
process.
Note, it's not needed in AVIOContext, at the moment.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Before this, almost all module groups have been used for grouping functions
and fields in structures semantically. This causes them to not appear
properly in the file documentation and needlessly clutters up the "Modules"
index.
Additionally, this commit streamlines some spelling and appearances.
This helps catching cases where the format string doesn't
match what is passed in, or injection bugs where user data
is passed in as format string.
Signed-off-by: Martin Storsjö <martin@martin.st>
While deprecated, they're totally useless as long as their values
are different from the AVIO_FLAG values that are used internally.
Currently, this leads to old libav applications still compiling
correctly (since we haven't removed the fallback wrappers), but
failing since the functions internally compare to the new AVIO_FLAG
values.
These should be removed at some point, but they aren't removed yet.
The intent is to be able to recompile an old application against
the new ABI without modifying the code, and this doesn't work
currently.
Signed-off-by: Martin Storsjö <martin@martin.st>
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.
This breaks API.
The new function is more flexible than url_exist(), as it allows to
specify which access flags to check, and does not require an explicit
open of the checked resource.
Signed-off-by: Anton Khirnov <anton@khirnov.net>