Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
52afedf2
提交
52afedf2
authored
9月 15, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-8053 addtl touchups
上级
36cd9269
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
34 行增加
和
11 行删除
+34
-11
switch_types.h
src/include/switch_types.h
+1
-0
conference_video.c
src/mod/applications/mod_conference/conference_video.c
+21
-4
mod_conference.c
src/mod/applications/mod_conference/mod_conference.c
+3
-0
switch_core_media.c
src/switch_core_media.c
+4
-0
switch_rtp.c
src/switch_rtp.c
+5
-7
没有找到文件。
src/include/switch_types.h
浏览文件 @
52afedf2
...
...
@@ -752,6 +752,7 @@ typedef enum {
SWITCH_RTP_FLAG_MUTE
,
SWITCH_RTP_FLAG_NACK
,
SWITCH_RTP_FLAG_TMMBR
,
SWITCH_RTP_FLAG_GEN_TS_DELTA
,
SWITCH_RTP_FLAG_INVALID
}
switch_rtp_flag_t
;
...
...
src/mod/applications/mod_conference/conference_video.c
浏览文件 @
52afedf2
...
...
@@ -3264,13 +3264,27 @@ void conference_video_write_frame(conference_obj_t *conference, conference_membe
switch_core_session_rwunlock
(
isession
);
}
if
(
want_refresh
)
{
for
(
imember
=
conference
->
members
;
imember
;
imember
=
imember
->
next
)
{
switch_core_session_t
*
isession
=
imember
->
session
;
if
(
!
isession
||
switch_core_session_read_lock
(
isession
)
!=
SWITCH_STATUS_SUCCESS
)
{
continue
;
}
if
(
!
isession
||
!
switch_channel_test_flag
(
imember
->
channel
,
CF_VIDEO
)
)
{
continue
;
}
switch_core_session_request_video_refresh
(
imember
->
session
);
switch_core_session_rwunlock
(
isession
);
}
}
switch_mutex_unlock
(
conference
->
member_mutex
);
switch_img_free
(
&
tmp_frame
.
img
);
if
(
want_refresh
&&
floor_holder
->
session
)
{
switch_core_session_request_video_refresh
(
floor_holder
->
session
);
}
}
switch_status_t
conference_video_thread_callback
(
switch_core_session_t
*
session
,
switch_frame_t
*
frame
,
void
*
user_data
)
...
...
@@ -3286,6 +3300,9 @@ switch_status_t conference_video_thread_callback(switch_core_session_t *session,
return
SWITCH_STATUS_SUCCESS
;
}
if
(
switch_core_session_media_flow
(
session
,
SWITCH_MEDIA_TYPE_VIDEO
)
==
SWITCH_MEDIA_FLOW_SENDONLY
)
{
return
SWITCH_STATUS_SUCCESS
;
}
if
(
switch_thread_rwlock_tryrdlock
(
member
->
conference
->
rwlock
)
!=
SWITCH_STATUS_SUCCESS
)
{
return
SWITCH_STATUS_FALSE
;
...
...
src/mod/applications/mod_conference/mod_conference.c
浏览文件 @
52afedf2
...
...
@@ -302,8 +302,11 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
if
(
imember
->
video_media_flow
==
SWITCH_MEDIA_FLOW_SENDONLY
)
{
conference_utils_member_clear_flag
(
imember
,
MFLAG_CAN_BE_SEEN
);
conference_video_find_floor
(
imember
,
SWITCH_FALSE
);
}
else
{
conference_utils_member_set_flag
(
imember
,
MFLAG_CAN_BE_SEEN
);
conference_video_find_floor
(
imember
,
SWITCH_TRUE
);
switch_core_session_request_video_refresh
(
imember
->
session
);
}
}
...
...
src/switch_core_media.c
浏览文件 @
52afedf2
...
...
@@ -5958,6 +5958,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
flags
[
SWITCH_RTP_FLAG_BYTESWAP
]
=
0
;
}
if
((
val
=
switch_channel_get_variable
(
session
->
channel
,
"rtp_gen_ts_delta"
))
&&
switch_true
(
val
))
{
flags
[
SWITCH_RTP_FLAG_GEN_TS_DELTA
]
=
1
;
}
if
(
a_engine
->
rtp_session
&&
switch_channel_test_flag
(
session
->
channel
,
CF_REINVITE
))
{
//const char *ip = switch_channel_get_variable(session->channel, SWITCH_LOCAL_MEDIA_IP_VARIABLE);
//const char *port = switch_channel_get_variable(session->channel, SWITCH_LOCAL_MEDIA_PORT_VARIABLE);
...
...
src/switch_rtp.c
浏览文件 @
52afedf2
...
...
@@ -6999,8 +6999,8 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
}
}
/* TMP DISABLE DFF */
if
(
switch_rtp_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_VIDEO
))
{
if
(
switch_rtp_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_
GEN_TS_DELTA
)
||
switch_rtp_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_
VIDEO
))
{
/* Normalize the timestamps to our own base by generating a made up starting point then adding the measured deltas to that base
so if the timestamps and ssrc of the source change, it will not break the other end's jitter bufffer / decoder etc *cough* CHROME *cough*
*/
...
...
@@ -7010,7 +7010,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
}
if
(
!
rtp_session
->
ts_norm
.
last_ssrc
||
send_msg
->
header
.
ssrc
!=
rtp_session
->
ts_norm
.
last_ssrc
)
{
//
#define USE_DELTA
#define USE_DELTA
#ifdef USE_DELTA
if
(
rtp_session
->
ts_norm
.
last_ssrc
)
{
rtp_session
->
ts_norm
.
delta_ct
=
1
;
...
...
@@ -7028,10 +7028,8 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
if
(
ntohl
(
send_msg
->
header
.
ts
)
!=
rtp_session
->
ts_norm
.
last_frame
)
{
#ifdef USE_DELTA
int32_t
delta
=
(
int32_t
)
(
ntohl
(
send_msg
->
header
.
ts
)
-
rtp_session
->
ts_norm
.
last_frame
);
if
(
delta
>
0
&&
delta
<
90000
)
{
rtp_session
->
ts_norm
.
delta
=
delta
;
}
//printf("WTF %d\n", rtp_session->ts_norm.delta);
rtp_session
->
ts_norm
.
delta
=
delta
;
rtp_session
->
ts_norm
.
ts
+=
rtp_session
->
ts_norm
.
delta
;
#else
switch_core_timer_sync
(
&
rtp_session
->
timer
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论