diff --git a/configure b/configure index 6b46ee4e02..9639147f86 100755 --- a/configure +++ b/configure @@ -1526,6 +1526,8 @@ vfwcap_indev_extralibs="-lavicap32" x11_grab_device_indev_deps="x11grab XShmCreateImage" # protocols +ffrtmphttp_protocol_deps="!librtmp_protocol" +ffrtmphttp_protocol_select="http_protocol" gopher_protocol_deps="network" httpproxy_protocol_deps="network" httpproxy_protocol_select="tcp_protocol" @@ -1541,10 +1543,8 @@ mmsh_protocol_select="http_protocol" mmst_protocol_deps="network" rtmp_protocol_deps="!librtmp_protocol" rtmp_protocol_select="tcp_protocol" -rtmphttp_protocol_deps="!librtmp_protocol" -rtmphttp_protocol_select="http_protocol" rtmpt_protocol_deps="!librtmp_protocol" -rtmpt_protocol_select="rtmphttp_protocol" +rtmpt_protocol_select="ffrtmphttp_protocol" rtp_protocol_select="udp_protocol" sctp_protocol_deps="network netinet_sctp_h" tcp_protocol_deps="network" diff --git a/libavformat/Makefile b/libavformat/Makefile index 40f5371c44..ae057f2eab 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -340,6 +340,7 @@ OBJS-$(CONFIG_LIBRTMP) += librtmp.o OBJS-$(CONFIG_APPLEHTTP_PROTOCOL) += hlsproto.o OBJS-$(CONFIG_CONCAT_PROTOCOL) += concat.o OBJS-$(CONFIG_CRYPTO_PROTOCOL) += crypto.o +OBJS-$(CONFIG_FFRTMPHTTP_PROTOCOL) += rtmphttp.o OBJS-$(CONFIG_FILE_PROTOCOL) += file.o OBJS-$(CONFIG_GOPHER_PROTOCOL) += gopher.o OBJS-$(CONFIG_HLS_PROTOCOL) += hlsproto.o @@ -351,7 +352,6 @@ OBJS-$(CONFIG_MMST_PROTOCOL) += mmst.o mms.o asf.o OBJS-$(CONFIG_MD5_PROTOCOL) += md5proto.o OBJS-$(CONFIG_PIPE_PROTOCOL) += file.o OBJS-$(CONFIG_RTMP_PROTOCOL) += rtmpproto.o rtmppkt.o -OBJS-$(CONFIG_RTMPHTTP_PROTOCOL) += rtmphttp.o OBJS-$(CONFIG_RTMPT_PROTOCOL) += rtmpproto.o rtmppkt.o OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o OBJS-$(CONFIG_SCTP_PROTOCOL) += sctp.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 8456398cb5..34d8359509 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -246,6 +246,7 @@ void av_register_all(void) #endif REGISTER_PROTOCOL (CONCAT, concat); REGISTER_PROTOCOL (CRYPTO, crypto); + REGISTER_PROTOCOL (FFRTMPHTTP, ffrtmphttp); REGISTER_PROTOCOL (FILE, file); REGISTER_PROTOCOL (GOPHER, gopher); REGISTER_PROTOCOL (HLS, hls); @@ -257,7 +258,6 @@ void av_register_all(void) REGISTER_PROTOCOL (MD5, md5); REGISTER_PROTOCOL (PIPE, pipe); REGISTER_PROTOCOL (RTMP, rtmp); - REGISTER_PROTOCOL (RTMPHTTP, rtmphttp); REGISTER_PROTOCOL (RTMPT, rtmpt); REGISTER_PROTOCOL (RTP, rtp); REGISTER_PROTOCOL (SCTP, sctp); diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c index 499341a173..febe4b31d5 100644 --- a/libavformat/rtmphttp.c +++ b/libavformat/rtmphttp.c @@ -240,8 +240,8 @@ fail: return ret; } -URLProtocol ff_rtmphttp_protocol = { - .name = "rtmphttp", +URLProtocol ff_ffrtmphttp_protocol = { + .name = "ffrtmphttp", .url_open = rtmp_http_open, .url_read = rtmp_http_read, .url_write = rtmp_http_write, diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 5342be8dc4..f8ec894344 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1120,7 +1120,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) if (!strcmp(proto, "rtmpt")) { /* open the http tunneling connection */ - ff_url_join(buf, sizeof(buf), "rtmphttp", NULL, hostname, port, NULL); + ff_url_join(buf, sizeof(buf), "ffrtmphttp", NULL, hostname, port, NULL); } else { /* open the tcp connection */ if (port < 0)