summaryrefslogtreecommitdiffstats
path: root/libavformat/tcp.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * proto: Use .priv_data_size to allocate the private contextMartin Storsjö2011-12-011-8/+2
| | | | | | | | | | | | | | | | This simplifies the open functions by avoiding one function call that needs error checking, reducing the amount of extra bulk code. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-141-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: pass options from AVFormatContext to avio. avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards avio: add avio_open2, taking an interrupt callback and options avio: add support for passing options to protocols. avio: add and use ffurl_protocol_next(). avformat: Pass the interrupt callback on to chained muxers/demuxers avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc avformat: Use ff_check_interrupt avio: Add an internal utility function for checking the new interrupt callback avio: Add AVIOInterruptCB texi2html: remove stray \n doc: prettyfy the texi2html documentation swscale: handle unaligned buffers in yuv2plane1 Conflicts: libavformat/avformat.h libavformat/avio.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Use ff_check_interruptMartin Storsjö2011-11-131-2/+2
| |
* | TCP: change default timeout to 5secMichael Niedermayer2011-05-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert "Timeout TCP open() after 5 seconds."Michael Niedermayer2011-05-301-7/+0
| | | | | | | | | | | | This code is redundant and conflicts with lucas reimplementation of it. This reverts commit a2f5e14a867768019b49b830e29801f1bfb2abb7.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-271-8/+17
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) ARM: disable ff_vector_fmul_vfp on VFPv3 systems ARM: check for VFPv3 swscale: Remove unused variables in x86 code. doc: Drop DJGPP section, Libav now compiles out-of-the-box on FreeDOS. x86: Add appropriate ifdefs around certain AVX functions. cmdutils: use sws_freeContext() instead of av_freep(). swscale: delay allocation of formatConvBuffer(). swscale: fix build with --disable-swscale-alpha. movenc: Deprecate the global RTP hinting flag, use a private AVOption instead movenc: Add an AVClass for setting muxer specific options swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions. configure: report yasm/nasm presence properly tcp: make connect() timeout properly rawdec: factor video demuxer definitions into a macro. rtspdec: add initial_pause private option. lavf: deprecate AVFormatParameters.width/height. tty: add video_size private option. rawdec: add video_size private option. x11grab: add video_size private option. x11grab: factorize returning error codes. ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tcp: make connect() timeout properlyLuca Barbato2011-05-271-8/+17
| | | | | | | | | | The connect() timeout can take minutes, gets misreported as EIO and isn't interruptible.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-211-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Makefile: Include dependencies for test tools, too Remove a version check in av_log made unnecessary by the big bump. update last major version increase dates in APIchanges Reduce picture size for yadif. oggdec: use av_freep() instead of av_free() avio: Fix sanity checks in ffurl_read* libavformat: Free AVFormatContext->streams libavformat: Make protocols pass URLContext as log context where available asf: remove commented out code in asf_read_seek not pulled: libpostproc: Remove crufty code disabled by the big bump. Reflect 0.7_beta1 release in the Changelog not pulled: sws: remove disabled cruft. lavu: remove disabled ff_random_get_seed cruft. lavu: remove disabled sha1 cruft. Conflicts: Changelog libavutil/sha1.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: Make protocols pass URLContext as log context where availableMartin Storsjö2011-04-201-2/+2
| | | | | | | | | | | | | | Since the libavformat major bump, URLContext contains an AVClass, making it a usable log context. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-091-6/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: bump minor and add an APIChanges entry for avformat cleanup lavf: get rid of ffm-specific stuff in avformat.h Not pulled: avio: deprecate av_protocol_next(). avio: add a function for iterating though protocol names. lavf: rename a parameter of av_sdp_create from buff->buf lavf: rename avf_sdp_create to av_sdp_create. lavf: make av_guess_image2_codec internal avio: make URLProtocol internal. avio: make URLContext internal. lavf: mark av_pkt_dump(_log) for remove on $next+1 bump. lavf: use designated initializers for all protocols applehttp: don't use deprecated url_ functions. avio: move two ff_udp_* functions from avio_internal to url.h asfdec: remove a forgotten declaration of nonexistent function avio: deprecate the typedef for URLInterruptCB Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: use designated initializers for all protocolsAnton Khirnov2011-04-081-6/+5
| | | | | | | | | | This is more readable and makes it easier to reorder URLProtocol members.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-081-16/+27
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: proto: include os_support.h in network.h matroskaenc: don't write an empty Cues element. lavc: add a FF_API_REQUEST_CHANNELS deprecation macro avio: move extern url_interrupt_cb declaration from avio.h to url.h avio: make av_register_protocol2 internal. avio: avio_ prefix for url_set_interrupt_cb. avio: AVIO_ prefixes for URL_ open flags. proto: introduce listen option in tcp doc: clarify configure features proto: factor ff_network_wait_fd and use it on udp Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: move extern url_interrupt_cb declaration from avio.h to url.hAnton Khirnov2011-04-071-0/+1
| |
| * avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-071-2/+2
| |
| * proto: introduce listen option in tcpLuca Barbato2011-04-071-2/+22
| | | | | | | | | | | | 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-071-12/+2
| | | | | | | | | | | | | | | | 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-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Timeout TCP open() after 5 seconds.Michael Niedermayer2011-04-021-0/+7
|/ | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Use AVERROR_EXIT with url_interrupt_cb.Nicolas George2011-03-151-2/+4
| | | | | | | | | | | | | 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-231-4/+4
| | | | | | | | | | | | | | 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-051-36/+11
| | | | | 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-031-10/+18
| | | | | 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-281-34/+14
| | | | | 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-261-1/+1
| | | | | 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-141-1/+4
| | | | | | | | 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-041-2/+2
| | | | | | 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-211-3/+5
| | | | | | | | 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-141-2/+11
| | | | | | in tcp.c. Originally committed as revision 24796 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make ff_url_split() publicMåns Rullgård2010-06-271-1/+1
| | | | | | | 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-011-1/+1
| | | | 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-261-0/+4
| | | | 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-141-0/+1
| | | | | | 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-081-1/+1
| | | | | | 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-051-4/+0
| | | | | | 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-271-1/+1
| | | | 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-111-9/+25
| | | | | | <$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-151-2/+2
| | | | | | | | | | 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-031-0/+7
| | | | | | | | | | | 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-191-1/+1
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-131-1/+1
| | | | | | 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-261-0/+2
| | | | 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-241-0/+1
| | | | | | 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-241-2/+1
| | | | | | | | 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-231-7/+3
| | | | 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-231-4/+5
| | | | | | 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-231-7/+5
| | | | | | | 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-231-3/+3
| | | | | | "[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-231-4/+4
| | | | 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-051-0/+1
| | | | | | 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-211-0/+1
| | | | Originally committed as revision 11073 to svn://svn.ffmpeg.org/ffmpeg/trunk
OpenPOWER on IntegriCloud