librtmp: Add "lib" prefix to librtmp URLProtocol declarations.
authorDiego Biurrun <diego@biurrun.de>
Mon, 13 Feb 2012 18:37:25 +0000 (19:37 +0100)
committerDiego Biurrun <diego@biurrun.de>
Tue, 14 Feb 2012 10:37:01 +0000 (11:37 +0100)
This allows easily differentiating between both implementations within the build
system and combining the native implementation for plain RTMP with librtmp for
the RTMPE, RTMPS, RTMPT, RTMPTE protocol variants.

configure
libavformat/Makefile
libavformat/allformats.c
libavformat/librtmp.c

index d816389..5c0e56c 100755 (executable)
--- a/configure
+++ b/configure
@@ -1501,13 +1501,15 @@ httpproxy_protocol_select="tcp_protocol"
 http_protocol_deps="network"
 http_protocol_select="tcp_protocol"
 https_protocol_select="tls_protocol"
+librtmp_protocol_deps="librtmp"
+librtmpe_protocol_deps="librtmp"
+librtmps_protocol_deps="librtmp"
+librtmpt_protocol_deps="librtmp"
+librtmpte_protocol_deps="librtmp"
 mmsh_protocol_select="http_protocol"
 mmst_protocol_deps="network"
+rtmp_protocol_deps="!librtmp_protocol"
 rtmp_protocol_select="tcp_protocol"
-rtmpe_protocol_deps="librtmp"
-rtmps_protocol_deps="librtmp"
-rtmpt_protocol_deps="librtmp"
-rtmpte_protocol_deps="librtmp"
 rtp_protocol_select="udp_protocol"
 tcp_protocol_deps="network"
 tls_protocol_deps_any="openssl gnutls"
index 0d6cb91..a465b2f 100644 (file)
@@ -323,6 +323,7 @@ OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER)      += yuv4mpeg.o
 # external libraries
 OBJS-$(CONFIG_LIBNUT_DEMUXER)            += libnut.o
 OBJS-$(CONFIG_LIBNUT_MUXER)              += libnut.o
+OBJS-$(CONFIG_LIBRTMP)                   += librtmp.o
 
 # protocols I/O
 OBJS+= avio.o aviobuf.o
@@ -339,12 +340,7 @@ OBJS-$(CONFIG_MMSH_PROTOCOL)             += mmsh.o mms.o asf.o
 OBJS-$(CONFIG_MMST_PROTOCOL)             += mmst.o mms.o asf.o
 OBJS-$(CONFIG_MD5_PROTOCOL)              += md5proto.o
 OBJS-$(CONFIG_PIPE_PROTOCOL)             += file.o
-
-# external or internal rtmp
-RTMP-OBJS-$(CONFIG_LIBRTMP)               = librtmp.o
-RTMP-OBJS-$(!CONFIG_LIBRTMP)              = rtmpproto.o rtmppkt.o
-OBJS-$(CONFIG_RTMP_PROTOCOL)             += $(RTMP-OBJS-yes)
-
+OBJS-$(CONFIG_RTMP_PROTOCOL)             += rtmpproto.o rtmppkt.o
 OBJS-$(CONFIG_RTP_PROTOCOL)              += rtpproto.o
 OBJS-$(CONFIG_TCP_PROTOCOL)              += tcp.o
 OBJS-$(CONFIG_TLS_PROTOCOL)              += tls.o
index 9a1f94d..9a55993 100644 (file)
@@ -237,9 +237,6 @@ void av_register_all(void)
     REGISTER_DEMUXER  (YOP, yop);
     REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
 
-    /* external libraries */
-    REGISTER_MUXDEMUX (LIBNUT, libnut);
-
     /* protocols */
     REGISTER_PROTOCOL (APPLEHTTP, applehttp);
     REGISTER_PROTOCOL (CONCAT, concat);
@@ -254,12 +251,16 @@ void av_register_all(void)
     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 (RTP, rtp);
     REGISTER_PROTOCOL (TCP, tcp);
     REGISTER_PROTOCOL (TLS, tls);
     REGISTER_PROTOCOL (UDP, udp);
+
+    /* external libraries */
+    REGISTER_MUXDEMUX (LIBNUT, libnut);
+    REGISTER_PROTOCOL (LIBRTMP, librtmp);
+    REGISTER_PROTOCOL (LIBRTMPE, librtmpe);
+    REGISTER_PROTOCOL (LIBRTMPS, librtmps);
+    REGISTER_PROTOCOL (LIBRTMPT, librtmpt);
+    REGISTER_PROTOCOL (LIBRTMPTE, librtmpte);
 }
index 2d028b0..8883bbc 100644 (file)
@@ -152,7 +152,7 @@ static int rtmp_get_file_handle(URLContext *s)
     return RTMP_Socket(r);
 }
 
-URLProtocol ff_rtmp_protocol = {
+URLProtocol ff_librtmp_protocol = {
     .name                = "rtmp",
     .url_open            = rtmp_open,
     .url_read            = rtmp_read,
@@ -165,7 +165,7 @@ URLProtocol ff_rtmp_protocol = {
     .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
-URLProtocol ff_rtmpt_protocol = {
+URLProtocol ff_librtmpt_protocol = {
     .name                = "rtmpt",
     .url_open            = rtmp_open,
     .url_read            = rtmp_read,
@@ -178,7 +178,7 @@ URLProtocol ff_rtmpt_protocol = {
     .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
-URLProtocol ff_rtmpe_protocol = {
+URLProtocol ff_librtmpe_protocol = {
     .name                = "rtmpe",
     .url_open            = rtmp_open,
     .url_read            = rtmp_read,
@@ -191,7 +191,7 @@ URLProtocol ff_rtmpe_protocol = {
     .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
-URLProtocol ff_rtmpte_protocol = {
+URLProtocol ff_librtmpte_protocol = {
     .name                = "rtmpte",
     .url_open            = rtmp_open,
     .url_read            = rtmp_read,
@@ -204,7 +204,7 @@ URLProtocol ff_rtmpte_protocol = {
     .flags               = URL_PROTOCOL_FLAG_NETWORK,
 };
 
-URLProtocol ff_rtmps_protocol = {
+URLProtocol ff_librtmps_protocol = {
     .name                = "rtmps",
     .url_open            = rtmp_open,
     .url_read            = rtmp_read,