diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-18 20:05:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-18 20:07:00 +0200 |
commit | 82edf6727f0663601351081ca1e4fb20d1752972 (patch) | |
tree | 12479c3ec8cedfa0ec4dda38a72023224f2b5b73 /libavformat/rtmpproto.c | |
parent | f87dacb27de93f995cb18f9dcc73581ef8fc157b (diff) | |
parent | f61ce90caa909d131ea6ec205823568a38115529 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavr: add x86-optimized functions for mixing 1-to-2 s16p with flt coeffs
lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
Add Dolby/DPLII downmix support to libavresample
vorbisdec: replace div/mod in loop with a counter
fate: vorbis: add 5.1 surround test
rtpenc: Allow requesting H264 RTP packetization mode 0
configure: Sort the library listings in the help text alphabetically
dwt: remove variable-length arrays
RTMPT protocol support
http: Properly handle chunked transfer-encoding for replies to post data
http: Fail reading if the connection has gone away
amr: Mark an array const
amr: More space cleanup
rtpenc: Fix memory leaks in the muxer open function
Conflicts:
Changelog
configure
doc/APIchanges
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 03f959e009..07ec62cc43 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1112,9 +1112,15 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port, path, sizeof(path), s->filename); - if (port < 0) - port = RTMP_DEFAULT_PORT; - ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL); + if (!strcmp(proto, "rtmpt")) { + /* open the http tunneling connection */ + ff_url_join(buf, sizeof(buf), "rtmphttp", NULL, hostname, port, NULL); + } else { + /* open the tcp connection */ + if (port < 0) + port = RTMP_DEFAULT_PORT; + ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL); + } if ((ret = ffurl_open(&rt->stream, buf, AVIO_FLAG_READ_WRITE, &s->interrupt_callback, NULL)) < 0) { @@ -1425,3 +1431,21 @@ URLProtocol ff_rtmp_protocol = { .flags = URL_PROTOCOL_FLAG_NETWORK, .priv_data_class= &rtmp_class, }; + +static const AVClass rtmpt_class = { + .class_name = "rtmpt", + .item_name = av_default_item_name, + .option = rtmp_options, + .version = LIBAVUTIL_VERSION_INT, +}; + +URLProtocol ff_rtmpt_protocol = { + .name = "rtmpt", + .url_open = rtmp_open, + .url_read = rtmp_read, + .url_write = rtmp_write, + .url_close = rtmp_close, + .priv_data_size = sizeof(RTMPContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, + .priv_data_class = &rtmpt_class, +}; |