summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
Commit message (Collapse)AuthorAge
* lavf/udp: Do not use MCAST_* for multicast on tvOS.Carl Eugen Hoyos2016-09-03
| | | | Fixes ticket #5774.
* avformat/udp: replace packet_gap with bitrate optionMarton Balint2016-06-19
| | | | | | | | We haven't had a stable release since the packet_gap addition, so probably it is worth reworking the option to something that makes more sense to the end user. Also add burst_bits option to specify maximum length of bit bursts. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/udp: do not accumulate packet_gap delay errorsMarton Balint2016-06-19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/udp: fix dead code.Nicolas George2016-06-03
| | | | | | | | | | Since d607861, service can not be NULL, only "0". An UDP address with neither local port nor address leaves both service and node to their default value, and POSIX specifies that they are not allowed to be both NULL; "0" is equivalent to an unspecified port for all currently known protocols. Fix CID 1341570.
* avformat/udp: Protect write to circular_buffer_error by mutexMichael Niedermayer2016-06-02
| | | | | | | This isnt really needed on most platforms but fixes CID1362183 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/udp: Remove unused variableMichael Niedermayer2016-05-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/udp: Close the socket after destroying the thread using the socketMichael Niedermayer2016-05-25
| | | | | | for send() this cannot work and even for recv() it feels very wrong and hackish Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/udp: redesign threaded udp tx codeMichael Niedermayer2016-05-25
| | | | | | | | | | | This fixes partially completed send() Avoids holding the mutex during send() fixes race conditions in error handling removes copied non thread specific blocking code Fixes deadlocks on closure Fixes data loss on closure Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/udp: Add a delay between packets for streaming to clients with ↵Pavel Nikiforov2016-05-25
| | | | | | | | | | | | | | | | short buffer This commit enables sending UDP packets in a background thread with specified delay. When sending packets without a delay some devices with small RX buffer ( MAG200 STB, for example) will drop tail packets in bursts causing decoding errors. To use it specify "fifo_size" with "packet_gap" . The output url will looks like udp://xxx:yyy?fifo_size=<output fifo size>&packet_gap=<delay in usecs> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d'Derek Buitenhuis2016-02-29
|\ | | | | | | | | | | | | | | | | | | | | This commit also disables the async fate test, because it used internal APIs in a non-kosher way, which no longer exists. * commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d': lavf: reorganize URLProtocols Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: reorganize URLProtocolsAnton Khirnov2016-02-22
| | | | | | | | | | | | | | | | | | | | Instead of a linked list constructed at av_register_all(), store them in a constant array of pointers. Since no registration is necessary now, this removes some global state from lavf. This will also allow the urlprotocol layer caller to limit the available protocols in a simple and flexible way in the following commits.
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | Merge commit '12b14382861fbf19378afcddaa19cd9a949a86a3'Hendrik Leppkes2015-11-29
|\| | | | | | | | | | | | | * commit '12b14382861fbf19378afcddaa19cd9a949a86a3': udp: Provide additional information on getaddrinfo failure Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * udp: Provide additional information on getaddrinfo failureLuca Barbato2015-11-25
| |
* | Merge commit '34af7813f77e2b5b9dcb34f20bcf53bfcc0ba9c9'Hendrik Leppkes2015-11-29
|\| | | | | | | | | | | | | * commit '34af7813f77e2b5b9dcb34f20bcf53bfcc0ba9c9': udp: Use the logging context Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * udp: Use the logging contextLuca Barbato2015-11-25
| |
| * udp: Fix local_port managementLuca Barbato2015-06-22
| | | | | | | | | | | | The default value for unset is -1, not 0. Problem introduced in 66028b7ba6b411ba12ef553e9c8f1f4a4fe27710
* | all: add _DEFAULT_SOURCE locally wherever neededGanesh Ajjanagadde2015-10-04
| | | | | | | | | | | | | | | | | | Glibc 2.20 onwards generates a deprecation warning for usage of _BSD_SOURCE and _SVID_SOURCE. The solution from man feature_test_macros is to define both _DEFAULT_SOURCE and the old macros. This solution is on the lines of the one in commit af1818276ef271af98e2e2bbabb4dc875b4fa7d8. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | avformat/udp: Remove (harmless) duplicated pkt_size entry from AVOption tableMichael Niedermayer2015-03-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ff7adead0a667e606f5a41dca591f074f9ff2f32'Michael Niedermayer2015-03-29
|\| | | | | | | | | | | | | * commit 'ff7adead0a667e606f5a41dca591f074f9ff2f32': udp: Fix pkt_size management Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Fix pkt_size managementLuca Barbato2015-03-29
| | | | | | | | | | | | | | | | The default value for unset is -1, not 0. Problem introduced in 66028b7ba6b411ba12ef553e9c8f1f4a4fe27710 Bug-Id: 835
* | Merge commit '8dc72eeaf647736c287b59a3856a11904bedd58b'Michael Niedermayer2015-03-19
|\| | | | | | | | | | | | | | | * commit '8dc72eeaf647736c287b59a3856a11904bedd58b': udp: Fix crashes after adding AVOptions See: aefed6ca87971a9d277157c92fef4cdd42c5c1e2 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Fix crashes after adding AVOptionsMartin Storsjö2015-03-19
| | | | | | | | | | | | | | | | | | | | | | Add a missing AVClass member, check whether localaddr is null. (Previously, localaddr was always a local stack buffer, while it now also can be an avoption string which can be null.) This fixes crashes when not passing any localaddr parameter, since 66028b7ba. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '66028b7ba6b411ba12ef553e9c8f1f4a4fe27710'Michael Niedermayer2015-03-16
|\| | | | | | | | | | | | | | | | | | | | | * commit '66028b7ba6b411ba12ef553e9c8f1f4a4fe27710': udp: Use AVOptions Conflicts: libavformat/udp.c See: aefed6ca87971a9d277157c92fef4cdd42c5c1e2 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * udp: Use AVOptionsLuca Barbato2015-03-15
| | | | | | | | Add AVOptions for options currently available as url parameters.
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e': avformat: Don't anonymously typedef structs Conflicts: libavformat/adtsenc.c libavformat/aiffenc.c libavformat/avidec.c libavformat/gif.c libavformat/iff.c libavformat/img2dec.c libavformat/jvdec.c libavformat/matroskadec.c libavformat/udp.c libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
| |
* | avformat/udp: Allow to specify DSCP classVincent Bernat2014-11-27
| | | | | | | | | | | | | | | | | | By appending `?dscp=26` to the URL, IP packets will be classified as AF31 (assured forwarding for multimedia flows with low probability of loss). On congested network, this allows a user to assign priorities to flows. Signed-off-by: Vincent Bernat <vincent@bernat.im>
* | avformat/udp: UDP-Lite (RFC 3828) support addedThomas Volkert2014-11-05
| | | | | | | | | | | | (This fixes ticket #1501) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/udp: Move variables used only with HAVE_PTHREAD_CANCEL, under the #ifMichael Niedermayer2014-08-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/udp: remove unneeded variable initializationMichael Niedermayer2014-08-16
| | | | | | | | | | Found-by: James Darnley <james.darnley@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/udp: dont mix integers with pointersMichael Niedermayer2014-08-16
| | | | | | | | | | Reviewed-by: James Darnley <james.darnley@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/udp: fix build on MINIXMichael Niedermayer2014-06-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Support broadcast destination for udp protocolOlivier Langlois2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the required socket option SO_BROADCAST to be able to stream to a broadcast address. Prior to the patch, trying to stream to a broadcast address was resulting to the following error: av_interleaved_write_frame(): Permission denied The patch has been tested with: ffmpeg -f v4l2 -framerate 30 -input_format yuyv422 -video_size 640x480 -i /dev/video0 \ -c:v libx264 -profile:v high -preset ultrafast -tune zerolatency -b:v 500k -pix_fmt yuv420p \ -f mpegts udp://192.168.1.255:5004?broadcast=1 I have added an option to let the user explicitly request broadcast in order to avoid ffmpeg to broadcast unintentionally. Signed-off-by: Olivier Langlois <olivier@trillion01.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: use av_fifo_freepLukasz Marek2014-05-07
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | avformat/udp: cleanup comments, add a warning if receive buffer is ↵rogerdpack2014-03-22
| | | | | | | | | | | | | | | | | | unexpectedly unable to be set high enough which can happen easily in linux Signed-off-by: rogerdpack <rogerpack2005@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/udp: debug log udp socket sizerogerdpack2014-01-08
| | | | | | | | | | 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-25
| |
* | UDP: join multicast group on the interface specified with &localaddr=Stoian Ivanov2013-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-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
| |
* | Merge commit '7d99c92945e4b2d12ed2126365482e1900340da0'Michael Niedermayer2013-07-30
|\| | | | | | | | | | | | | | | | | | | * 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-29
| | | | | | | | | | | | | | 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-30
|\| | | | | | | | | | | | | * 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-29
| | | | | | | | | | | | | | | | 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-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avdevice: add missing time.h includesMichael Niedermayer2013-03-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | udp: check ff_socket_nonblock() return codeMichael Niedermayer2012-11-05
| | | | | | | | | | Fixes CID733719 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26'Michael Niedermayer2012-10-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-27
| | | | | | | | | | | | | | getsockname() takes a pointer to socklen_t which is not necessarily int. Signed-off-by: Mans Rullgard <mans@mansr.com>