summaryrefslogtreecommitdiff
path: root/libavformat/network.h
Commit message (Collapse)AuthorAge
* lavf/network: split ff_listen_bind into ff_listen and ff_acceptStephan Holljes2015-08-01
| | | | Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
* avformat/network: Check for av_malloc* failures in ff_tls_init()Michael Niedermayer2015-02-03
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/network: move sockaddr_union after sockaddr_storage compatibility codeMichael Niedermayer2014-09-16
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/network: add union for avoiding strict aliassing violations with ↵Michael Niedermayer2014-09-15
| | | | | | sockaddr* Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f'Michael Niedermayer2014-08-25
|\ | | | | | | | | | | | | * commit '6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f': libavformat: use MSG_NOSIGNAL when applicable Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: use MSG_NOSIGNAL when applicableRémi Denis-Courmont2014-08-25
| | | | | | | | | | | | | | If the remote end of a connection oriented socket hangs up, generating an EPIPE error is preferable over an unhandled SIGPIPE signal. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-01-07
|\| | | | | | | | | | | | | * qatar/master: network.h: Add #endif comments to improve readability Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network.h: Add #endif comments to improve readabilityDiego Biurrun2014-01-06
| |
* | Merge commit '9d5ec50ead97e088d77317e77b18cef06cb3d053'Michael Niedermayer2013-08-10
|\| | | | | | | | | | | | | | | | | | | * commit '9d5ec50ead97e088d77317e77b18cef06cb3d053': ff_socket: put out-of-line and fallback to fcntl() for close-on-exec Conflicts: libavformat/network.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ff_socket: put out-of-line and fallback to fcntl() for close-on-execRémi Denis-Courmont2013-08-09
| | | | | | | | | | | | | | This supports non-Linux systems (SOCK_CLOEXEC is non-standard) and older Linux kernels to the extent possible. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a'Michael Niedermayer2013-08-06
|\| | | | | | | | | | | | | | | | | | | * commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a': tcp: Use a different log message and level if there's more addresses to try Conflicts: libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tcp: Use a different log message and level if there's more addresses to tryMartin Storsjö2013-08-06
| | | | | | | | | | | | | | | | | | This lowers the level of warnings printed if trying to connect to a host name that provides both v6 and v4 addresses but the service only is available on the v4 address (often occurring for 'localhost', with servers that aren't v6-aware). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'bb9378251a167ef0116f263912e57f715c1e02ac'Michael Niedermayer2013-08-06
|\| | | | | | | | | | | | | * commit 'bb9378251a167ef0116f263912e57f715c1e02ac': network: Use SOCK_CLOEXEC when available Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: Use SOCK_CLOEXEC when availableLuca Barbato2013-08-05
| |
* | ff_network_wait_fd_timeout(): check for interrupt before operationAndrey Utkin2013-07-12
| | | | | | | | | | Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ec7c51c7868d3ccc66b5cc38bf126258b94f086c'Michael Niedermayer2013-06-16
|\| | | | | | | | | | | | | | | | | | | | | * commit 'ec7c51c7868d3ccc66b5cc38bf126258b94f086c': avf: move ff_http_match_no_proxy to network Conflicts: libavformat/internal.h libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avf: move ff_http_match_no_proxy to networkLuca Barbato2013-06-16
| | | | | | | | It is only used by network protocols.
* | Merge commit '9835abb6d63fb07613994ae90e72fef758149408'Michael Niedermayer2013-06-05
|\| | | | | | | | | | | | | | | | | | | | | * commit '9835abb6d63fb07613994ae90e72fef758149408': network: uniform ff_listen_bind and ff_listen_connect Conflicts: libavformat/network.c libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: uniform ff_listen_bind and ff_listen_connectLuca Barbato2013-06-04
| | | | | | | | | | Document the functions and have both use a millisecond timeout and check for interrupt.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-06-02
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: network: factor out connect-listening code Conflicts: libavformat/network.h libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: factor out connect-listening codeLuca Barbato2013-06-01
| | | | | | | | | | Introduce ff_listen_connect, to be shared with the other non-tcp network protocols.
* | Merge commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f'Michael Niedermayer2013-06-02
|\| | | | | | | | | | | | | | | | | | | | | * commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f': network: factor out bind-listening code use my full first name instead of short one in copyrights Conflicts: libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: factor out bind-listening codeLuca Barbato2013-06-01
| | | | | | | | | | Introduce ff_listen_bind, to be shared with the other non-tcp network protocols.
* | Merge commit '80521c1997a23e148edf89e11b939ab8646297ca'Michael Niedermayer2012-10-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '80521c1997a23e148edf89e11b939ab8646297ca': build: allow targets to specify extra objects to link with executables swscale: avoid pointless use of compound literals libm: add fallbacks for various single-precision functions network: use getservbyport() only if available network: add fallbacks for INADDR_LOOPBACK and INET_ADDRSTRLEN Include sys/time.h before sys/resource.h Conflicts: Makefile configure libavutil/libm.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: add fallbacks for INADDR_LOOPBACK and INET_ADDRSTRLENMans Rullgard2012-10-23
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge commit 'a25d912dca9cd553440167e0476c47581359c0fc'Michael Niedermayer2012-10-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a25d912dca9cd553440167e0476c47581359c0fc': avcodec_encode_audio(): fix invalid free pcm-mpeg: correct bitrate calculation ffv1: K&R formatting cosmetics fate: Add rangecoder test network: #include stdint.h in network.h nut: export codec_tag provided by rawvideo avserver: move avserver-specific code from ffmdec.c to avserver.c Conflicts: ffserver.c libavcodec/ffv1.c libavformat/ffmdec.c libavformat/nutenc.c tests/ref/lavfi/crop tests/ref/lavfi/crop_scale tests/ref/lavfi/crop_scale_vflip tests/ref/lavfi/crop_vflip tests/ref/lavfi/null tests/ref/lavfi/pixdesc tests/ref/lavfi/pixfmts_copy tests/ref/lavfi/pixfmts_crop tests/ref/lavfi/pixfmts_hflip tests/ref/lavfi/pixfmts_null tests/ref/lavfi/pixfmts_pad tests/ref/lavfi/pixfmts_scale tests/ref/lavfi/pixfmts_vflip tests/ref/lavfi/scale200 tests/ref/lavfi/scale500 tests/ref/lavfi/vflip tests/ref/lavfi/vflip_crop tests/ref/lavfi/vflip_vflip Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: #include stdint.h in network.hMans Rullgard2012-10-16
| | | | | | | | | | | | | | This header uses various types provided by stdint.h without explicitly including it. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Introduce ff_network_wait_fd_timeout()Andrey Utkin2012-10-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output. configure: Move the getaddrinfo function check into the network block configure: Remove an unused 'have' item mpeg: remove disabled code libfdk-aac: Check if cutoff value is valid network: Always use our version of gai_strerror on windows network: Undefine existing gai_strerror definitions network: Extend the fallback gai_strerror implementation to handle more error codes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: Always use our version of gai_strerror on windowsMartin Storsjö2012-07-15
| | | | | | | | | | | | | | | | Even if linking directly to getaddrinfo, use our version of gai_strerror instead of the system's version. Microsoft explicitly documents that their version of gai_strerror is thread-unsafe. Signed-off-by: Martin Storsjö <martin@martin.st>
| * network: Undefine existing gai_strerror definitionsMartin Storsjö2012-07-15
| | | | | | | | | | | | | | | | | | | | | | This avoids warnings if there already exists a definition. This is the case on windows, where the getaddrinfo isn't available and linked to (and we use our fallbacks instead, which actually try to use the proper getaddrinfo version if found at runtime), but gai_strerror still exists as a define. Signed-off-by: Martin Storsjö <martin@martin.st>
| * network: Extend the fallback gai_strerror implementation to handle more ↵Martin Storsjö2012-07-15
| | | | | | | | | | | | | | | | | | error codes This is useful if a proper getaddrinfo is loaded dynamically on windows, while using the fallback implementation of gai_strerror. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avconv: add an assert to silence an uninitialized variable warning. avconv: shut up an uninitialized variable warning. avfiltergraph: shut up uninitialized variable warning. af_join: initialize a variable to shut up gcc warning. amix: fix format specifier for AVFilterLink.sample_rate. lavfi: make filters less verbose. mpc8: read APE tags. lavr: x86: fix ff_conv_fltp_to_flt_6ch function prototypes libm: provide fallback definition for cbrtf() using powf() network: Don't redefine error codes if they already exist in errno.h configure: Check for sys/time.h network: Include unistd.h from network.h avconv: don't include vsrc_buffer.h, which doesn't exist anymore lavfi: reorder AVFilterLink fields. lavfi: reorder AVFilterContext fields. lavfi: reorder AVFilter fields. lavfi: reorder AVFilterBufferRef fields. lavfi: reorder AVFilterBuffer fields. Conflicts: configure libavcodec/v210dec.h libavfilter/asrc_anullsrc.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_crop.c libavfilter/vf_drawbox.c libavfilter/vf_fade.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vsrc_color.c libavformat/network.h libavutil/libm.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: Don't redefine error codes if they already exist in errno.hRonald S. Bultje2012-06-26
| | | | | | | | | | | | | | | | Since the errno.h values don't match the error codes that winsock returns, map the winsock error codes to the errno ones, to make sure explicit checks against AVERROR(x) match. Signed-off-by: Martin Storsjö <martin@martin.st>
| * network: Include unistd.h from network.hMartin Storsjö2012-06-26
| | | | | | | | | | | | | | | | | | | | | | This heaader is required for close() for sockets in network code. For winsock, the equivalent function is defined in the winsock2.h header. This avoids having the HAVE_UNISTD_H in all files dealing with raw sockets. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: MS Screen 1 decoder aacdec: Fix popping channel layouts. av_gettime: support Win32 without gettimeofday() Use av_gettime() in various places Move av_gettime() to libavutil dct-test: use emms_c() from libavutil instead of duplicating it mov: fix operator precedence bug mathematics.h: remove a couple of math defines Remove unnecessary inclusions of [sys/]time.h lavf: remove unnecessary inclusions of unistd.h bfin: libswscale: add const where appropriate to fix warnings bfin: libswscale: remove unnecessary #includes udp: Properly check for invalid sockets tcp: Check the return value from getsockopt network: Use av_strerror for getting error messages udp: Properly print error from getnameinfo mmst: Use AVUNERROR() to convert error codes to the right range for strerror network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows rtmp: Reduce the number of idle posts sent by sleeping 50ms Conflicts: Changelog configure libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dct-test.c libavcodec/version.h libavformat/riff.c libavformat/udp.c libavutil/Makefile libswscale/bfin/yuv2rgb_bfin.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: Pass pointers of the right type to get/setsockopt/ioctlsocket on ↵Martin Storsjö2012-06-19
| | | | | | | | | | | | | | | | windows This avoids warnings. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Remove some warnings when compiling with mingw (mingw-w64, 32 bits)Vincent Torri2012-02-03
| | | | | | | | | | Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avformat: Avoid a warning about mixed declarations and code BMV demuxer and decoder matroskaenc: Make sure the seekhead struct is freed even on seek failure mpeg12enc: Remove write-only variables. mpeg12enc: Don't set up run-level info for level 0. msmpeg4: Don't set up run-level info for level 0. avformat: Warn about using network functions without calling avformat_network_init avformat: Revise wording rdt: Set AVFMT_NOFILE on ff_rdt_demuxer rdt: Check the return value of avformat_open rtsp: Discard the dynamic handler, if it has an alloc function which failed dsputil: use cpuflags in x86 versions of vector_clip_int32() Conflicts: libavcodec/avcodec.h libavcodec/version.h libavformat/Makefile libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Warn about using network functions without calling ↵Martin Storsjö2011-11-07
| | | | | | | | | | | | | | | | | | avformat_network_init This is to make developers aware of the fact that they will start using the new init function at some point. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: http: Remove the custom function for disabling chunked posts rtsp: Disable chunked http post through AVOptions movdec: Set frame_size for AMR h264_weight: remove duplication functions. swscale: align vertical filtersize by 2 on x86. libavfilter: reindent. matroskadec: empty blocks are in fact valid. avfilter: don't abort() on zero-size allocations. h264: improve calculation of codec delay. movenc: Set a correct packet size for AMR-NB mode 15, "no data" avformat: Add functions for doing global network initialization avformat: Add the https protocol avformat: Add the tls protocol, using OpenSSL or gnutls avformat: Initialize gnutls in ff_tls_init() w32threads: Wrap the mutex functions in inline functions returning int configure: Allow linking to the gnutls library avformat: Add ff_tls_init()/deinit() that initialize OpenSSL configure: Allow linking to openssl avcodec: Allow locking and unlocking an avformat specific mutex avformat: Split out functions from network.h to a new file, network.c Conflicts: Changelog configure doc/APIchanges libavcodec/internal.h libavcodec/version.h libavfilter/formats.c libavformat/matroskadec.c libavformat/mov.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Add ff_tls_init()/deinit() that initialize OpenSSLMartin Storsjö2011-11-05
| | | | | | | | | | | | | | If the application hasn't set up mutex callbacks, we set up our own using pthreads (or w32pthreads). Signed-off-by: Martin Storsjö <martin@martin.st>
| * avformat: Split out functions from network.h to a new file, network.cMartin Storsjö2011-11-05
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ARM: remove MULL inline asm mathops: use MUL64 macro where it forms part of other ops tty: factorise returning error codes. rawdec: add framerate private option. x11grab: add framerate private option. fbdev,v4l2: remove some forgotten uses of AVFormatParameters.time_base. bktr: don't error when AVFormatParameters.time_base isn't set. cmdutils: add missing const qualifier Skip headers not designed to work standalone during 'make checkheaders'. Add missing #includes to make headers self-contained. musepack: remove unnecessary #include from mpcdata.h musepack: remove extraneous mpcdata.h inclusions Fix error check in av_file_map() Conflicts: cmdutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add missing #includes to make headers self-contained.Diego Biurrun2011-06-04
| | | | | | | | This fixes 'make checkheaders'.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) ARM: add ARMv6 optimised av_clip_uintp2 ARM: remove volatile from asm statements in libavutil/intmath ARM: fix av_clipl_int32_arm() v4l: include avdevice.h ffserver: move close_connection() call to avoid a temporary string and copy. lavf: initialize demuxer private options. AVOptions: set string default values. lavdevice: mark v4l for removal on next major bump. swscale: fix compile on ppc. swscale: fix compile on x86-32. build: Remove generated .version file on distclean. configure: Add -D_GNU_SOURCE to CPPFLAGS on OS/2. doc: Drop hint at --enable-memalign-hack for MinGW, it is now autodetected. ffplay: Remove disabled code. Mark parameterless function declarations as 'void'. swscale: use av_clip_uint8() in yuv2yuv1_c(). swscale: remove VOF/VOFW. swscale: split chroma buffers into separate U/V planes. swscale: replace formatConvBuffer[VOF] by allocated array. rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions. ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Mark parameterless function declarations as 'void'.Diego Biurrun2011-05-26
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: LOTS of duplicates ... avio: Fix the deprecated fallback URL-prefixed open flags avoid duplicate -lm in .pc files mpeg12: terminate mpeg2_video_profiles arrays network: Check POLLERR and POLLHUP in ff_network_wait_fd mpegtsenc: make PMT PID really start on pmt_start_pid nut format: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE hflip: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats crop: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation Conflicts: configure libswscale/swscale.h tests/ref/lavf/ts Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: Check POLLERR and POLLHUP in ff_network_wait_fdGil Pedersen2011-04-28
| | | | | | | | | | | | | | | | Previously, the function would lead to an infinite wait (by returning AVERROR(EAGAIN)) on sockets indicating an error via either of these poll flags. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>