summaryrefslogtreecommitdiffstats
path: root/libavformat/udp.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/udp: debug log udp socket sizerogerdpack2014-01-081-0/+6
| | | | | Signed-off-by: rogerdpack <rogerpack2005@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* doc/protocols/udp,lavf/udp: apply minor documentation fixesStefano Sabatini2013-12-251-10/+10
|
* UDP: join multicast group on the interface specified with &localaddr=Stoian Ivanov2013-12-171-6/+15
| | | | | | | | | | | | | | When joining multicast groups, ffmpeg was using INADDR_ANY as interface address which leads to enabling the multicast group on the interface with "default gateway". Often multicast traffic is received over dedicated interface, which scenario ffmpeg was unable to handle. With this patch, ffmpeg will enable multicast group to the interfaces configured with address specified in &localaddr= parameter of udp:// URL. To avoid loacal_addr resolve at udp_close(...) the UDPContext structure was extended with struct sockaddr_storage local_addr_storage member, which is populated in udp_open(..) and passed to udp_join_multicast_group() and udp_leave_multicast_group(). Signed-off-by: Stoian Ivanov <s.ivanov@teracomm.bg> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'bb9378251a167ef0116f263912e57f715c1e02ac'Michael Niedermayer2013-08-061-1/+1
|\ | | | | | | | | | | | | * commit 'bb9378251a167ef0116f263912e57f715c1e02ac': network: Use SOCK_CLOEXEC when available Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * network: Use SOCK_CLOEXEC when availableLuca Barbato2013-08-051-1/+1
| |
* | Merge commit '7d99c92945e4b2d12ed2126365482e1900340da0'Michael Niedermayer2013-07-301-35/+51
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '7d99c92945e4b2d12ed2126365482e1900340da0': udp: Keep track of include and exclude sources separately Conflicts: libavformat/udp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Keep track of include and exclude sources separatelyEd Torbett2013-07-291-35/+51
| | | | | | | | | | | | | | This allows us to explicitly fail if the caller tried to set both inclusions and exclusions at the same time. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '3357bccc5cb31795f248cd72dc480025f3075a5b'Michael Niedermayer2013-07-301-2/+2
|\ \ | |/ | | | | | | | | | | * commit '3357bccc5cb31795f248cd72dc480025f3075a5b': udp: Allow specifying multicast include/blocks as host names as well Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Allow specifying multicast include/blocks as host names as wellEd Torbett2013-07-291-2/+2
| | | | | | | | | | | | | | | | Previously this only allowed literal IP addresses. When these are conveyed in a SDP file as in RFC4570, host names are allowed as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* | udp: Fix receiving large udp packetsMichael Niedermayer2013-06-291-1/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avdevice: add missing time.h includesMichael Niedermayer2013-03-121-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: check ff_socket_nonblock() return codeMichael Niedermayer2012-11-051-1/+5
| | | | | | | | | | Fixes CID733719 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26'Michael Niedermayer2012-10-281-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26': avio: fix pointer type mismatches in avio_enum_protocols() avserver: use socklen_t where appropriate udp: use socklen_t where appropriate network: use HAVE_THREADS instead of local hack af_channelmap: remove stray enum declaration buffersink: remove stray semicolon after function definition Conflicts: libavformat/avio.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: use socklen_t where appropriateMans Rullgard2012-10-271-2/+2
| | | | | | | | | | | | | | getsockname() takes a pointer to socklen_t which is not necessarily int. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | udp: add missing mutex unlockMichael Niedermayer2012-10-201-1/+3
| | | | | | | | | | Fixes CID703688 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: pick params from AVOptions alsoAndrey Utkin2012-09-151-10/+42
| | | | | | | | | | | | | | | | This updated version does not deviate from previous behavior on default value of 'buffer_size' I skipped porting 'sources', 'block' options for now as they're parsed seriously. So i added TODO remarks. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add 'timeout' option to UDP protocolAndrey Utkin2012-08-291-0/+2
| | | | | | | | | | | | This patch accepts 'timeout' option for input mode only. As far as i know, UDP output cannot introduce delays. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: do not call pthread_{mutex,cond}_destroy when not initialized.anonymous2012-08-061-3/+2
| | | | | | | | | | | | This seems to cause a crash on Windows. The author of that patch was a random guy on IRC who wants to stay anonymous.
* | udp: fix compilation when HAVE_PTHREAD_CANCEL isnt definedMichael Niedermayer2012-07-201-0/+4
| | | | | | | | | | | | | | | | This happens with for example mplayer. Fixing it in ffmpeg allows new ffmpeg to be compiled with older mplayer which would not be possible if the fix was just in mplayer. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/udp: warn in case the circular_buffer_size or overrun_nonfatal options ↵Stefano Sabatini2012-07-191-0/+8
| | | | | | | | | | | | are not supported They are only supported if pthread is available.
* | udp: use av_freep() instead of av_free()Michael Niedermayer2012-06-281-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-281-1/+113
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mss1: validate number of changeable palette entries mss1: report palette changed when some additional colours were decoded x86: fft: replace call to memcpy by a loop udp: Support IGMPv3 source specific multicast and source blocking dxva2: include dxva.h if found libm: Provide fallback definitions for isnan() and isinf() tcp: Pass NULL as hostname to getaddrinfo if the string is empty tcp: Set AI_PASSIVE when the socket will be used for listening Conflicts: configure libavcodec/mss1.c libavformat/udp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Support IGMPv3 source specific multicast and source blockingMartin Storsjö2012-06-271-1/+113
| | | | | | | | | | | | Based on an original patch by Stephen D'Angelo <SDAngelo@evertz.com>. Signed-off-by: Martin Storsjö <martin@martin.st>
* | udp: fix occasional crash on shutdownEric Petit2012-06-271-1/+1
| | | | | | | | | | | | Wait until the thread is down before destroying the fifo Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-271-1/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: Include unistd.h from network.hMartin Storsjö2012-06-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | 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-201-17/+23
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Remove unnecessary inclusions of [sys/]time.hMans Rullgard2012-06-201-1/+0
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * udp: Properly check for invalid socketsMartin Storsjö2012-06-191-1/+1
| | | | | | | | | | | | If stdin has been closed, 0 is a valid socket descriptor. Signed-off-by: Martin Storsjö <martin@martin.st>
| * network: Use av_strerror for getting error messagesMartin Storsjö2012-06-191-12/+19
| | | | | | | | | | | | | | Also use ff_neterrno() instead of errno directly (which doesn't work on windows), for getting the error code. Signed-off-by: Martin Storsjö <martin@martin.st>
| * udp: Properly print error from getnameinfoMartin Storsjö2012-06-191-2/+3
| | | | | | | | | | | | | | | | getnameinfo doesn't set errno on failure, it returns an error code, which should be handled by gai_strerror instead of the normal strerror. Signed-off-by: Martin Storsjö <martin@martin.st>
* | udp: check for HAVE_PTHREAD_CANCEL instead of HAVE_PTHREADS.Nicolas George2012-05-141-7/+7
| | | | | | | | | | Some environments, for example Android, pretend to have pthreads but actually have only a partial implementation.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-291-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asf: only set index_read if the index contained entries. cabac: add overread protection to BRANCHLESS_GET_CABAC(). cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). h264: add overread protection to get_cabac_bypass_sign_x86(). h264: reindent get_cabac_bypass_sign_x86(). h264: use struct offsets in get_cabac_bypass_sign_x86(). h264: fix overreads in cabac reader. wmall: fix seeking. lagarith: fix buffer overreads. dvdec: drop unnecessary dv_tablegen.h #include build: fix doc generation errors in parallel builds Replace memset(0) by zero initializations. faandct: Remove FAAN_POSTSCALE define and related code. dvenc: print allowed profiles if the video doesn't conform to any of them. avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size. FATE: add a test for vp8 with changing frame size. fate: add kgv1 fate test. oggdec: calculate correct timestamps in Ogg/FLAC Conflicts: libavcodec/4xm.c libavcodec/cook.c libavcodec/dvdata.c libavcodec/dvdsubdec.c libavcodec/lagarith.c libavcodec/lagarithrac.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace memset(0) by zero initializations.Diego Biurrun2012-03-281-2/+1
| | | | | | | | Also remove one pointless zero initialization in rangecoder.c.
* | udp: lock all operations on shared variables.Nicolas George2012-03-221-5/+6
| |
* | udp: return the error code instead of generic EIO.Nicolas George2012-03-221-1/+1
| |
* | udp: call av_fifo_space directly as needed.Nicolas George2012-03-221-6/+2
| | | | | | | | | | The comment seemed to indicate that left was used to limit the size of the recv, but it was not so.
* | udp: use non-blocking read instead of select.Nicolas George2012-03-221-20/+1
| |
* | udp: use pthread_cancel instead of a shared flag.Nicolas George2012-03-221-3/+11
| | | | | | | | | | It allows to exit the thread immediately instead of waiting for select to timeout (one second in the current code).
* | udp: fix non-blocking and interrupt handling.Nicolas George2012-03-171-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | In non-blocking mode, lowest-level read protocols are supposed block only for a short amount of time to let retry_transfer_wrapper() check for interrupts. Also, checking the interrupt_callback in the receiving thread is wrong, as interrupt_callback is not guaranteed to be thread-safe and the job is already done by retry_transfer_wrapper(). The error code was also incorrect. Bug reported by Andrey Utkin.
* | udp: Add option overrun_nonfatalAndrey Utkin2012-03-121-6/+23
| | | | | | | | | | | | Optionize fail/survive on circular buffer overrun Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: remove dead code line (unused result)Andrey Utkin2012-03-121-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert "udp: add multicast input interface selection"Michael Niedermayer2012-03-121-28/+2
| | | | | | | | | | | | This reverts commit 9abd47fe90a592822b326345726626a018641d04. Broke compilation on openbsd and others
* | udp: add multicast input interface selectionTudor.Suciu2012-03-121-2/+28
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-101-5/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix a bunch of common typos. build: Skip compiling xvmc.h under the correct condition. configure: darwin: Change dylib install names to include major version. mpegts: Always honor a registration descriptor if present and there is no other codec information. aacdec: Fix SCE parity check. aacdec: Fix out of array writes (stack). rtsp: Only set the ttl parameter if the server actually gave a value udp: Set ttl for read-write streams, too, not only for write-only ones udp: Only bind to the multicast address if in read-only mode udp: Clarify the comment about binding the multicast address udp: Reorder comments Conflicts: libavcodec/aacdec.c tools/patcheck Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Set ttl for read-write streams, too, not only for write-only onesMartin Storsjö2012-03-091-2/+3
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * udp: Only bind to the multicast address if in read-only modeMartin Storsjö2012-03-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes sending back RTCP RR packets if receiving RTP over multicast. If the multicast stream is sent on demand (set up and signalled via RTSP), the sender might depend on getting RTCP RR packets knowing that there are listeners, otherwise the stream can be closed after a certain timeout. This fixes receiving RTSP streams over multicast on unix, from certain Axis cameras. Signed-off-by: Martin Storsjö <martin@martin.st>
| * udp: Clarify the comment about binding the multicast addressMartin Storsjö2012-03-091-1/+3
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * udp: Reorder commentsMartin Storsjö2012-03-091-1/+1
| | | | | | | | | | | | | | | | | | When this code was added in 36b532815cb83, the new code was added between the existing comment and the existing line of code, making the old comment seem to refer to the new code. This makes it read correctly. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-081-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) sbrdsp.asm: convert all instructions to float/SSE ones. dv: cosmetics. dv: check buffer size before reading profile. Revert "AAC SBR: group some writes." udp: Print an error message if bind fails cook: extend channel uncoupling tables so the full bit range is covered. roqvideo: cosmetics. roqvideo: convert to bytestream2 API. dca: don't use av_clip_uintp2(). wmall: fix build with -DDEBUG enabled. smc: port to bytestream2 API. AAC SBR: group some writes. dsputil: remove shift parameter from scalarproduct_int16 SBR DSP: unroll sum_square rv34: remove dead code in intra availability check rv34: clean a bit availability checks. v4l2: update documentation tgq: convert to bytestream2 API. parser: remove forward declaration of MpegEncContext dca: prevent accessing static arrays with invalid indexes. ... Conflicts: doc/indevs.texi libavcodec/Makefile libavcodec/dca.c libavcodec/dvdata.c libavcodec/eatgq.c libavcodec/mmvideo.c libavcodec/roqvideodec.c libavcodec/smc.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud