Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
a0d0dc2d
提交
a0d0dc2d
authored
5月 03, 2017
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10286: [mod_conference] Sync member joins up with keyframes in shared encoder mode #resolve
上级
77e7d1c2
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
28 行增加
和
7 行删除
+28
-7
avcodec.c
src/mod/applications/mod_av/avcodec.c
+10
-5
mod_commands.c
src/mod/applications/mod_commands/mod_commands.c
+1
-0
conference_video.c
src/mod/applications/mod_conference/conference_video.c
+15
-2
mod_conference.h
src/mod/applications/mod_conference/mod_conference.h
+1
-0
switch_core_media.c
src/switch_core_media.c
+1
-0
没有找到文件。
src/mod/applications/mod_av/avcodec.c
浏览文件 @
a0d0dc2d
...
...
@@ -923,16 +923,19 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_opt_set_int
(
context
->
encoder_ctx
->
priv_data
,
"mb_info"
,
SLICE_SIZE
-
8
,
0
);
}
else
if
(
context
->
av_codec_id
==
AV_CODEC_ID_H264
)
{
context
->
encoder_ctx
->
profile
=
FF_PROFILE_H264_BASELINE
;
context
->
encoder_ctx
->
level
=
4
1
;
context
->
encoder_ctx
->
level
=
3
1
;
if
(
context
->
hw_encoder
)
{
av_opt_set
(
context
->
encoder_ctx
->
priv_data
,
"preset"
,
"llhp"
,
0
);
av_opt_set_int
(
context
->
encoder_ctx
->
priv_data
,
"2pass"
,
1
,
0
);
}
else
{
av_opt_set
(
context
->
encoder_ctx
->
priv_data
,
"preset"
,
"veryfast"
,
0
);
av_opt_set
(
context
->
encoder_ctx
->
priv_data
,
"tune"
,
"zerolatency"
,
0
);
av_opt_set_int
(
context
->
encoder_ctx
->
priv_data
,
"intra-refresh"
,
1
,
0
);
av_opt_set
(
context
->
encoder_ctx
->
priv_data
,
"preset"
,
"fast"
,
0
);
av_opt_set
(
context
->
encoder_ctx
->
priv_data
,
"tune"
,
"animation+zerolatency"
,
0
);
av_opt_set
(
context
->
encoder_ctx
->
priv_data
,
"profile"
,
"baseline"
,
0
);
av_opt_set_int
(
context
->
encoder_ctx
->
priv_data
,
"slice-max-size"
,
SLICE_SIZE
,
0
);
/*
av_opt_set_int(context->encoder_ctx->priv_data, "sc_threshold", 40, 0);
av_opt_set_int(context->encoder_ctx->priv_data, "b_strategy", 1, 0);
av_opt_set_int(context->encoder_ctx->priv_data, "crf", 18, 0);
...
...
@@ -948,10 +951,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
context->encoder_ctx->keyint_min = 25; // keyint_min=25
context->encoder_ctx->i_quant_factor = 0.71; // i_qfactor=0.71
context->encoder_ctx->b_quant_factor = 0.76923078; // Qscale difference between P-frames and B-frames.
context
->
encoder_ctx
->
qcompress
=
0
.
6
;
// qcomp=0.6
context->encoder_ctx->qcompress = 0
;//0
.6; // qcomp=0.6
context->encoder_ctx->qmin = 10; // qmin=10
context->encoder_ctx->qmax = 51; // qmax=51
context->encoder_ctx->max_qdiff = 4; // qdiff=4
*/
}
}
...
...
@@ -1148,8 +1152,8 @@ static switch_status_t switch_h264_encode(switch_codec_t *codec, switch_frame_t
if
(
context
->
need_key_frame
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG5
,
"Send AV KEYFRAME
\n
"
);
av_opt_set_int
(
context
->
encoder_ctx
->
priv_data
,
"intra-refresh"
,
1
,
0
);
avframe
->
pict_type
=
AV_PICTURE_TYPE_I
;
avframe
->
key_frame
=
1
;
}
/* encode the image */
...
...
@@ -1164,6 +1168,7 @@ static switch_status_t switch_h264_encode(switch_codec_t *codec, switch_frame_t
if
(
context
->
need_key_frame
)
{
avframe
->
pict_type
=
0
;
avframe
->
key_frame
=
0
;
context
->
need_key_frame
=
0
;
}
...
...
src/mod/applications/mod_commands/mod_commands.c
浏览文件 @
a0d0dc2d
...
...
@@ -4186,6 +4186,7 @@ SWITCH_STANDARD_API(uuid_video_refresh_function)
if
((
lsession
=
switch_core_session_locate
(
argv
[
0
])))
{
switch_core_session_request_video_refresh
(
lsession
);
switch_core_media_gen_key_frame
(
lsession
);
status
=
SWITCH_STATUS_SUCCESS
;
switch_core_session_rwunlock
(
lsession
);
}
...
...
src/mod/applications/mod_conference/conference_video.c
浏览文件 @
a0d0dc2d
...
...
@@ -1383,7 +1383,10 @@ switch_status_t conference_video_attach_video_layer(conference_member_t *member,
member
->
video_layer_id
=
idx
;
member
->
canvas_id
=
canvas
->
canvas_id
;
member
->
layer_timeout
=
DEFAULT_LAYER_TIMEOUT
;
canvas
->
send_keyframe
=
1
;
conference_utils_member_set_flag_locked
(
member
,
MFLAG_VIDEO_JOIN
);
switch_channel_set_flag
(
member
->
channel
,
CF_VIDEO_REFRESH_REQ
);
canvas
->
send_keyframe
=
30
;
//member->watching_canvas_id = canvas->canvas_id;
conference_video_check_used_layers
(
canvas
);
...
...
@@ -1780,7 +1783,13 @@ void conference_video_write_canvas_image_to_codec_group(conference_obj_t *confer
if
(
imember
->
video_codec_index
!=
codec_index
)
{
continue
;
}
if
(
conference_utils_member_test_flag
(
imember
,
MFLAG_VIDEO_JOIN
)
&&
!
send_keyframe
)
{
continue
;
}
conference_utils_member_clear_flag
(
imember
,
MFLAG_VIDEO_JOIN
);
if
(
!
imember
->
session
||
!
switch_channel_test_flag
(
imember
->
channel
,
CF_VIDEO_READY
)
||
switch_core_session_read_lock
(
imember
->
session
)
!=
SWITCH_STATUS_SUCCESS
)
{
continue
;
...
...
@@ -3636,6 +3645,10 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
switch_core_session_read_lock
(
imember
->
session
)
!=
SWITCH_STATUS_SUCCESS
))
{
continue
;
}
if
(
conference_utils_member_test_flag
(
imember
,
MFLAG_VIDEO_JOIN
))
{
send_keyframe
=
SWITCH_TRUE
;
}
if
(
need_refresh
&&
imember
->
session
)
{
switch_core_session_request_video_refresh
(
imember
->
session
);
...
...
@@ -3750,7 +3763,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
if
(
canvas
->
send_keyframe
>
0
)
{
if
(
canvas
->
send_keyframe
==
1
||
(
canvas
->
send_keyframe
%
10
)
==
0
)
{
send_keyframe
=
SWITCH_TRUE
;
need_refresh
=
SWITCH_TRUE
;
//
need_refresh = SWITCH_TRUE;
}
canvas
->
send_keyframe
--
;
}
...
...
src/mod/applications/mod_conference/mod_conference.h
浏览文件 @
a0d0dc2d
...
...
@@ -214,6 +214,7 @@ typedef enum {
MFLAG_INDICATE_UNDEAF
,
MFLAG_TALK_DATA_EVENTS
,
MFLAG_NO_VIDEO_BLANKS
,
MFLAG_VIDEO_JOIN
,
///////////////////////////
MFLAG_MAX
}
member_flag_t
;
...
...
src/switch_core_media.c
浏览文件 @
a0d0dc2d
...
...
@@ -10498,6 +10498,7 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
}
}
if
(
pass_fmtp
)
{
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=fmtp:%d %s
\r\n
"
,
v_engine
->
cur_payload_map
->
pt
,
pass_fmtp
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论