summaryrefslogtreecommitdiff
path: root/libavformat/allformats.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-02-19 10:39:29 +0100
committerAnton Khirnov <anton@khirnov.net>2016-02-22 11:30:58 +0100
commit2758cdedfb7ac61f8b5e4861f99218b6fd43491d (patch)
tree7280b43fe38dff1db077ffd8ebfeabbb850718d4 /libavformat/allformats.c
parent225e84e74544062706c0159ec0737b0e1d40915f (diff)
lavf: reorganize URLProtocols
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.
Diffstat (limited to 'libavformat/allformats.c')
-rw-r--r--libavformat/allformats.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index a514c630fb..687ae1bf2a 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -41,13 +41,6 @@
#define REGISTER_MUXDEMUX(X, x) REGISTER_MUXER(X, x); REGISTER_DEMUXER(X, x)
-#define REGISTER_PROTOCOL(X, x) \
- { \
- extern URLProtocol ff_##x##_protocol; \
- if (CONFIG_##X##_PROTOCOL) \
- ffurl_register_protocol(&ff_##x##_protocol); \
- }
-
void av_register_all(void)
{
static int initialized;
@@ -264,42 +257,4 @@ void av_register_all(void)
REGISTER_DEMUXER (XWMA, xwma);
REGISTER_DEMUXER (YOP, yop);
REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
-
- /* protocols */
- REGISTER_PROTOCOL(CONCAT, concat);
- REGISTER_PROTOCOL(CRYPTO, crypto);
- REGISTER_PROTOCOL(FFRTMPCRYPT, ffrtmpcrypt);
- REGISTER_PROTOCOL(FFRTMPHTTP, ffrtmphttp);
- REGISTER_PROTOCOL(FILE, file);
- REGISTER_PROTOCOL(GOPHER, gopher);
- REGISTER_PROTOCOL(HLS, hls);
- REGISTER_PROTOCOL(HTTP, http);
- REGISTER_PROTOCOL(HTTPPROXY, httpproxy);
- REGISTER_PROTOCOL(HTTPS, https);
- REGISTER_PROTOCOL(ICECAST, icecast);
- REGISTER_PROTOCOL(MMSH, mmsh);
- REGISTER_PROTOCOL(MMST, mmst);
- REGISTER_PROTOCOL(MD5, md5);
- REGISTER_PROTOCOL(PIPE, pipe);
- REGISTER_PROTOCOL(RTMP, rtmp);
- REGISTER_PROTOCOL(RTMPE, rtmpe);
- REGISTER_PROTOCOL(RTMPS, rtmps);
- REGISTER_PROTOCOL(RTMPT, rtmpt);
- REGISTER_PROTOCOL(RTMPTE, rtmpte);
- REGISTER_PROTOCOL(RTMPTS, rtmpts);
- REGISTER_PROTOCOL(RTP, rtp);
- REGISTER_PROTOCOL(SCTP, sctp);
- REGISTER_PROTOCOL(SRTP, srtp);
- REGISTER_PROTOCOL(TCP, tcp);
- REGISTER_PROTOCOL(TLS_GNUTLS, tls_gnutls);
- REGISTER_PROTOCOL(TLS_OPENSSL, tls_openssl);
- REGISTER_PROTOCOL(UDP, udp);
- REGISTER_PROTOCOL(UNIX, unix);
-
- /* external libraries */
- REGISTER_PROTOCOL(LIBRTMP, librtmp);
- REGISTER_PROTOCOL(LIBRTMPE, librtmpe);
- REGISTER_PROTOCOL(LIBRTMPS, librtmps);
- REGISTER_PROTOCOL(LIBRTMPT, librtmpt);
- REGISTER_PROTOCOL(LIBRTMPTE, librtmpte);
}