Michael Niedermayer
efa9e6b423
ff_network_wait_fd_timeout: do not break with timeout < 0
...
Most code treats timeout < 0 like 0 already
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
ec7c51c786
avf: move ff_http_match_no_proxy to network
...
It is only used by network protocols.
12 years ago
Michael Niedermayer
21bf0d6f80
avformat/network: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
9835abb6d6
network: uniform ff_listen_bind and ff_listen_connect
...
Document the functions and have both use a millisecond timeout and
check for interrupt.
12 years ago
Michael Niedermayer
c8faa47484
avformat/network: check the return value from setsockopt()
...
Fixes: CID1026742
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
f849a77e67
network: factor out connect-listening code
...
Introduce ff_listen_connect, to be shared with the other
non-tcp network protocols.
12 years ago
Luca Barbato
28306e6d62
network: factor out bind-listening code
...
Introduce ff_listen_bind, to be shared with the other non-tcp
network protocols.
12 years ago
Dave Yeo
e615a77799
os2threads: move from lavc to compat/
...
For useage in other places besides lavc. Needed after commit
90f9a5830b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
90f9a5830b
w32pthreads: move from lavc to compat/
...
It will be used in other places than lavc.
12 years ago
Dave Yeo
925c9f444f
Fix OS/2 threading
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
12 years ago
Mans Rullgard
9efbfe57e0
network: use HAVE_THREADS instead of local hack
...
HAVE_THREADS is set in config.h if pthreads or w32threads is
available, which presumably the proper condition here.
Also fixes undefined behaviour in preprocessor directives.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Andrey Utkin
d2b18c8f5b
Introduce ff_network_wait_fd_timeout()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
70766c2182
Add some more missing includes after removing the implicit common.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Ronald S. Bultje
4b1b1449d9
network: Don't redefine error codes if they already exist in errno.h
...
Since the errno.h values don't match the error codes that winsock
returns, map the winsock error codes to the errno ones, to make
sure explicit checks against AVERROR(x) match.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
13 years ago
Sergey Radionov
139cef8e29
network: properly declare WSADATA in windows
...
Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Martin Storsjö
ce145690b6
avformat: Warn about using network functions without calling avformat_network_init
...
This is to make developers aware of the fact that they will
start using the new init function at some point.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
2461284630
openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
...
Since 1.0.0, this function is deprecated. A new function,
CRYPTO_THREADID_set_callback is available, but if not set at all,
it uses the address of errno as thread id, which should be
sufficient for most systems.
On windows, it never was necessary to use this function even
before 1.0.0, it used the right win32 API function for this
by default.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
1606e551ff
avformat: Initialize gnutls in ff_tls_init()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
48e59ad8e7
avformat: Add ff_tls_init()/deinit() that initialize OpenSSL
...
If the application hasn't set up mutex callbacks, we set up
our own using pthreads (or w32pthreads).
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
f6d3710096
avformat: Split out functions from network.h to a new file, network.c
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago