| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
This fixes warnings about making integers from pointers without
a cast, and avoids the theoretical case where the lower 32 bits of
the pointer would all be zero where the implicit cast wouldn't give
the right result.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Document the functions and have both use a millisecond timeout and
check for interrupt.
|
|
|
|
|
| |
Introduce ff_listen_connect, to be shared with the other
non-tcp network protocols.
|
|
|
|
|
| |
Introduce ff_listen_bind, to be shared with the other non-tcp
network protocols.
|
|
|
|
|
|
|
| |
Without this patch a user a bit absent-minded may not notice that
the connection doesn't work because the port is missing.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
| |
This gives you the proper v4 or v6 version of the "any address",
allowing receiving connections on any address on the machine.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
|
|
|
| |
Make sure we actually have an error code in ret, in case
getsockopt failed.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
|
| |
tcp_shutdown() isn't needed at the moment, but is added for
consistency to explain how the function is supposed to be used.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
| |
Also remove one pointless zero initialization in rangecoder.c.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
The connect() timeout can take minutes, gets misreported as EIO and
isn't interruptible.
|
|
|
|
|
|
|
| |
Since the libavformat major bump, URLContext contains an AVClass,
making it a usable log context.
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
| |
This is more readable and makes it easier to reorder URLProtocol
members.
|
| |
|
| |
|
|
|
|
|
|
| |
This way is possible to have simple micro-server act like
ffmpeg -i file.nut -vcodec copy -acodec copy -f nut tcp://foo:1234?listen
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
|
|
|
|
|
| |
Select has limitations on the fd values it could accept and silently
breaks when it is reached.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This makes it possible to abort a blocking connect call.
Patch by Thomas Guillem, thomas dot guillem at gmail
Originally committed as revision 26014 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
| |
already does AVERROR().
Originally committed as revision 25671 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
|
|
| |
On windows, a connection failure doesn't trigger wfds as it does on unix.
This fixes issue 2237, based on code by yeyingxian.
Originally committed as revision 25154 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
| |
in tcp.c.
Originally committed as revision 24796 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
|
| |
ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.
Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
| |
Originally committed as revision 23401 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
| |
Originally committed as revision 22694 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
| |
those functions are not part of the public API
Originally committed as revision 22534 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
| |
Since this function isn't in the public API, it should have an ff_ prefix.
Originally committed as revision 22321 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
| |
Networking is always initialized when opening protocols.
Originally committed as revision 22227 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
| |
Originally committed as revision 21490 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
| |
<$firstname()$firstname,st>.
Originally committed as revision 21147 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
|
|
|
|
| |
If ff_neterrno() is checked instead of errno, that's probably what should be
used in the return value.
As a sideeffect, this gives better compatibility with Windows (CE), where
network errors aren't visible in errno.)
patch by Martin Storsjö, martin martin st
Originally committed as revision 19433 to svn://svn.ffmpeg.org/ffmpeg/trunk
|
|
|
|
|
|
|
|
|
|
|
| |
associated with the I/O handle (e.g. the fd returned by open()). See
"[RFC] rtsp.c EOF support" thread.
There were previously some URI-specific implementations of the same idea,
e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are
deprecated by this patch and will be removed at the next major API bump.
Originally committed as revision 17779 to svn://svn.ffmpeg.org/ffmpeg/trunk
|