Commit Graph

150 Commits

Author SHA1 Message Date
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
Ronald S. Bultje f0a8039464 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
deprecated by this patch and will be removed at the next major API bump.

Originally committed as revision 17779 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 17:04:51 +00:00
Stefano Sabatini 65c40e4e3a Rename register_protocol() to av_register_protocol() and deprecate
register_protocol().

Originally committed as revision 17322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-15 14:25:23 +00:00
Ramiro Polla bc574408dc Only special-case absolute DOS paths on systems that support them.
Originally committed as revision 15594 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-10 16:59:37 +00:00
Diego Biurrun bc5c918ea8 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://svn.ffmpeg.org/ffmpeg/trunk
2008-10-03 10:16:29 +00:00
Ronald S. Bultje ba99cfc213 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://svn.ffmpeg.org/ffmpeg/trunk
2008-08-19 23:44:23 +00:00
Diego Biurrun 245976da2a Use full path for #includes from another directory.
Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-09 11:56:36 +00:00
Michael Niedermayer abbae514e1 Check url_seek() in url_open().
Originally committed as revision 13061 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-05 09:17:56 +00:00
Björn Axelsson 5acef35f57 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://svn.ffmpeg.org/ffmpeg/trunk
2008-03-10 19:03:39 +00:00
Guillaume LecrefECERF 727601bc4b 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://svn.ffmpeg.org/ffmpeg/trunk
2008-01-08 22:07:59 +00:00
Michael Niedermayer b075e52059 Make recently added and still unused read_seek functions return offset_t.
Originally committed as revision 11274 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-19 21:11:08 +00:00
Michael Niedermayer 502bdf6893 Merge recently added and still unused play and pause functions.
Originally committed as revision 11273 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-19 20:57:13 +00:00
Michael Niedermayer 2e9b86ac12 Remove dead code which disappeared with the last major version bump.
Originally committed as revision 11268 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-19 11:31:36 +00:00
Michael Niedermayer 84be6e7239 av_*_next() API for libavformat
Originally committed as revision 11206 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-12 19:01:58 +00:00
Björn Axelsson 536333a0fe 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://svn.ffmpeg.org/ffmpeg/trunk
2007-11-24 07:09:32 +00:00
Alex Beregszaszi 7a813b368a Call prot->url_close only if it is present.
Originally committed as revision 11044 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-16 00:14:48 +00:00
Thorsten Jordan 346db900bf Check context before accessing its field.
Patch by Thorsten Jordan: tjordan macrosystem de

Originally committed as revision 10939 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-11-07 08:34:00 +00:00
Panagiotis Issaris 6f3e0b2174 Replace all occurrences of AVERROR_IO with AVERROR(EIO).
Originally committed as revision 9760 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-19 15:23:32 +00:00
Måns Rullgård 75e61b0e88 use new string functions
based on patch by Reimar Döffinger

Originally committed as revision 9401 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-06-23 23:10:32 +00:00
Panagiotis Issaris c306748c29 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://svn.ffmpeg.org/ffmpeg/trunk
2007-03-05 14:26:50 +00:00
François Revol 8fa36ae09d 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.
Please from now on use return AVERROR(EFOO) instead of the ugly return -EFOO in your code.
This also removes the need for berrno.h.

Originally committed as revision 7965 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-02-13 18:26:14 +00:00
Ronald S. Bultje eabbae730c 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)
filesize.
Patch by Ronald S. Bultje % rbultje A ronald P bitfreak P net %
Original thread:
date: Jan 2, 2007 2:11 AM
subject: [Ffmpeg-devel] Re: [PATCH] file length handling

Originally committed as revision 7765 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-30 10:37:52 +00:00
Ronald S. Bultje 621810045c 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

Originally committed as revision 7506 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-14 22:07:19 +00:00
Michael Niedermayer 1ae2c5f2e7 fix indention of previous commit
Originally committed as revision 7396 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-01 21:49:50 +00:00
Michael Niedermayer 8e287af090 seekless filesize retrieving support in 7 lines of code, also doesnt break compatibility
Originally committed as revision 7395 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-01 21:49:09 +00:00
Diego Biurrun b78e7197a8 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://svn.ffmpeg.org/ffmpeg/trunk
2006-10-07 15:30:46 +00:00
Gildas Bazin 04f46ced8c 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://svn.ffmpeg.org/ffmpeg/trunk
2006-01-21 18:36:32 +00:00
Diego Biurrun 5509bffa88 Update licensing information: The FSF changed postal address.
Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
2006-01-12 22:43:26 +00:00
Diego Biurrun 115329f160 COSMETICS: Remove all trailing whitespace.
Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2005-12-17 18:14:38 +00:00
Diego Biurrun a9e3509529 Replace CONFIG_ENCODERS/CONFIG_DECODERS with CONFIG_MUXERS/CONFIG_DEMUXERS
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://svn.ffmpeg.org/ffmpeg/trunk
2005-09-23 00:25:41 +00:00
Mike Melanson 0bd586c50d sweeping change from -EIO -> AVERROR_IO
Originally committed as revision 3239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-06-19 03:59:34 +00:00
Michael Niedermayer 31290c2b9b avoid seeking to the end, as it confuses some crappy code
Originally committed as revision 2996 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-04-11 02:07:31 +00:00
Mike Melanson 764ef40015 disable encoders where appropriate (patch courtesy of BERO
<bero -at- geocities.co.jp>)

Originally committed as revision 2375 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-10-14 04:15:53 +00:00
Fabrice Bellard 4358d5def3 removed ctype.h header
Originally committed as revision 2225 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-09-08 20:04:44 +00:00
Fabrice Bellard 019ac05ace added primitive aborting system
Originally committed as revision 2058 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-07-17 10:25:36 +00:00
Fabrice Bellard 5d5fef0af1 avoid false URL protocol detection when using ':' in filenames
Originally committed as revision 1595 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-02-21 11:08:08 +00:00
Fabrice Bellard f746a04616 added url_get_filename()
Originally committed as revision 1438 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-01-11 04:59:17 +00:00
Fabrice Bellard abac617591 renamed libav to libavformat
Originally committed as revision 1276 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-11-25 19:07:40 +00:00