| Branch: | Revision:

ffmpeg / libavformat / avio.c @ c76374c6

History | View | Annotate | Download (9.44 KB)

# Date Author Comment
c76374c6 03/15/2011 12:09 PM Nicolas George

Use AVERROR_EXIT with url_interrupt_cb.

Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be...

688c22e0 03/07/2011 07:56 PM Baptiste Coudurier

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...

8f73c060 03/06/2011 10:29 PM Martin Storsjö


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....

90441276 02/06/2011 01:29 AM Nicolas George

Non-blocking protocol: core wrapper functions

Signed-off-by: Nicolas George <>
Signed-off-by: Ronald S. Bultje <>

0ada32c3 10/06/2010 11:40 AM Carl Eugen Hoyos

Remove unused variable.

Originally committed as revision 25369 to svn://

fe5feaeb 10/06/2010 11:18 AM Michael Niedermayer

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://

a46f7516 10/06/2010 11:18 AM Michael Niedermayer

Factor retry_transfer_wrapper() out of url_read_complete()

Originally committed as revision 25367 to svn://

0a216bd1 09/30/2010 10:51 AM Stefano Sabatini

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)...

6ed04040 09/26/2010 02:25 PM Michael Niedermayer

Move AVOptions from libavcodec to libavutil

Originally committed as revision 25210 to svn://

838b27b4 08/19/2010 09:21 PM Aurelien Jacobs

add FF_API_REGISTER_PROTOCOL define to disable the deprecated
register_protocol() function

Originally committed as revision 24840 to svn://

404eba44 08/19/2010 04:49 PM Aurelien Jacobs

add FF_API_URL_CLASS define to enable usage of URLContext as a AVClass

Originally committed as revision 24835 to svn://

2bab5d3e 07/18/2010 06:38 PM Måns Rullgård

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....

8b4845c0 06/27/2010 05:51 PM Eli Friedman

Remove an unused label, fixing a warning

Patch by Eli Friedman, eli dot friedman at gmail

Originally committed as revision 23828 to svn://

805488f0 06/27/2010 05:33 PM Eli Friedman

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://

02174293 06/23/2010 11:26 AM Martin Storsjö


Originally committed as revision 23735 to svn://

735cf6b2 06/22/2010 02:09 PM Martin Storsjö

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://

ffbb289a 06/22/2010 02:03 PM Martin Storsjö

Split url_open and url_open_protocol into url_alloc and url_connect

Originally committed as revision 23704 to svn://

9b07a2dc 06/22/2010 01:58 PM Martin Storsjö

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://

27241cbf 06/01/2010 07:46 AM Martin Storsjö

Declare the url_write buffer parameter as const

Originally committed as revision 23401 to svn://

2308b6c1 04/28/2010 08:00 PM Michael Niedermayer

Add version to AVClass so we can add to and use fields of AVClass without ABI issues.

Originally committed as revision 22987 to svn://

28894105 04/18/2010 05:37 PM Stefano Sabatini

Make url_seek() return AVERROR rather than AVERROR in
the case where the seek operation is not defined in the protocol

Originally committed as revision 22901 to svn://

493f54ad 03/15/2010 10:54 PM Michael Niedermayer

Add AVSEEK_FORCE flag to indicate that the code should attempt to seek
by any means.

Originally committed as revision 22557 to svn://

67d4b3f2 03/05/2010 10:30 PM Martin Storsjö

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://

31277aeb 01/28/2010 09:11 AM Daniel Kristjansson

Use av_mallocz in url_open_protocol for URLContext.
Patch by Daniel Kristjansson: danielk cuymedia net

Originally committed as revision 21501 to svn://

f1d2b572 01/24/2010 06:09 PM Reimar Döffinger

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://

ddb901b7 01/23/2010 10:23 AM Reimar Döffinger

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://

48fdb66c 01/17/2010 01:39 PM Måns Rullgård

Fix comment typo carefull -> careful

Spotted by someone on IRC.

Originally committed as revision 21261 to svn://

0e848977 06/04/2009 06:25 AM Kostya Shishkov

Move function for reading whole specified amount of data from RTSP
demuxer into more common place.

Originally committed as revision 19087 to svn://

f0a80394 03/03/2009 05:04 PM Ronald S. Bultje

Add url_get_file_handle(), which is used to get the file descriptor
associated with the I/O handle (e.g. the fd returned by open()). See
"[RFC] rtsp.c EOF support" thread.

There were previously some URI-specific implementations of the same idea,
e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are...

65c40e4e 02/15/2009 02:25 PM Stefano Sabatini

Rename register_protocol() to av_register_protocol() and deprecate

Originally committed as revision 17322 to svn://

bc574408 10/10/2008 04:59 PM Ramiro Polla

Only special-case absolute DOS paths on systems that support them.

Originally committed as revision 15594 to svn://

bc5c918e 10/03/2008 10:16 AM Diego Biurrun

Remove offset_t typedef and use int64_t directly instead.
The name offset_t is easily confused with the standard off_t type and
*_t is POSIX reserved namespace if any POSIX header is included.

Originally committed as revision 15533 to svn://

ba99cfc2 08/19/2008 11:44 PM Ronald S. Bultje

Implement url_open_protocol(), which is basiclly the former url_open()
but which opens a URLProtocol instead of a filename. url_open() is
reimplemented to call url_open_protocol(). See discussion on
"url_open_protocol" on ffmpeg-devel.

Originally committed as revision 14857 to svn://

245976da 05/09/2008 11:56 AM Diego Biurrun

Use full path for #includes from another directory.

Originally committed as revision 13098 to svn://

abbae514 05/05/2008 09:17 AM Michael Niedermayer

Check url_seek() in url_open().

Originally committed as revision 13061 to svn://

5acef35f 03/10/2008 07:03 PM Björn Axelsson

Add AVClass to URLContext at next major version bump

Patch by Björn Axelsson (bjorn axelsson intinor se)

Originally committed as revision 12411 to svn://

727601bc 01/08/2008 10:07 PM Guillaume LecrefECERF

url_write is part of the public API so it may not be under ifdef.
Also fixes a compile error if all muxers and protocols are disabled.
Patch by Guillaume LECERF (foxcore gmail com)

Originally committed as revision 11469 to svn://

b075e520 12/19/2007 09:11 PM Michael Niedermayer

Make recently added and still unused read_seek functions return offset_t.

Originally committed as revision 11274 to svn://

502bdf68 12/19/2007 08:57 PM Michael Niedermayer

Merge recently added and still unused play and pause functions.

Originally committed as revision 11273 to svn://

2e9b86ac 12/19/2007 11:31 AM Michael Niedermayer

Remove dead code which disappeared with the last major version bump.

Originally committed as revision 11268 to svn://

84be6e72 12/12/2007 07:01 PM Michael Niedermayer

av_*_next() API for libavformat

Originally committed as revision 11206 to svn://

536333a0 11/24/2007 07:09 AM Björn Axelsson

Extend URLProtocol with new function pointers and api functions for
av_url_read_play(), av_url_read_pause() and av_url_read_seek().

patch by: Björn Axelsson, bjorn d axelsson a intinor d se

Originally committed as revision 11086 to svn://

7a813b36 11/16/2007 12:14 AM Alex Beregszaszi

Call prot->url_close only if it is present.

Originally committed as revision 11044 to svn://

346db900 11/07/2007 08:34 AM Thorsten Jordan

Check context before accessing its field.
Patch by Thorsten Jordan: tjordan macrosystem de

Originally committed as revision 10939 to svn://

6f3e0b21 07/19/2007 03:23 PM Panagiotis Issaris

Replace all occurrences of AVERROR_IO with AVERROR.

Originally committed as revision 9760 to svn://

75e61b0e 06/23/2007 11:10 PM Måns Rullgård

use new string functions
based on patch by Reimar Döffinger

Originally committed as revision 9401 to svn://

c306748c 03/05/2007 02:26 PM Panagiotis Issaris

Move avio.h's url_get_max_packet_size() comment from source to header file.
Remove the comment section of url_set_interrupt_cb() which was a duplicate as it
appeared identically in both the header and the source file.

Originally committed as revision 8259 to svn://

8fa36ae0 02/13/2007 06:26 PM François Revol

This fixes error handling for BeOS, removing the need for some ifdefs.
AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h.
Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed....

eabbae73 01/30/2007 10:37 AM Ronald S. Bultje

protect the size=seek(SEEK_END,-1)+1 results with an if (.. < 0), else the
return value may still end up being zero (if the seek returns -1, which is
e.g. what file.c will return on error), which is a valid (but incorrect)
Patch by Ronald S. Bultje % rbultje A ronald P bitfreak P net %...

62181004 01/14/2007 10:07 PM Ronald S. Bultje

makes the filename member of the URLContext a pointer, so that the
structure can be extended in the future without breaking ABI.
patch by Ronald S. Bultje % rbultje A ronald P bitfreak P net %
Original thread:
Date: Jan 1, 2007 6:01 PM
Subject: [Ffmpeg-devel] make URLContext->filename a pointer...

1ae2c5f2 01/01/2007 09:49 PM Michael Niedermayer

fix indention of previous commit

Originally committed as revision 7396 to svn://

8e287af0 01/01/2007 09:49 PM Michael Niedermayer

seekless filesize retrieving support in 7 lines of code, also doesnt break compatibility

Originally committed as revision 7395 to svn://

b78e7197 10/07/2006 03:30 PM Diego Biurrun

Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://

04f46ced 01/21/2006 06:36 PM Gildas Bazin

Add --disable-protocols option to configure to disable I/O protocol from
libavformat. Also fix build with --disable-muxers and --disable-ffserver.
patch by Gildas Bazin < gbazin @** altern **. org >

Originally committed as revision 4879 to svn://

5509bffa 01/12/2006 10:43 PM Diego Biurrun

Update licensing information: The FSF changed postal address.

Originally committed as revision 4842 to svn://

115329f1 12/17/2005 06:14 PM Diego Biurrun

COSMETICS: Remove all trailing whitespace.

Originally committed as revision 4749 to svn://

a9e35095 09/23/2005 12:25 AM Diego Biurrun

in libavformat to allow building (de)coders and (de)muxers independently at
some point + support for this option in configure.

Originally committed as revision 4611 to svn://

0bd586c5 06/19/2004 03:59 AM Mike Melanson

sweeping change from -EIO -> AVERROR_IO

Originally committed as revision 3239 to svn://

31290c2b 04/11/2004 02:07 AM Michael Niedermayer

avoid seeking to the end, as it confuses some crappy code

Originally committed as revision 2996 to svn://

764ef400 10/14/2003 04:15 AM Mike Melanson

disable encoders where appropriate (patch courtesy of BERO
<bero at>)

Originally committed as revision 2375 to svn://

4358d5de 09/08/2003 08:04 PM Fabrice Bellard

removed ctype.h header

Originally committed as revision 2225 to svn://

019ac05a 07/17/2003 10:25 AM Fabrice Bellard

added primitive aborting system

Originally committed as revision 2058 to svn://

5d5fef0a 02/21/2003 11:08 AM Fabrice Bellard

avoid false URL protocol detection when using ':' in filenames

Originally committed as revision 1595 to svn://

f746a046 01/11/2003 04:59 AM Fabrice Bellard

added url_get_filename()

Originally committed as revision 1438 to svn://

abac6175 11/25/2002 07:07 PM Fabrice Bellard

renamed libav to libavformat

Originally committed as revision 1276 to svn://