summaryrefslogtreecommitdiff
path: root/libavformat/tcp.c
Commit message (Collapse)AuthorAge
* tcp: make connect() timeout properlyLuca Barbato2011-05-27
| | | | | The connect() timeout can take minutes, gets misreported as EIO and isn't interruptible.
* libavformat: Make protocols pass URLContext as log context where availableMartin Storsjö2011-04-20
| | | | | | | Since the libavformat major bump, URLContext contains an AVClass, making it a usable log context. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: use designated initializers for all protocolsAnton Khirnov2011-04-08
| | | | | This is more readable and makes it easier to reorder URLProtocol members.
* avio: move extern url_interrupt_cb declaration from avio.h to url.hAnton Khirnov2011-04-07
|
* avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-07
|
* proto: introduce listen option in tcpLuca Barbato2011-04-07
| | | | | | This way is possible to have simple micro-server act like ffmpeg -i file.nut -vcodec copy -acodec copy -f nut tcp://foo:1234?listen
* proto: factor ff_network_wait_fd and use it on udpLuca Barbato2011-04-07
| | | | | | | | Support the URL_FLAG_NONBLOCK semantic and uniform the protocol. The quick retry loop is already part of retry_transfer_wrapper. The polling routine is common to the network protocols: udp, tcp and, once merged, sctp.
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Use AVERROR_EXIT with url_interrupt_cb.Nicolas George2011-03-15
| | | | | | | | | | | | | 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>
* libavformat: Remove FF_NETERRNO()Martin Storsjö2011-02-23
| | | | | | | | | | | | | | Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR() error codes. Provide fallback definitions of other errno.h network errors, mapping them to the corresponding winsock errors. This eases catching these error codes in common code, without having to distinguish between FF_NETERRNO(EAGAIN) and AVERROR(EAGAIN). This fixes roundup issue 2614, unbreaking blocking network IO on windows. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Non-blocking protocol: TCPNicolas George2011-02-05
| | | | | Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* TCP: factor the poll() callNicolas George2011-02-03
| | | | | Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* os: replace select with pollLuca Barbato2011-01-28
| | | | | Select has limitations on the fd values it could accept and silently breaks when it is reached.
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.
* tcp: Check url_interrupt_cb if connect was interrupted by a signalThomas Guillem2010-12-14
| | | | | | | | This makes it possible to abort a blocking connect call. Patch by Thomas Guillem, thomas dot guillem at gmail Originally committed as revision 26014 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove two instances of AVERROR(ff_neterrno()), because ff_neterrno() itselfRonald S. Bultje2010-11-04
| | | | | | already does AVERROR(). Originally committed as revision 25671 to svn://svn.ffmpeg.org/ffmpeg/trunk
* tcp: Check both wfds and efds when waiting for the result from connectMartin Storsjö2010-09-21
| | | | | | | | On windows, a connection failure doesn't trigger wfds as it does on unix. This fixes issue 2237, based on code by yeyingxian. Originally committed as revision 25154 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Print error messages in case of connection failure or name resolution failureRonald S. Bultje2010-08-14
| | | | | | in tcp.c. Originally committed as revision 24796 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make ff_url_split() publicMåns Rullgård2010-06-27
| | | | | | | ff_url_split() is retained as an alias, as it was used by ffserver, to avoid breaking ABI compatibility with it. Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Declare the url_write buffer parameter as constMartin Storsjö2010-06-01
| | | | Originally committed as revision 23401 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Don't report EINTR from select as an error, retry select insteadMartin Storsjö2010-03-26
| | | | Originally committed as revision 22694 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move ff_url_split() and ff_url_join() declarations to internal.hAurelien Jacobs2010-03-14
| | | | | | those functions are not part of the public API Originally committed as revision 22534 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename url_split to ff_url_splitMartin Storsjö2010-03-08
| | | | | | Since this function isn't in the public API, it should have an ff_ prefix. Originally committed as revision 22321 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Don't explicitly initialize networking in the tcp and udp protocolsMartin Storsjö2010-03-05
| | | | | | Networking is always initialized when opening protocols. Originally committed as revision 22227 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix BSD compile (PF_UNSPEC is not a standard define, AF_UNSPEC is).Ronald S. Bultje2010-01-27
| | | | Originally committed as revision 21490 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use getaddrinfo() instead of resolve_host(). Patch by Martin StorsjöMartin Storsjö2010-01-11
| | | | | | <$firstname()$firstname,st>. Originally committed as revision 21147 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use ff_neterrno instead of errno in tcp.c.Martin Storsjö2009-07-15
| | | | | | | | | | If ff_neterrno() is checked instead of errno, that's probably what should be used in the return value. As a sideeffect, this gives better compatibility with Windows (CE), where network errors aren't visible in errno.) patch by Martin Storsjö, martin martin st Originally committed as revision 19433 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add url_get_file_handle(), which is used to get the file descriptorRonald S. Bultje2009-03-03
| | | | | | | | | | | 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
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-13
| | | | | | They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
* only include sys/select.h if present, fix mingw compilationBaptiste Coudurier2008-09-26
| | | | Originally committed as revision 15420 to svn://svn.ffmpeg.org/ffmpeg/trunk
* include sys/select.h to get select, according to posix 2001,Baptiste Coudurier2008-09-24
| | | | | | fix compilation on freebsd 5.5 Originally committed as revision 15406 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove check for @ in tcp.c which removes the authorization data from theRonald S. Bultje2008-08-24
| | | | | | | | actual hostname. This functionality already exists (and always existed) in url_split() and is therefore useless. See discussion in "[PATCH] tcp.c/udp.c memleak?" thread on ffmpeg-devel. Originally committed as revision 14946 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics after previous patches.Ronald S. Bultje2008-08-23
| | | | Originally committed as revision 14926 to svn://svn.ffmpeg.org/ffmpeg/trunk
* On failure, return directly because the fail: case does nothing. This alsoRonald S. Bultje2008-08-23
| | | | | | allows easier control of the actual return value. Originally committed as revision 14925 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move malloc() down until after all initializations, so that the resource isRonald S. Bultje2008-08-23
| | | | | | | only allocated if initialization worked. This means that on failure, we don't have to deallocate it. Originally committed as revision 14924 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix memleak on some OSes in case network initialization fails. SeeRonald S. Bultje2008-08-23
| | | | | | "[PATCH] tcp.c/udp.c memleak?" for discussion. Originally committed as revision 14923 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove useless comments. See "[PATCH] tcp.c/udp.c memleak?" for discussion.Ronald S. Bultje2008-08-23
| | | | Originally committed as revision 14922 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Set TCP protocol to is_streamed=1 as seeking is not possible.Diego Biurrun2008-03-05
| | | | | | Björn Axelsson, bjorn.axelsson intinor se Originally committed as revision 12338 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Include os_support.h only when neededLuca Abeni2007-11-21
| | | | Originally committed as revision 11073 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add initialization and cleanup functions for WinsockRamiro Polla2007-08-09
| | | | Originally committed as revision 10040 to svn://svn.ffmpeg.org/ffmpeg/trunk
* MinGW returns EAGAIN instead of EINPROGRESSRamiro Polla2007-08-08
| | | | Originally committed as revision 9982 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace all occurrences of AVERROR_IO with AVERROR(EIO).Panagiotis Issaris2007-07-19
| | | | Originally committed as revision 9760 to svn://svn.ffmpeg.org/ffmpeg/trunk
* implement ff_socket_nonblock and use it in networking codeAlex Beregszaszi2007-04-27
| | | | Originally committed as revision 8846 to svn://svn.ffmpeg.org/ffmpeg/trunk
* use ff_neterrno() and FF_NETERROR() for networking error handlingAlex Beregszaszi2007-04-27
| | | | Originally committed as revision 8845 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move resolve_host from tcp.c to os_support.c as it is used widelyAlex Beregszaszi2007-04-26
| | | | Originally committed as revision 8834 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics in resolve_hostAlex Beregszaszi2007-04-26
| | | | Originally committed as revision 8833 to svn://svn.ffmpeg.org/ffmpeg/trunk
* change PF_INET to AF_INET to be consistent in the whole project. PF_INET is ↵Alex Beregszaszi2007-02-22
| | | | | | deprecated, while AF_INET is referred by the POSIX standards Originally committed as revision 8073 to svn://svn.ffmpeg.org/ffmpeg/trunk
* This fixes error handling for BeOS, removing the need for some ifdefs.François Revol2007-02-13
| | | | | | | | | 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
* move networking #includes into separate fileRamiro Polla2007-02-04
| | | | | | patch by Ramiro Polla angustia =a= arrozcru =d= no-ip =d= org Originally committed as revision 7817 to svn://svn.ffmpeg.org/ffmpeg/trunk