summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
Commit message (Collapse)AuthorAge
...
* | 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>
* | udp: update to new interrupt callback APIMichael Niedermayer2011-11-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avcodec: add support for planar signed 8-bit PCM. ra144enc: add sample_fmts list to ff_ra_144_encoder smackaud: use uint8_t* for 8-bit output buffer type smackaud: clip output samples smackaud: use sign_extend() for difference value instead of casting sipr: use a function pointer to select the decode_frame function sipr: set mode based on block_align instead of bit_rate sipr: do not needlessly set *data_size to 0 when returning an error ra288: fix formatting of LOCAL_ALIGNED_16 udp: Allow specifying the local IP address VC1: Add bottom field offset to block_index[] to avoid rewriting (+10L) vc1dec: move an if() block. vc1dec: use correct hybrid prediction threshold. vc1dec: Partial rewrite of vc1_pred_mv() vc1dec: take ME precision into account while scaling MV predictors. lavf: don't leak corrupted packets Conflicts: libavcodec/8svx.c libavcodec/ra288.c libavcodec/version.h libavformat/iff.c libavformat/udp.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Allow specifying the local IP addressMartin Storsjö2011-11-09
| | | | | | | | | | | | | | This is useful if sending multicast data on a host with multiple interfaces. Signed-off-by: Martin Storsjö <martin@martin.st>
* | udp: simplify 7a032cb97f743a651138d2da6214c79e0ce089ddMichael Niedermayer2011-11-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix segfault on UDP readingAndrey Utkin2011-11-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: fix circular buffer error handlingMichael Niedermayer2011-08-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: buffer datagrams in circular buffer instead of a bytestreamMichael Niedermayer2011-08-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: allow fifo size to be tuned seperatelyMichael Niedermayer2011-07-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cosmetics: fix some then/than typos doxygen: Include libavcodec and libavformat examples into the documentation avutil: elaborate documentation for av_get_random_seed Add support for aac streams in mp4/mov without extradata. aes: whitespace cosmetics adler32: whitespace cosmetics swscale: fix another yuv range conversion overflow in 16bit scaling. Fix cpu flags test program opt-test: Add missing braces to silence compiler warnings. build: Eliminate obsolete test targets. udp: Fix a compilation warning swscale: Unbreak build with --enable-small base64: add fate test aes: improve test program and add fate test adler32: make test program more useful and add fate test swscale: fix yuv range correction when using 16-bit scaling. aacenc: Make chan_map const correct Conflicts: Makefile doc/examples/muxing-example.c libavformat/udp.c libavutil/random_seed.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Fix a compilation warningMartin Storsjö2011-06-30
| | | | | | | | | | | | | | | | | | This fixes this compilation warning, by making endptr a non-const pointer, as required by strtol: In function ‘udp_open’: warning: passing argument 2 of ‘strtol’ from incompatible pointer type Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-25
|\| | | | | | | | | | | | | | | * qatar/master: configure: Add -Wno-format-zero-length to CFLAGS. udp: Receive on the remote port number, if no local port is set Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Receive on the remote port number, if no local port is setCan Wu2011-06-24
| | | | | | | | | | | | | | | | | | | | For a unicast udp stream to localhost:1234, currently ffplay udp://:1234?localport=1234 works, but ffplay udp://:1234 doesn't work. Signed-off-by: Martin Storsjö <martin@martin.st>
* | udp: support old, crappy non pthread modeMichael Niedermayer2011-06-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: fix indentionJULIAN GARDNER2011-06-03
| |
* | cleaned up the udp.c, removed some variables and an av_logJULIAN GARDNER2011-05-18
| |
* | udp: remove resource.h inclusion, it breaks mingw compilation.Michael Niedermayer2011-05-15
| | | | | | | | | | The header seems unneeded, if its needed we will put it back with appropriate #if Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | UDP: dont use thread_t as truth value.Michael Niedermayer2011-05-14
| | | | | | | | | | Unbreak compile on mingw. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: switch custom fifo to libavutil fifo.Michael Niedermayer2011-05-13
| | | | | | | | | | This also allows us to drop the semaphore as our fifo is lock free. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: use FFMAX&FFMIN.Michael Niedermayer2011-05-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: add a thread into udp.c for receiving data into a circular buffer, this ↵JULIAN GARDNER2011-05-13
| | | | | | | | | | | | stops the problem of live decoding/encoding giving errors. Also added a buf_size which is the number of TS packets that to be allocated for the circular buffer.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (33 commits) rtpdec_qdm2: Don't try to parse data packet if no configuration is received ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand. ac3enc: clean up count_frame_bits() and count_frame_bits_fixed() mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame. srtdec: make sure we don't write past the end of buffer wmaenc: improve channel count and bitrate error handling in encode_init() matroskaenc: make sure we don't produce invalid file with no codec ID matroskadec: check that pointers were initialized before accessing them lavf: fix function name in compute_pkt_fields2 av_dlog message lavf: fix av_find_best_stream when providing a wanted stream. lavf: fix av_find_best_stream when decoder_ret is given and using a related stream. ffmpeg: factorize quality calculation tiff: add support for SamplesPerPixel tag in tiff_decode_tag() tiff: Prefer enum TiffCompr over int for TiffContext.compr. mov: Support edit list atom version 1. configure: Enable libpostproc automatically if GPL code is enabled. Cosmetics: fix prototypes in oggdec oggdec: fix memleak with continuous streams. matroskaenc: add missing new line in av_log() call dnxhdenc: add AVClass in private context. ... swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code. Above code is also just in case its not obvios to a large extended duplicates that where cherry picked from ffmpeg. Conflicts: configure ffmpeg.c libavformat/matroskaenc.c libavutil/pixfmt.h libswscale/ppc/swscale_template.c libswscale/swscale.c libswscale/swscale_template.c libswscale/utils.c libswscale/x86/swscale_template.c tests/fate/h264.mak tests/ref/lavfi/pixdesc_le tests/ref/lavfi/pixfmts_copy_le tests/ref/lavfi/pixfmts_null_le tests/ref/lavfi/pixfmts_scale_le tests/ref/lavfi/pixfmts_vflip_le Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems since it causes certain system functions to be hidden on some (BSD) systems. The solution is to only add the flag on systems that really require it, i.e. glibc-based ones. This change makes BSD systems compile out-of-the-box without the need for adding specific flags manually. It also allows dropping a number of flags set manually on a file-per-file basis, but were only present to work around breakage introduced by the presence of _POSIX_C_SOURCE. Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions in several places already, so it is preferable to define it globally instead of littering source files with individual #defines only needed for glibc.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegaudiodec: group #includes more sanely mpegaudio: remove #if 0 blocks ffmpeg.c: reset avoptions after each input/output file. ffmpeg.c: store per-output stream sws flags. mpegaudio: remove CONFIG_MPEGAUDIO_HP option mpegtsenc: Clear st->priv_data when freeing it udp: Fix receiving RTP data over multicast rtpproto: Remove an unused variable regtest: fix wma tests NOT pulled: mpegaudio: remove CONFIG_AUDIO_NONSHORT regtest: separate flags for encoding and decoding Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Fix receiving RTP data over multicastMartin Storsjö2011-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, AVIO_RDWR was handled as READ, and all the checks for the AVIO_WRONLY flag explicitly meant the write-only case. When changed from old AVIO/URL contants to AVIO_FLAG in 59d96941f0285a5, these comparisons were updated incorrectly, by mapping checks for AVIO_WRONLY to checks for AVIO_FLAG_WRITE. When receiving RTP over UDP, the urlcontext is opened with READ_WRITE flags. This patch updates the flag comparisons to check for the same conditions as the code did prior to 59d96941f0285a5. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-20
| | | | | | | | | | | | | | 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-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (37 commits) In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function. lavc: remove reference to opt.h from Makefile. prefer avio_check() over url_exist() avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols lavu: remove misc disabled cruft lavu: remove FF_API_OLD_IMAGE_NAMES cruft NOT PULLED lavu: remove FF_API_OLD_EVAL_NAMES cruft lavc: remove misc disabled cruft. lavc: remove the FF_API_INOFFICIAL cruft. lavc: remove the FF_API_SET_STRING_OLD cruft. lavc: remove the FF_API_USE_LPC cruft. lavc: remove the FF_API_SUBTITLE_OLD cruft. lavc: remove the FF_API_VIDEO_OLD cruft. lavc: remove the FF_API_AUDIO_OLD cruft. lavc: remove the FF_API_OPT_SHOW cruft. lavc: remove the FF_API_MM_FLAGS cruft. lavf: remove misc disabled cruft. lavf: remove FF_API_INDEX_BUILT cruft lavf: remove FF_API_URL_CLASS cruft. lavf: remove FF_API_SYMVER cruft ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbolsStefano Sabatini2011-04-19
| | | | | | | | | | | | | | | | Make AVIO_FLAG_ access constants work as flags, and in particular fix the behavior of functions (such as avio_check()) which expect them to be flags rather than modes. This breaks API.
| * lavf: remove FF_API_UDP_GET_FILE cruftAnton Khirnov2011-04-19
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-08
| | | | | | | | | | This is more readable and makes it easier to reorder URLProtocol members.
* | 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>
| * 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: 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.
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * newdev/master: avio: make udp_set_remote_url/get_local_port internal. asfdec: also subtract preroll when reading simple index object matroskaenc: remove a variable that's unused after bc17bd9. avio: cosmetics - nicer vertical alignment. Remove unnecessary icc version checks Disable 'attribute "foo" ignored' warnings from icc rtsp: Don't use a locale dependent format string Add xd55 codec tag for XDCAM HD422 720p25 CBR files. configure: get libavcodec version from new version.h header lavc: move the version macros to a new installed header. matroskaenc: simplify get_aac_sample_rates by using ff_mpeg4audio_get_config Do not use format string "%0.3f" for RTSP Range field. Add apply_window_int16() to DSPContext with x86-optimized versions and use it in the ac3_fixed encoder. Document usage of import libraries created by dlltool configure: Set the correct lib target for arm/wince dlltool fate: simplify regression-funcs.sh fate: add support for multithread testing Conflicts: libavformat/rtspdec.c libavutil/attributes.h libavutil/internal.h libavutil/mem.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: make udp_set_remote_url/get_local_port internal.Anton Khirnov2011-03-23
| |
| * 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>
* Move find_info_tag to lavu and add av_ prefix to itAnton Khirnov2011-02-17
| | | | Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* udp: Enable address reuse by default for multicastDavid Fries2011-02-09
| | | | | | | | Keep the original corner case behaviour, where reuse is enabled for the case where no argument is given to the reuse url option. Signed-off-by: Martin Storsjö <martin@martin.st> 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.
* udp: Allow specifying the connect option in udp_set_remote_url, tooMartin Storsjö2011-01-06
| | | | | | | If the remote address is updated later with this function, the caller shouldn't set the connect option until in this call. Originally committed as revision 26245 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add FF_API_UDP_GET_FILE define to disable the deprecated udp_get_file_handle()Aurelien Jacobs2010-10-15
| | | | | | public function Originally committed as revision 25481 to svn://svn.ffmpeg.org/ffmpeg/trunk
* ReindentMartin Storsjö2010-10-08
| | | | Originally committed as revision 25406 to svn://svn.ffmpeg.org/ffmpeg/trunk
* udp: Add an option for connecting the udp socketMartin Storsjö2010-10-08
| | | | | | | | | | This allows us to find out the local sending address via getsockname, otherwise we just get INADDR_ANY (or similar for v6). This also makes writes return ECONNREFUSED if nobody is listening on the receiving port. Originally committed as revision 25405 to svn://svn.ffmpeg.org/ffmpeg/trunk