Commit Graph

87 Commits

Author SHA1 Message Date
Anton Khirnov cdc6a87f19 avio: deprecate av_protocol_next(). 2011-04-08 17:48:53 +02:00
Anton Khirnov f8270bbf8c avio: add a function for iterating though protocol names. 2011-04-08 17:48:44 +02:00
Anton Khirnov 026e175775 avio: deprecate the typedef for URLInterruptCB
There's no particular reason to pollute the namespace with a typedef for
it.
2011-04-08 07:07:58 +02:00
Anton Khirnov 8e76a19b63 avio: make av_register_protocol2 internal. 2011-04-07 18:11:24 +02:00
Anton Khirnov 80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Anton Khirnov f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Anton Khirnov 1305d93c42 avio: deprecate av_url_read_seek
It's not used anywhere internally.

Salvage its documentation for ffio_read_seek.
2011-04-05 08:40:27 +02:00
Anton Khirnov fa104e14ab avio: deprecate av_url_read_pause
It's not used anywhere internally.

Salvage its documentation for ffio_read_pause.
2011-04-05 08:39:40 +02:00
Anton Khirnov 727c7aa026 avio: deprecate url_get_filename().
URLContext.filename should be used directly.
2011-04-04 17:45:20 +02:00
Anton Khirnov 5958df341d avio: deprecate url_max_packet_size().
URLContext.max_packet_size should be used directly.
2011-04-04 17:45:20 +02:00
Anton Khirnov 1869ea03b7 avio: make url_get_file_handle() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov 32a97d4630 avio: make url_filesize() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov e52a9145c8 avio: make url_close() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov 58a48c6511 avio: make url_seek() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov 925e908bc7 avio: make url_write() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov dce3756459 avio: make url_read_complete() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov bc371aca46 avio: make url_read() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov 0589da0aa5 avio: make url_open() internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov 62eaaeacb5 avio: make url_connect internal. 2011-04-04 17:45:20 +02:00
Anton Khirnov 5652bb9471 avio: make url_alloc internal. 2011-04-04 17:45:19 +02:00
Anton Khirnov 333e894363 avio: deprecate url_open_protocol
The unbuffered API will be made private and it's not used anywhere
internally.
2011-04-04 07:46:29 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Nicolas George c76374c6db Use AVERROR_EXIT with url_interrupt_cb.
Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR(EINTR) was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be
restarted.

This fixes roundup issues 2657 and 2659 (ffplay not exiting for streamed
content).

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:09:19 -04:00
Baptiste Coudurier 688c22e033 In retry_transfer_wrapper, do not check url_interrupt_cb, causes problems
when writing and pressing q during encoding. Instead, check url_interrupt_cb
at the end.

Note that when a protocol is interrupted by url_interrupt_cb, some data may
be silently discarded: the protocol context is not suitable for anything
anymore.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 14:56:25 -05:00
Martin Storsjö 8f73c06077 URLProtocol: Add URL_PROTOCOL_FLAG_NESTED_SCHEME
If this flag is set, the protocol can handle URLs where the
scheme is a nested scheme such as applehttp+file: - the protocol
can handle any URL where the first segment of the nested scheme
belongs to this protocol.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-06 23:29:39 +01:00
Nicolas George 90441276e4 Non-blocking protocol: core wrapper functions
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 20:29:59 -05:00
Carl Eugen Hoyos 0ada32c373 Remove unused variable.
Originally committed as revision 25369 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 11:40:09 +00:00
Michael Niedermayer fe5feaeb76 Use retry_transfer_wrapper() in url_write() as its callers do not expect it to stop in the middle.
Originally committed as revision 25368 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 11:18:43 +00:00
Michael Niedermayer a46f7516ec Factor retry_transfer_wrapper() out of url_read_complete()
Originally committed as revision 25367 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 11:18:38 +00:00
Stefano Sabatini 0a216bd1dd Make register_protocol() use the function av_register_protocol2()
rather than av_register_protocol(), which is deprecated.
Fix the GCC warning:
avio.c: In function ‘register_protocol’:
avio.c:93: warning: ‘av_register_protocol’ is deprecated (declared at avio.c:86)

Originally committed as revision 25267 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 10:51:22 +00:00
Michael Niedermayer 6ed040408b Move AVOptions from libavcodec to libavutil
Originally committed as revision 25210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 14:25:22 +00:00
Aurelien Jacobs 838b27b42c add FF_API_REGISTER_PROTOCOL define to disable the deprecated
register_protocol() function

Originally committed as revision 24840 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-19 21:21:32 +00:00
Aurelien Jacobs 404eba44b1 add FF_API_URL_CLASS define to enable usage of URLContext as a AVClass
Originally committed as revision 24835 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-19 16:49:08 +00:00
Måns Rullgård 2bab5d3e73 Allow all valid (and only valid) characters in URL scheme for url_open()
The URL specification allows letters, numbers, plus, hyphen, and period
in the scheme part.  The isalpha() test would allow additional characters
depending on locale settings while rejecting numbers and punctuation.

Originally committed as revision 24306 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-18 18:38:23 +00:00
Eli Friedman 8b4845c0b0 Remove an unused label, fixing a warning
Patch by Eli Friedman, eli dot friedman at gmail

Originally committed as revision 23828 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 17:51:17 +00:00
Eli Friedman 805488f0e2 Add proper const declaration to a cast, fixes a warning
Patch by Eli Friedman, eli dot friedman at gmail

Originally committed as revision 23827 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 17:33:52 +00:00
Martin Storsjö 02174293c6 Reindent
Originally committed as revision 23735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-23 11:26:43 +00:00
Martin Storsjö 735cf6b265 Add priv_data_size and priv_data_class to URLProtocol
This allows url_alloc to allocate and initialize the priv_data.

Originally committed as revision 23706 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 14:09:08 +00:00
Martin Storsjö ffbb289a1d Split url_open and url_open_protocol into url_alloc and url_connect
Originally committed as revision 23704 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 14:03:37 +00:00
Martin Storsjö 9b07a2dc02 Add an av_register_protocol2 function that takes a size parameter
This allows extending the URLProtocol struct without breaking binary
compatibility with code compiled with older definitions of the struct.

Originally committed as revision 23702 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 13:58:48 +00:00
Martin Storsjö 27241cbffe Declare the url_write buffer parameter as const
Originally committed as revision 23401 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-01 07:46:23 +00:00
Michael Niedermayer 2308b6c19a Add version to AVClass so we can add to and use fields of AVClass without ABI issues.
Originally committed as revision 22987 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-28 20:00:23 +00:00
Stefano Sabatini 28894105c8 Make url_seek() return AVERROR(ENOSYS) rather than AVERROR(EPIPE) in
the case where the seek operation is not defined in the protocol
handler.

Originally committed as revision 22901 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-18 17:37:16 +00:00
Michael Niedermayer 493f54ada0 Add AVSEEK_FORCE flag to indicate that the code should attempt to seek
by any means.

Originally committed as revision 22557 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-15 22:54:22 +00:00
Martin Storsjö 67d4b3f205 Always call ff_network_init/ff_network_close when opening protocols
ff_network_init is a no-op on all platforms except windows, and on
windows the performance penalty is minimal (less than 1 ms in my tests).

Originally committed as revision 22224 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-05 22:30:21 +00:00
Daniel Kristjansson 31277aebd9 Use av_mallocz in url_open_protocol for URLContext.
Patch by Daniel Kristjansson: danielk cuymedia net

Originally committed as revision 21501 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 09:11:26 +00:00
Reimar Döffinger f1d2b5728c Make url_read_complete handle EAGAIN more intelligently.
Only retry 2 - 5 times in quick succession and afterwards sleep a bit
to avoid creating high CPU load without any progress.

Originally committed as revision 21427 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:09:46 +00:00
Reimar Döffinger ddb901b74d Make url_read_complete retry on EAGAIN and return how much data it read
if it reached EOF, making it useful in more cases.

Originally committed as revision 21393 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 10:23:47 +00:00
Måns Rullgård 48fdb66c68 Fix comment typo carefull -> careful
Spotted by someone on IRC.

Originally committed as revision 21261 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 13:39:34 +00:00
Kostya Shishkov 0e848977ce Move function for reading whole specified amount of data from RTSP
demuxer into more common place.

Originally committed as revision 19087 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-04 06:25:53 +00:00