diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2012-07-20 16:36:47 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-07-23 16:32:09 +0300 |
commit | 08cd95e8a37674401ed24e5e6f4f7402edb7fdeb (patch) | |
tree | 3b0c2a52c4f70859b9a72ecab74f781d4a092f65 /libavformat/rtmpproto.c | |
parent | acd554c103459ae7a5d89caa611e91bbc9bf695f (diff) | |
download | ffmpeg-08cd95e8a37674401ed24e5e6f4f7402edb7fdeb.tar.gz |
RTMPTE protocol support
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 67a89c5c82..f7ba7d5ef8 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1192,7 +1192,10 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) if (port < 0) port = RTMPS_DEFAULT_PORT; ff_url_join(buf, sizeof(buf), "tls", NULL, hostname, port, NULL); - } else if (!strcmp(proto, "rtmpe")) { + } else if (!strcmp(proto, "rtmpe") || (!strcmp(proto, "rtmpte"))) { + if (!strcmp(proto, "rtmpte")) + av_dict_set(&opts, "ffrtmpcrypt_tunneling", "1", 1); + /* open the encrypted connection */ ff_url_join(buf, sizeof(buf), "ffrtmpcrypt", NULL, hostname, port, NULL); rt->encrypted = 1; @@ -1574,6 +1577,24 @@ URLProtocol ff_rtmpt_protocol = { .priv_data_class = &rtmpt_class, }; +static const AVClass rtmpte_class = { + .class_name = "rtmpte", + .item_name = av_default_item_name, + .option = rtmp_options, + .version = LIBAVUTIL_VERSION_INT, +}; + +URLProtocol ff_rtmpte_protocol = { + .name = "rtmpte", + .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 = &rtmpte_class, +}; + static const AVClass rtmpts_class = { .class_name = "rtmpts", .item_name = av_default_item_name, |