Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6cd796a9
提交
6cd796a9
authored
12月 09, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-8293 add quality level 0 to conference (default is 1) and fix some logic in auto bw
上级
d35d7344
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
51 行增加
和
39 行删除
+51
-39
switch_utils.h
src/include/switch_utils.h
+9
-3
avcodec.c
src/mod/applications/mod_av/avcodec.c
+1
-1
conference_video.c
src/mod/applications/mod_conference/conference_video.c
+36
-30
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+3
-3
mod_openh264.cpp
src/mod/codecs/mod_openh264/mod_openh264.cpp
+1
-1
mod_vpx.c
src/mod/codecs/mod_vpx/mod_vpx.c
+1
-1
没有找到文件。
src/include/switch_utils.h
浏览文件 @
6cd796a9
...
...
@@ -995,14 +995,20 @@ SWITCH_DECLARE(char *) switch_util_quote_shell_arg_pool(const char *string, swit
#define SWITCH_READ_ACCEPTABLE(status) (status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK || status == SWITCH_STATUS_INUSE)
static
inline
int32_t
switch_calc_bitrate
(
int
w
,
int
h
,
int
quality
,
int
fps
)
static
inline
int32_t
switch_calc_bitrate
(
int
w
,
int
h
,
int
quality
,
double
fps
)
{
int
r
;
/* KUSH GAUGE*/
if
(
!
fps
)
fps
=
15
;
if
(
!
quality
)
quality
=
2
;
return
(
int32_t
)((
float
)(
w
*
h
*
fps
*
quality
)
*
0
.
07
)
/
1000
;
r
=
(
int32_t
)((
double
)(
w
*
h
*
fps
*
(
quality
?
quality
:
1
))
*
0
.
07
)
/
1000
;
if
(
!
quality
)
r
/=
2
;
return
r
;
}
static
inline
int32_t
switch_parse_bandwidth_string
(
const
char
*
bwv
)
...
...
src/mod/applications/mod_av/avcodec.c
浏览文件 @
6cd796a9
...
...
@@ -845,7 +845,7 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt
if
(
context
->
codec_settings
.
video
.
bandwidth
)
{
context
->
bandwidth
=
context
->
codec_settings
.
video
.
bandwidth
*
8
;
}
else
{
context
->
bandwidth
=
switch_calc_bitrate
(
context
->
codec_settings
.
video
.
width
,
context
->
codec_settings
.
video
.
height
,
0
,
0
)
*
8
;
context
->
bandwidth
=
switch_calc_bitrate
(
context
->
codec_settings
.
video
.
width
,
context
->
codec_settings
.
video
.
height
,
1
,
15
)
*
8
;
}
sane
=
switch_calc_bitrate
(
1920
,
1080
,
2
,
30
);
...
...
src/mod/applications/mod_conference/conference_video.c
浏览文件 @
6cd796a9
差异被折叠。
点击展开。
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
6cd796a9
...
...
@@ -2725,10 +2725,10 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
}
else
if
(
!
strcasecmp
(
var
,
"video-quality"
)
&&
!
zstr
(
val
))
{
int
tmp
=
atoi
(
val
);
if
(
tmp
>
0
&&
tmp
<
5
)
{
if
(
tmp
>
-
1
&&
tmp
<
5
)
{
conference_video_quality
=
tmp
;
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Video quality must be between
1
and 4
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Video quality must be between
0
and 4
\n
"
);
}
}
else
if
(
!
strcasecmp
(
var
,
"video-mode"
)
&&
!
zstr
(
val
))
{
...
...
@@ -2874,7 +2874,7 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
if
(
video_codec_bandwidth
)
{
if
(
!
strcasecmp
(
video_codec_bandwidth
,
"auto"
))
{
conference
->
video_codec_settings
.
video
.
bandwidth
=
switch_calc_bitrate
(
canvas_w
,
canvas_h
,
conference
->
video_quality
,
(
int
)
conference
->
video_fps
.
fps
);
conference
->
video_codec_settings
.
video
.
bandwidth
=
switch_calc_bitrate
(
canvas_w
,
canvas_h
,
conference
->
video_quality
,
conference
->
video_fps
.
fps
);
}
else
{
conference
->
video_codec_settings
.
video
.
bandwidth
=
switch_parse_bandwidth_string
(
video_codec_bandwidth
);
}
...
...
src/mod/codecs/mod_openh264/mod_openh264.cpp
浏览文件 @
6cd796a9
...
...
@@ -95,7 +95,7 @@ int FillSpecificParameters(h264_codec_context_t *context) {
if
(
context
->
codec_settings
.
video
.
bandwidth
)
{
context
->
bandwidth
=
context
->
codec_settings
.
video
.
bandwidth
;
}
else
{
context
->
bandwidth
=
switch_calc_bitrate
(
context
->
codec_settings
.
video
.
width
,
context
->
codec_settings
.
video
.
height
,
0
,
0
);
context
->
bandwidth
=
switch_calc_bitrate
(
context
->
codec_settings
.
video
.
width
,
context
->
codec_settings
.
video
.
height
,
1
,
15
);
}
if
(
context
->
bandwidth
>
5120
)
{
...
...
src/mod/codecs/mod_vpx/mod_vpx.c
浏览文件 @
6cd796a9
...
...
@@ -317,7 +317,7 @@ static switch_status_t init_encoder(switch_codec_t *codec)
if
(
context
->
codec_settings
.
video
.
bandwidth
)
{
context
->
bandwidth
=
context
->
codec_settings
.
video
.
bandwidth
;
}
else
{
context
->
bandwidth
=
switch_calc_bitrate
(
context
->
codec_settings
.
video
.
width
,
context
->
codec_settings
.
video
.
height
,
0
,
0
);
context
->
bandwidth
=
switch_calc_bitrate
(
context
->
codec_settings
.
video
.
width
,
context
->
codec_settings
.
video
.
height
,
1
,
15
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论