Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
c0c45e23
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c0c45e23
编写于
6月 14, 2020
作者:
M
Marvin Scholz
提交者:
Michael Niedermayer
7月 02, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avformat/icecast: Add option to use TLS connection
Signed-off-by:
N
Michael Niedermayer
<
michael@niedermayer.cc
>
上级
0e10f545
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
1 deletion
+8
-1
doc/protocols.texi
doc/protocols.texi
+3
-0
libavformat/icecast.c
libavformat/icecast.c
+5
-1
未找到文件。
doc/protocols.texi
浏览文件 @
c0c45e23
...
...
@@ -535,6 +535,9 @@ audio/mpeg.
This enables support for Icecast versions < 2.4.0, that do not support the
HTTP PUT method but the SOURCE method.
@item tls
Establish a TLS (HTTPS) connection to Icecast.
@end table
@example
...
...
libavformat/icecast.c
浏览文件 @
c0c45e23
...
...
@@ -43,6 +43,7 @@ typedef struct IcecastContext {
int
public
;
char
*
url
;
char
*
user_agent
;
int
tls
;
}
IcecastContext
;
#define DEFAULT_ICE_USER "source"
...
...
@@ -62,6 +63,7 @@ static const AVOption options[] = {
{
"password"
,
"set password"
,
OFFSET
(
pass
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
E
},
{
"content_type"
,
"set content-type, MUST be set if not audio/mpeg"
,
OFFSET
(
content_type
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
E
},
{
"legacy_icecast"
,
"use legacy SOURCE method, for Icecast < v2.4"
,
OFFSET
(
legacy_icecast
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
E
},
{
"tls"
,
"use a TLS connection"
,
OFFSET
(
tls
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
E
},
{
NULL
}
};
...
...
@@ -162,7 +164,9 @@ static int icecast_open(URLContext *h, const char *uri, int flags)
}
// Build new URI for passing to http protocol
ff_url_join
(
h_url
,
sizeof
(
h_url
),
"http"
,
auth
,
host
,
port
,
"%s"
,
path
);
ff_url_join
(
h_url
,
sizeof
(
h_url
),
s
->
tls
?
"https"
:
"http"
,
auth
,
host
,
port
,
"%s"
,
path
);
// Finally open http proto handler
ret
=
ffurl_open_whitelist
(
&
s
->
hd
,
h_url
,
AVIO_FLAG_READ_WRITE
,
NULL
,
&
opt_dict
,
h
->
protocol_whitelist
,
h
->
protocol_blacklist
,
h
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录