Martin Storsjö
acb074301c
avio: Only do implicit network initialization for network protocols
...
The implicit network initialization is set to be removed in the
future, but is kept for compatibility. By not doing the implicit
initialization for non-network protocols, we avoid the warning
about avformat_network_init() not being called for these, where
it really doesn't make much sense.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
ad9e0ed170
avio: fix handling of , in urls
...
Fixes Ticket805
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
58030fc6c8
avio: Fix handling of filenames that contain :
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6161c41817
avio: Support private options in URLProtocols
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c12e1bd1bc
avio: allow any chars in protocols
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
45f511ece7
avio: Mark the old interrupt callback mechanism as deprecated
...
Prepare for removing it at an upcoming major bump.
13 years ago
Martin Storsjö
1dee0aca74
avio: add avio_open2, taking an interrupt callback and options
...
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>
13 years ago
Anton Khirnov
ddffc2fdc3
avio: add support for passing options to protocols.
...
Not used anywhere yet, support for passing options from avio_open() will
follow.
13 years ago
Anton Khirnov
163a31136d
avio: add and use ffurl_protocol_next().
13 years ago
Martin Storsjö
6f1b7b3944
avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc
...
Change all uses of these function to pass the relevant
callback on.
13 years ago
Martin Storsjö
9957cdbfd5
avformat: Use ff_check_interrupt
13 years ago
Martin Storsjö
c4a090ddb5
avio: Add an internal utility function for checking the new interrupt callback
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Martin Storsjö
d10361b658
avio: Free URLContext private data allocated via AVOptions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
728e6d979b
avio: print a warning from ffurl_alloc() if no protocols are allocated.
...
Fixes Ticket618
Based on code by teratorn
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
124e28847b
Remove some stray unnecessary ffmpeg references.
13 years ago
Reimar Döffinger
06a9da7365
Simplify code and avoid compiler warning about incompatible types.
14 years ago
Anton Khirnov
f0029cbcf6
lavf: use designated initializers for AVClasses.
14 years ago
Diego Biurrun
046f081b46
configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
...
Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems
since it causes certain system functions to be hidden on some (BSD) systems.
The solution is to only add the flag on systems that really require it, i.e.
glibc-based ones.
This change makes BSD systems compile out-of-the-box without the need for
adding specific flags manually. It also allows dropping a number of flags
set manually on a file-per-file basis, but were only present to work around
breakage introduced by the presence of _POSIX_C_SOURCE.
Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions
in several places already, so it is preferable to define it globally instead
of littering source files with individual #defines only needed for glibc.
14 years ago
Anton Khirnov
4a7a1b7def
lavf: use designated initializers for AVClasses.
14 years ago
Michael Niedermayer
e3323a1cbd
Fix some passing argument from incompatible pointer type warnings.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Nicolas George
b9553cf4b8
avio: fix AVIO_FLAG_READ/WRITE test in ffurl_*.
...
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
14 years ago
Martin Storsjö
26f6b8c571
avio: Fix sanity checks in ffurl_read*
...
This fixes e.g. reading data over HTTP, where the underlying
socket is set to read/write.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
59d96941f0
avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
...
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.
14 years ago
Anton Khirnov
7f804085f1
lavf: remove FF_API_URL_CLASS cruft.
14 years ago
Anton Khirnov
dcd4a7b62f
lavf: remove FF_API_REGISTER_PROTOCOL cruft
14 years ago
Anton Khirnov
4bde56d1af
avio: deprecate url_exist in favor of avio_check.
14 years ago
Stefano Sabatini
175389c854
avio: add avio_check()
...
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>
14 years ago
Anton Khirnov
cdc6a87f19
avio: deprecate av_protocol_next().
14 years ago
Anton Khirnov
f8270bbf8c
avio: add a function for iterating though protocol names.
14 years ago
Anton Khirnov
026e175775
avio: deprecate the typedef for URLInterruptCB
...
There's no particular reason to pollute the namespace with a typedef for
it.
14 years ago
Anton Khirnov
8e76a19b63
avio: make av_register_protocol2 internal.
14 years ago
Anton Khirnov
80c6e238b0
avio: avio_ prefix for url_set_interrupt_cb.
14 years ago
Anton Khirnov
f87b1b373a
avio: AVIO_ prefixes for URL_ open flags.
14 years ago
Anton Khirnov
1305d93c42
avio: deprecate av_url_read_seek
...
It's not used anywhere internally.
Salvage its documentation for ffio_read_seek.
14 years ago
Anton Khirnov
fa104e14ab
avio: deprecate av_url_read_pause
...
It's not used anywhere internally.
Salvage its documentation for ffio_read_pause.
14 years ago
Michael Niedermayer
6114bffa91
retry_transfer_wrapper: only call interrupt callback when less than requested is r/w.
...
Its a waste of cpu cycles otherwise
14 years ago
Anton Khirnov
727c7aa026
avio: deprecate url_get_filename().
...
URLContext.filename should be used directly.
14 years ago
Anton Khirnov
5958df341d
avio: deprecate url_max_packet_size().
...
URLContext.max_packet_size should be used directly.
14 years ago
Anton Khirnov
1869ea03b7
avio: make url_get_file_handle() internal.
14 years ago
Anton Khirnov
32a97d4630
avio: make url_filesize() internal.
14 years ago
Anton Khirnov
e52a9145c8
avio: make url_close() internal.
14 years ago
Anton Khirnov
58a48c6511
avio: make url_seek() internal.
14 years ago
Anton Khirnov
925e908bc7
avio: make url_write() internal.
14 years ago
Anton Khirnov
dce3756459
avio: make url_read_complete() internal.
14 years ago
Anton Khirnov
bc371aca46
avio: make url_read() internal.
14 years ago
Anton Khirnov
0589da0aa5
avio: make url_open() internal.
14 years ago
Anton Khirnov
62eaaeacb5
avio: make url_connect internal.
14 years ago
Anton Khirnov
5652bb9471
avio: make url_alloc internal.
14 years ago
Anton Khirnov
333e894363
avio: deprecate url_open_protocol
...
The unbuffered API will be made private and it's not used anywhere
internally.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago