summaryrefslogtreecommitdiff
path: root/libavformat/rtpproto.c
Commit message (Collapse)AuthorAge
* avformat/rtpproto: when local rtp port and local rtcp port are not ↵lemonlinger@gmail.com2013-10-25
| | | | | | | | | specified, try to make two successive ports and retry 3 times when failed some video players on Android will not send udp hole punching messages if the rtcp port and rtp port are not two successive integers. So, if the video player is behind NAT, it could not receive and rtp messages via udp Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '4b054a3400f728c54470ee6a1eefe1d82420f6a2'Michael Niedermayer2013-08-16
|\ | | | | | | | | | | | | * commit '4b054a3400f728c54470ee6a1eefe1d82420f6a2': rtpproto: Check the right feature detection macro Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Check the right feature detection macroMartin Storsjö2013-08-15
| | | | | | | | | | | | | | | | IPPROTO_IPV6 is unrelated here (it's only used in udp.c for multicast sockopts), check for support for the sockaddr_in6 struct itself. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-08-15
|\| | | | | | | | | | | | | * qatar/master: rtpproto: Check for the right feature when reading a sockaddr_in6 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Check for the right feature when reading a sockaddr_in6Dave Yeo2013-08-15
| | | | | | | | | | | | | | Some systems, such as OS/2, define AF_INET6 without a full implementation. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '6b58e11a8331690ec32e9869db89ae10c54614e9'Michael Niedermayer2013-08-14
|\| | | | | | | | | | | | | * commit '6b58e11a8331690ec32e9869db89ae10c54614e9': rtpproto: Add an option for writing return packets to the address of the last received packets Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Add an option for writing return packets to the address of the ↵Martin Storsjö2013-08-14
| | | | | | | | | | | | | | | | | | | | | | last received packets If we've received packets on the same socket before, the return packets are sent to that address. If we've only received packets on the other socket, try to guess the source port for the other one assuming the basic +1/-1 logic. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '2427ac6ccd868811d1fe9df7c64c50ca58abe6f6'Michael Niedermayer2013-08-14
|\| | | | | | | | | | | | | * commit '2427ac6ccd868811d1fe9df7c64c50ca58abe6f6': rtpproto: Update the parameter documentation Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Update the parameter documentationMartin Storsjö2013-08-13
| | | | | | | | | | | | | | | | Move the sources documentation up below the marker for deprecated otpions. Also mention the new block parameter, that was added in 749722209. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'ee37d5811caa8f4ad125a37fe6ce3f9e66cd72f2'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | * commit 'ee37d5811caa8f4ad125a37fe6ce3f9e66cd72f2': rtpproto: Allow specifying a separate rtcp port in ff_rtp_set_remote_url Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Allow specifying a separate rtcp port in ff_rtp_set_remote_urlMartin Storsjö2013-08-01
| | | | | | | | | | | | | | | | | | | | A separate rtcp port can already be set when opening the rtp protocol normally, but when doing port setup as in RTSP (where we first need to open the local ports and pass them to the peer, and only then receive the remote peer port numbers), we didn't check the same url parameter as in the normal open routine. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '1851e1d05d06f6ef3436c667e4354da0f407b226'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | * commit '1851e1d05d06f6ef3436c667e4354da0f407b226': rtpproto: Check the size before reading buf[1] Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Check the size before reading buf[1]Martin Storsjö2013-08-01
| | | | | | | | | | | | | | | | I doubt that anyone ever would try to send a 1 byte packet via the RTP protocol, but check just in case - it shouldn't crash at least. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b7e6da988bfd5def40ccf3476eb8ce2f98a969a5'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | * commit 'b7e6da988bfd5def40ccf3476eb8ce2f98a969a5': rtpproto: Move rtpproto specific function declarations to a separate header Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Move rtpproto specific function declarations to a separate headerMartin Storsjö2013-07-31
| | | | | | | | | | | | | | Mixing these with the rtp depacketizer functions in rtpdec.h is no good. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '892b0be1dfbdeaf71235fb6c593286e4f5c7e4ec'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | * commit '892b0be1dfbdeaf71235fb6c593286e4f5c7e4ec': rtpproto: Simplify the rtp_read function by looping over the fds Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Simplify the rtp_read function by looping over the fdsMartin Storsjö2013-07-31
| | | | | | | | | | | | | | This avoids having duplicate code where only the fd parameter differs. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '7531588fffbca1f0afdcc06635999c00dfc16ca6'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | * commit '7531588fffbca1f0afdcc06635999c00dfc16ca6': rtpproto: Remove a misplaced comment Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Remove a misplaced commentMartin Storsjö2013-07-31
| | | | | | | | | | | | | | The fdset is a pollfd array nowadays, and it is already populated at this point. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '54e03ff6af8a070f1055edd26028f3f7b2e2ca8e'Michael Niedermayer2013-08-01
|\| | | | | | | | | | | | | * commit '54e03ff6af8a070f1055edd26028f3f7b2e2ca8e': rtpproto: Support nonblocking reads Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Support nonblocking readsMartin Storsjö2013-07-31
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '74972220909787af5a3ffe66f7fa8041827c2bd2'Michael Niedermayer2013-07-30
|\| | | | | | | | | | | | | | | | | | | * commit '74972220909787af5a3ffe66f7fa8041827c2bd2': rtpproto: Support more than one SSM include address, support excludes Conflicts: libavformat/rtpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Support more than one SSM include address, support excludesEd Torbett2013-07-29
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '36fb0d02a1faa11eaee51de01fb4061ad6092af9'Michael Niedermayer2013-07-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36fb0d02a1faa11eaee51de01fb4061ad6092af9': rtsp: Support multicast source filters (RFC 4570) rtpproto: Check the source IP if one single source has been specified rtpproto: Support IGMPv3 source specific multicast inclusion Conflicts: libavformat/rtpproto.c libavformat/rtsp.c libavformat/rtsp.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Check the source IP if one single source has been specifiedMartin Storsjö2013-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If another peer is sending unicast packets to the same port that we are listening on, those packets can end up being received despite using source specific multicast. For those cases, manually check the source address of received packets against the intended source address. This only handles the case when the source list is one single IP address for now, which probably is the most common case. Based on a patch by Ed Torbett. Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtpproto: Support IGMPv3 source specific multicast inclusionEd Torbett2013-07-19
| | | | | | | | | | | | | | | | | | Blocking/exclusion is not supported yet. The rtp protocol parameter takes the same form as the existing sources parameter for the udp protocol. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/rt*p: Joining a SSM multicast group using an SDP (Issue #2171)Ed Torbett2013-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Passes Source-Specific Multicast parameters read from an sdp file through to the UDP socket code, allowing source-specific multicast streams to be correctly received. As an integral part of this change, additional checking (currently only enabled in the case of SSM streams, but probably useful in similar scenarios) has been added to the RTP protocol handler to distinguish UDP packets arriving from multiple sources to the same port and process only the expected packets (those transmitted from the expected UDP source address). This resolves an issue identified when multiple instances of FFmpeg subscribe to different Source-Specific Multicast streams but with each sharing the same destination port. Signed-off-by: Edward Torbett <ed.torbett@simulation-systems.co.uk> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-12-13
|\| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN. x86inc: fix stack alignment on win64 rtpproto: Remove unused defines Conflicts: libavcodec/aacdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpproto: Remove unused definesMartin Storsjö2012-12-12
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegvideo_enc: don't use deprecated avcodec_encode_video(). cmdutils: refactor -codecs option. avconv: make -shortest a per-output file option. lavc: add avcodec_descriptor_get_by_name(). lavc: add const to AVCodec* function parameters. swf(dec): replace CODEC_ID with AV_CODEC_ID dvenc: don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE rtmpdh: Do not generate the same private key every time when using libnettle rtp: remove ff_rtp_get_rtcp_file_handle(). rtsp.c: use ffurl_get_multi_file_handle() instead of ff_rtp_get_rtcp_file_handle() avio: add (ff)url_get_multi_file_handle() for getting more than one fd h264: vdpau: fix crash with unsupported colorspace amrwbdec: Decode the fr_quality bit properly Conflicts: Changelog cmdutils.c cmdutils_common_opts.h doc/ffmpeg.texi ffmpeg.c ffmpeg.h ffmpeg_opt.c libavcodec/h264.c libavcodec/options.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtp: remove ff_rtp_get_rtcp_file_handle().Jordi Ortiz2012-08-17
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * avio: add (ff)url_get_multi_file_handle() for getting more than one fdJordi Ortiz2012-08-17
| | | | | | | | 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>
| * Remove unnecessary inclusions of [sys/]time.hMans Rullgard2012-06-20
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * lavf: remove unnecessary inclusions of unistd.hMans Rullgard2012-06-20
| | | | | | | | | | | | These files do not use anything provided by unistd.h. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: shorten: Use separate pointers for the allocated memory for decoded samples. atrac3: Fix crash in tonal component decoding. ws_snd1: Fix wrong samples counts. movenc: Don't set a default sample duration when creating ismv rtp: Factorize the check for distinguishing RTCP packets from RTP golomb: avoid infinite loop on all-zero input (or end of buffer). bethsoftvid: synchronize video timestamps with audio sample rate bethsoftvid: add audio stream only after getting the first audio packet bethsoftvid: Set video packet duration instead of accumulating pts. bethsoftvid: set packet key frame flag for audio and I-frame video packets. bethsoftvid: fix read_packet() return codes. bethsoftvid: pass palette in side data instead of in a separate packet. sdp: Ignore RTCP packets when autodetecting RTP streams proresenc: initialise 'sign' variable mpegaudio: replace memcpy by SIMD code vc1: prevent using last_frame as a reference for I/P first frame. Conflicts: libavcodec/atrac3.c libavcodec/golomb.h libavcodec/shorten.c libavcodec/ws-snd1.c tests/ref/fate/bethsoft-vid Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtp: Factorize the check for distinguishing RTCP packets from RTPMartin Storsjö2012-02-16
| | | | | | | | | | | | The binary doesn't change after this patch. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) ipmovie: do not read audio packets before the codec is known truemotion2: check size before GetBitContext initialisation avio: Only do implicit network initialization for network protocols avio: Add an URLProtocol flag for indicating that a protocol uses network adpcm: ADPCM Electronic Arts has always two channels matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc() fate: Add missing reference file from 9b4767e4. mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions. 4xm: Prevent buffer overreads. mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan vp3: add fate test for non-zero last coefficient vp3: fix streams with non-zero last coefficient swscale: remove unused U/V arguments from yuv2rgb_write(). timer: K&R formatting cosmetics lavf: cosmetics, reformat av_read_frame(). lavf: refactor av_read_frame() to make it easier to understand. Report an error if pitch_lag is zero in AMR-NB decoder. Revert "4xm: Prevent buffer overreads." 4xm: Prevent buffer overreads. 4xm: pass the correct remaining buffer size to decode_i2_frame(). ... Conflicts: libavcodec/4xm.c libavcodec/mjpegdec.c libavcodec/truemotion2.c libavformat/ipmovie.c libavformat/mov_chan.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add an URLProtocol flag for indicating that a protocol uses networkMartin Storsjö2012-01-05
| | | | | | | | | | | | | | This definition is in two files, since the definitions will move to the private header at the next bump. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-02
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (25 commits) rtpenc: Add support for G726 audio rtpdec: Interpret the different G726 names as bits_per_coded_sample rtpenc: Change rtp_send_samples to handle sample sizes other than even bytes rtpenc: Cast a rescaling parameter to int64_t h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1. ARM: fix indentation in ff_dsputil_init_neon() ARM: NEON put/avg_pixels8/16 cosmetics ARM: add remaining NEON avg_pixels8/16 functions ARM: clean up NEON put/avg_pixels macros fate: split acodec-pcm into individual tests swscale: #include "libavutil/mathematics.h" pmpdec: don't use deprecated av_set_pts_info. rv34: align temporary block of "dct" coefs Add PlayStation Portable PMP format demuxer proto: Realign struct initializers proto: Use .priv_data_size to allocate the private context mmsh: Properly clean up if the second ffurl_alloc failed rtmp: Clean up properly if the handshake failed md5proto: Remove the get_file_handle function applehttpproto: Use the close function if the open function fails ... Conflicts: libavcodec/vble.c libavformat/mmsh.c libavformat/pmpdec.c libavformat/udp.c tests/ref/acodec/pcm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * proto: Use .priv_data_size to allocate the private contextMartin Storsjö2011-12-01
| | | | | | | | | | | | | | | | 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-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * avio: add support for passing options to protocols.Anton Khirnov2011-11-13
| | | | | | | | | | Not used anywhere yet, support for passing options from avio_open() will follow.
| * avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_allocMartin Storsjö2011-11-13
| | | | | | | | | | Change all uses of these function to pass the relevant callback on.
| * avformat: Use ff_check_interruptMartin Storsjö2011-11-13
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) tiffenc: initialize forgotten avctx. avplay: free the active audio packet at exit. avplay: free rdft data used for spectrogram analysis. log.h: make AVClass a named struct fix ac3 encoder documentation vc1: more prettyprinting cosmetics vc1: prettyprint some tables vc1: K&R formatting cosmetics AVOptions: bump minor and add APIchanges entry. cmdutils/avtools: simplify show_help() by using av_opt_child_class_next() AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* Remove all uses of deprecated AVOptions API. AVOptions: add av_opt_next, deprecate av_next_option. AVOptions: add functions for evaluating option strings. AVOptions: split get_number(). AVOptions: add av_opt_get*, deprecate av_get*. AVOptions: add av_opt_set*(). AVOptions: add new API for enumerating children. rv34: move inverse transform functions to DSP context flvenc: Write the right metadata entry count ... Conflicts: avconv.c cmdutils.c doc/APIchanges ffplay.c ffprobe.c libavcodec/ac3dec.c libavcodec/h264.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mpeg12enc.c libavcodec/options.c libavdevice/libdc1394.c libavdevice/v4l2.c libavfilter/vf_drawtext.c libavformat/flvdec.c libavformat/mpegtsenc.c libavformat/options.c libavutil/avutil.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: Add ff_ prefix to all nonstatic symbolsMartin Storsjö2011-10-12
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | rtp: disable udp fifos, the rtp code cannot work with the fifos in its ↵Michael Niedermayer2011-07-25
| | | | | | | | | | | | current form as rtp bypasses the public API. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dnxhddec: optimise dnxhd_decode_dct_block() rtp: remove disabled code eac3enc: use different numbers of blocks per frame to allow higher bitrates dnxhd: add regression test for 10-bit dnxhd: 10-bit support dsputil: update per-arch init funcs for non-h264 high bit depth dsputil: template get_pixels() for different bit depths dsputil: create 16/32-bit dctcoef versions of some functions jfdctint: add 10-bit version mov: add clcp type track as Subtitle stream. mpeg4: add Mpeg4 Profiles names. mpeg4: decode Level Profile for MPEG4 Part 2. ffprobe: display bitstream level. imgconvert: remove unused glue and xglue macros Conflicts: libavcodec/dsputil_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtp: remove disabled codeDiego Biurrun2011-07-21
| |