Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
b63683ad
提交
b63683ad
authored
12月 19, 2014
作者:
Anthony Minessale
提交者:
Michael Jerris
5月 28, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7501: more code
上级
785ecdb3
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
75 行增加
和
82 行删除
+75
-82
switch_rtp.c
src/switch_rtp.c
+9
-7
switch_vidderbuffer.c
src/switch_vidderbuffer.c
+66
-75
没有找到文件。
src/switch_rtp.c
浏览文件 @
b63683ad
...
@@ -5049,7 +5049,7 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
...
@@ -5049,7 +5049,7 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
stfu_n_destroy
(
&
rtp_session
->
jb
);
stfu_n_destroy
(
&
rtp_session
->
jb
);
}
}
}
}
if
(
rtp_session
->
recv_msg
.
header
.
version
==
2
&&
*
bytes
)
{
if
(
rtp_session
->
recv_msg
.
header
.
version
==
2
&&
*
bytes
)
{
if
(
rtp_session
->
vb
)
{
if
(
rtp_session
->
vb
)
{
...
@@ -5122,22 +5122,24 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
...
@@ -5122,22 +5122,24 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
switch
(
vstatus
)
{
switch
(
vstatus
)
{
case
SWITCH_STATUS_RESTART
:
case
SWITCH_STATUS_RESTART
:
switch_core_session_request_video_refresh
(
rtp_session
->
session
);
switch_core_session_request_video_refresh
(
rtp_session
->
session
);
*
bytes
=
0
;
status
=
SWITCH_STATUS_FALSE
;
break
;
break
;
case
SWITCH_STATUS_MORE_DATA
:
case
SWITCH_STATUS_MORE_DATA
:
status
=
SWITCH_STATUS_FALSE
;
status
=
SWITCH_STATUS_FALSE
;
*
bytes
=
0
;
break
;
break
;
case
SWITCH_STATUS_SUCCESS
:
case
SWITCH_STATUS_BREAK
:
switch_core_session_request_video_refresh
(
rtp_session
->
session
);
default
:
status
=
SWITCH_STATUS_SUCCESS
;
status
=
SWITCH_STATUS_SUCCESS
;
break
;
}
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
switch_cp_addr
(
rtp_session
->
from_addr
,
rtp_session
->
remote_addr
);
switch_cp_addr
(
rtp_session
->
from_addr
,
rtp_session
->
remote_addr
);
if
(
!
xcheck_jitter
)
{
if
(
!
xcheck_jitter
)
{
check_jitter
(
rtp_session
);
check_jitter
(
rtp_session
);
xcheck_jitter
=
*
bytes
;
xcheck_jitter
=
*
bytes
;
}
}
break
;
default
:
break
;
}
}
}
}
...
...
src/switch_vidderbuffer.c
浏览文件 @
b63683ad
...
@@ -61,6 +61,7 @@ struct switch_vb_s {
...
@@ -61,6 +61,7 @@ struct switch_vb_s {
struct
switch_vb_frame_s
*
cur_write_frame
;
struct
switch_vb_frame_s
*
cur_write_frame
;
uint32_t
last_read_ts
;
uint32_t
last_read_ts
;
uint32_t
last_read_seq
;
uint32_t
last_read_seq
;
uint32_t
last_target_seq
;
uint32_t
last_wrote_ts
;
uint32_t
last_wrote_ts
;
uint32_t
last_wrote_seq
;
uint32_t
last_wrote_seq
;
uint16_t
target_seq
;
uint16_t
target_seq
;
...
@@ -73,6 +74,7 @@ struct switch_vb_s {
...
@@ -73,6 +74,7 @@ struct switch_vb_s {
uint32_t
max_frame_len
;
uint32_t
max_frame_len
;
uint8_t
debug_level
;
uint8_t
debug_level
;
switch_timer_t
timer
;
switch_timer_t
timer
;
int
cur_errs
;
};
};
static
inline
switch_vb_node_t
*
new_node
(
switch_vb_frame_t
*
frame
)
static
inline
switch_vb_node_t
*
new_node
(
switch_vb_frame_t
*
frame
)
...
@@ -124,8 +126,8 @@ static inline void add_node(switch_vb_frame_t *frame, switch_rtp_packet_t *packe
...
@@ -124,8 +126,8 @@ static inline void add_node(switch_vb_frame_t *frame, switch_rtp_packet_t *packe
frame
->
max_seq
=
packet
->
header
.
seq
;
frame
->
max_seq
=
packet
->
header
.
seq
;
}
}
vb_debug
(
frame
->
parent
,
(
packet
->
header
.
m
?
1
:
2
),
"PUT packet last_ts:%u ts:%u seq:%u
%s
\n
"
,
vb_debug
(
frame
->
parent
,
(
packet
->
header
.
m
?
1
:
2
),
"PUT packet last_ts:%u ts:%u seq:%u%s
\n
"
,
ntohl
(
frame
->
parent
->
last_wrote_ts
),
ntohl
(
node
->
packet
.
header
.
ts
),
ntohs
(
node
->
packet
.
header
.
seq
),
packet
->
header
.
m
?
"
FINAL"
:
"PARTIAL
"
);
ntohl
(
frame
->
parent
->
last_wrote_ts
),
ntohl
(
node
->
packet
.
header
.
ts
),
ntohs
(
node
->
packet
.
header
.
seq
),
packet
->
header
.
m
?
"
<MARK>"
:
"
"
);
if
(
packet
->
header
.
m
)
{
if
(
packet
->
header
.
m
)
{
...
@@ -243,63 +245,26 @@ static inline switch_vb_frame_t *new_frame(switch_vb_t *vb, switch_rtp_packet_t
...
@@ -243,63 +245,26 @@ static inline switch_vb_frame_t *new_frame(switch_vb_t *vb, switch_rtp_packet_t
}
}
static
inline
int
frame_contains_seq
(
switch_vb_frame_t
*
frame
,
uint16_t
target_seq
)
static
inline
int
frame_contains_seq
(
switch_vb_frame_t
*
frame
,
uint16_t
target_seq
,
switch_vb_node_t
**
nodep
)
{
{
int16_t
seq
=
ntohs
(
target_seq
);
uint16_t
seq
=
ntohs
(
target_seq
);
switch_vb_node_t
*
np
;
if
(
frame
->
min_seq
&&
frame
->
max_seq
&&
seq
>=
ntohs
(
frame
->
min_seq
)
&&
seq
<=
ntohs
(
frame
->
max_seq
))
{
switch_vb_node_t
*
np
;
for
(
np
=
frame
->
node_list
;
np
;
np
=
np
->
next
)
{
for
(
np
=
frame
->
node_list
;
np
;
np
=
np
->
next
)
{
if
(
!
np
->
visible
)
continue
;
if
(
!
np
->
visible
)
{
if
(
ntohs
(
np
->
packet
.
header
.
seq
)
==
seq
)
return
1
;
continue
;
}
}
}
//vb_debug(frame->parent, 10, " CMP %u %u/%u\n", ntohl(frame->ts), ntohs(np->packet.header.seq), seq);
if
(
ntohs
(
np
->
packet
.
header
.
seq
)
==
seq
)
{
return
0
;
//vb_debug(frame->parent, 10, " MATCH %u %u v:%d\n", ntohs(np->packet.header.seq), seq, np->visible);
}
if
(
nodep
)
{
*
nodep
=
np
;
/* seq_check verifies that every seq is present in the frame but is probably heavy */
static
inline
int
check_frame
(
switch_vb_frame_t
*
frame
,
switch_bool_t
seq_check
)
{
switch_vb_node_t
*
np
;
int
m
=
0
;
uint16_t
x
=
0
,
min
=
ntohs
(
frame
->
min_seq
),
max
=
ntohs
(
frame
->
max_seq
);
for
(
x
=
min
;
x
<
max
;
x
++
)
{
int
ok
=
0
;
for
(
np
=
frame
->
node_list
;
np
;
np
=
np
->
next
)
{
if
(
!
np
->
visible
)
continue
;
if
(
np
->
packet
.
header
.
m
)
{
if
(
!
seq_check
)
{
return
1
;
}
m
++
;
}
if
(
!
seq_check
)
{
ok
++
;
}
else
{
if
(
ntohs
(
np
->
packet
.
header
.
seq
)
==
x
)
{
ok
++
;
}
}
}
}
return
1
;
if
(
!
m
||
!
ok
)
{
goto
bail
;
}
}
}
}
return
1
;
bail:
vb_debug
(
frame
->
parent
,
1
,
"Frame %u failed frame check seq: %u m: %d, discarding
\n
"
,
ntohl
(
frame
->
ts
),
x
,
m
);
hide_frame
(
frame
);
return
0
;
return
0
;
}
}
static
inline
void
increment_seq
(
switch_vb_t
*
vb
)
static
inline
void
increment_seq
(
switch_vb_t
*
vb
)
...
@@ -309,11 +274,11 @@ static inline void increment_seq(switch_vb_t *vb)
...
@@ -309,11 +274,11 @@ static inline void increment_seq(switch_vb_t *vb)
static
inline
void
set_read_seq
(
switch_vb_t
*
vb
,
uint16_t
seq
)
static
inline
void
set_read_seq
(
switch_vb_t
*
vb
,
uint16_t
seq
)
{
{
vb
->
last_
read
_seq
=
seq
;
vb
->
last_
target
_seq
=
seq
;
vb
->
target_seq
=
htons
((
ntohs
(
vb
->
last_
read
_seq
)
+
1
));
vb
->
target_seq
=
htons
((
ntohs
(
vb
->
last_
target
_seq
)
+
1
));
}
}
static
inline
switch_status_t
next_frame
(
switch_vb_t
*
vb
)
static
inline
switch_status_t
next_frame
(
switch_vb_t
*
vb
,
switch_vb_node_t
**
nodep
)
{
{
switch_vb_frame_t
*
fp
=
NULL
,
*
oldest
=
NULL
,
*
frame_containing_seq
=
NULL
;
switch_vb_frame_t
*
fp
=
NULL
,
*
oldest
=
NULL
,
*
frame_containing_seq
=
NULL
;
...
@@ -328,12 +293,12 @@ static inline switch_status_t next_frame(switch_vb_t *vb)
...
@@ -328,12 +293,12 @@ static inline switch_status_t next_frame(switch_vb_t *vb)
if
((
fp
=
vb
->
cur_read_frame
))
{
if
((
fp
=
vb
->
cur_read_frame
))
{
int
ok
=
1
;
int
ok
=
1
;
if
(
!
fp
->
visible
||
!
fp
->
complete
||
fp
->
visible_nodes
==
0
)
{
if
(
!
fp
->
visible
||
fp
->
visible_nodes
==
0
)
{
ok
=
0
;
ok
=
0
;
}
else
{
}
else
{
if
(
vb
->
target_seq
)
{
if
(
vb
->
target_seq
)
{
if
(
frame_contains_seq
(
fp
,
vb
->
target_seq
))
{
if
(
frame_contains_seq
(
fp
,
vb
->
target_seq
,
nodep
))
{
vb_debug
(
vb
,
2
,
"
FOUND CUR FRAME %u CONTAINING
SEQ %d
\n
"
,
ntohl
(
fp
->
ts
),
ntohs
(
vb
->
target_seq
));
vb_debug
(
vb
,
2
,
"
CUR FRAME %u CONTAINS REQUESTED
SEQ %d
\n
"
,
ntohl
(
fp
->
ts
),
ntohs
(
vb
->
target_seq
));
frame_containing_seq
=
fp
;
frame_containing_seq
=
fp
;
goto
end
;
goto
end
;
}
else
{
}
else
{
...
@@ -349,33 +314,34 @@ static inline switch_status_t next_frame(switch_vb_t *vb)
...
@@ -349,33 +314,34 @@ static inline switch_status_t next_frame(switch_vb_t *vb)
}
}
do
{
do
{
*
nodep
=
NULL
;
for
(
fp
=
vb
->
frame_list
;
fp
;
fp
=
fp
->
next
)
{
for
(
fp
=
vb
->
frame_list
;
fp
;
fp
=
fp
->
next
)
{
if
(
!
fp
->
visible
||
!
fp
->
complete
)
{
if
(
!
fp
->
visible
||
!
fp
->
complete
)
{
continue
;
continue
;
}
}
if
(
vb
->
target_seq
)
{
if
(
vb
->
target_seq
)
{
if
(
frame_contains_seq
(
fp
,
vb
->
target_seq
))
{
if
(
frame_contains_seq
(
fp
,
vb
->
target_seq
,
nodep
))
{
vb_debug
(
vb
,
2
,
"FOUND FRAME %u CONTAINING SEQ %d
\n
"
,
ntohl
(
fp
->
ts
),
ntohs
(
vb
->
target_seq
));
vb_debug
(
vb
,
2
,
"FOUND FRAME %u CONTAINING SEQ %d
\n
"
,
ntohl
(
fp
->
ts
),
ntohs
(
vb
->
target_seq
));
frame_containing_seq
=
fp
;
frame_containing_seq
=
fp
;
goto
end
;
goto
end
;
}
}
}
}
if
((
!
oldest
||
htonl
(
oldest
->
ts
)
>
htonl
(
fp
->
ts
)))
{
if
((
!
oldest
||
htonl
(
oldest
->
ts
)
>
htonl
(
fp
->
ts
)))
{
oldest
=
fp
;
oldest
=
fp
;
}
}
}
}
if
(
!
frame_containing_seq
&&
vb
->
target_seq
)
{
if
(
!
frame_containing_seq
&&
vb
->
target_seq
)
{
if
(
ntohs
(
vb
->
target_seq
)
-
ntohs
(
vb
->
last_
read
_seq
)
>
MAX_MISSING_SEQ
)
{
if
(
ntohs
(
vb
->
target_seq
)
-
ntohs
(
vb
->
last_
target
_seq
)
>
MAX_MISSING_SEQ
)
{
vb_debug
(
vb
,
1
,
"FOUND NO FRAMES CONTAINING SEQ %d. Too many failures....
\n
"
,
ntohs
(
vb
->
target_seq
));
vb_debug
(
vb
,
1
,
"FOUND NO FRAMES CONTAINING SEQ %d. Too many failures....
\n
"
,
ntohs
(
vb
->
target_seq
));
switch_vb_reset
(
vb
,
SWITCH_FALSE
);
switch_vb_reset
(
vb
,
SWITCH_FALSE
);
}
else
{
}
else
{
vb_debug
(
vb
,
2
,
"FOUND NO FRAMES CONTAINING SEQ %d. Try next one
\n
"
,
ntohs
(
vb
->
target_seq
));
vb_debug
(
vb
,
2
,
"FOUND NO FRAMES CONTAINING SEQ %d. Try next one
\n
"
,
ntohs
(
vb
->
target_seq
));
increment_seq
(
vb
);
increment_seq
(
vb
);
vb
->
cur_errs
++
;
}
}
}
}
}
while
(
!
frame_containing_seq
&&
vb
->
target_seq
);
}
while
(
!
frame_containing_seq
&&
vb
->
target_seq
);
...
@@ -384,8 +350,14 @@ static inline switch_status_t next_frame(switch_vb_t *vb)
...
@@ -384,8 +350,14 @@ static inline switch_status_t next_frame(switch_vb_t *vb)
if
(
frame_containing_seq
)
{
if
(
frame_containing_seq
)
{
vb
->
cur_read_frame
=
frame_containing_seq
;
vb
->
cur_read_frame
=
frame_containing_seq
;
if
(
nodep
&&
*
nodep
)
{
hide_node
(
*
nodep
);
set_read_seq
(
vb
,
(
*
nodep
)
->
packet
.
header
.
seq
);
}
}
else
if
(
oldest
)
{
}
else
if
(
oldest
)
{
vb
->
cur_read_frame
=
oldest
;
vb
->
cur_read_frame
=
oldest
;
}
else
{
vb
->
cur_read_frame
=
NULL
;
}
}
if
(
vb
->
cur_read_frame
)
{
if
(
vb
->
cur_read_frame
)
{
...
@@ -435,19 +407,21 @@ static inline switch_vb_node_t *frame_find_lowest_seq(switch_vb_frame_t *frame)
...
@@ -435,19 +407,21 @@ static inline switch_vb_node_t *frame_find_lowest_seq(switch_vb_frame_t *frame)
static
inline
switch_status_t
next_frame_packet
(
switch_vb_t
*
vb
,
switch_vb_node_t
**
nodep
)
static
inline
switch_status_t
next_frame_packet
(
switch_vb_t
*
vb
,
switch_vb_node_t
**
nodep
)
{
{
switch_vb_node_t
*
node
;
switch_vb_node_t
*
node
=
NULL
;
switch_status_t
status
;
switch_status_t
status
;
if
((
status
=
next_frame
(
vb
)
!=
SWITCH_STATUS_SUCCESS
))
{
if
((
status
=
next_frame
(
vb
,
&
node
)
!=
SWITCH_STATUS_SUCCESS
))
{
return
status
;
return
status
;
}
}
if
(
vb
->
target_seq
)
{
if
(
!
node
)
{
vb_debug
(
vb
,
2
,
"Search for next packet %u cur ts: %u
\n
"
,
htons
(
vb
->
target_seq
),
htonl
(
vb
->
cur_read_frame
->
ts
));
if
(
vb
->
target_seq
)
{
node
=
frame_find_next_seq
(
vb
->
cur_read_frame
);
vb_debug
(
vb
,
2
,
"Search for next packet %u cur ts: %u
\n
"
,
htons
(
vb
->
target_seq
),
htonl
(
vb
->
cur_read_frame
->
ts
));
}
else
{
node
=
frame_find_next_seq
(
vb
->
cur_read_frame
);
node
=
frame_find_lowest_seq
(
vb
->
cur_read_frame
);
}
else
{
vb_debug
(
vb
,
2
,
"Find lowest seq frame ts: %u seq: %u
\n
"
,
ntohl
(
vb
->
cur_read_frame
->
ts
),
ntohs
(
node
->
packet
.
header
.
seq
));
node
=
frame_find_lowest_seq
(
vb
->
cur_read_frame
);
vb_debug
(
vb
,
2
,
"Find lowest seq frame ts: %u seq: %u
\n
"
,
ntohl
(
vb
->
cur_read_frame
->
ts
),
ntohs
(
node
->
packet
.
header
.
seq
));
}
}
}
*
nodep
=
node
;
*
nodep
=
node
;
...
@@ -522,7 +496,7 @@ SWITCH_DECLARE(void) switch_vb_reset(switch_vb_t *vb, switch_bool_t flush)
...
@@ -522,7 +496,7 @@ SWITCH_DECLARE(void) switch_vb_reset(switch_vb_t *vb, switch_bool_t flush)
}
}
vb
->
last_read_ts
=
0
;
vb
->
last_read_ts
=
0
;
vb
->
last_
read
_seq
=
0
;
vb
->
last_
target
_seq
=
0
;
vb
->
target_seq
=
0
;
vb
->
target_seq
=
0
;
if
(
flush
)
{
if
(
flush
)
{
...
@@ -568,8 +542,8 @@ SWITCH_DECLARE(switch_status_t) switch_vb_put_packet(switch_vb_t *vb, switch_rtp
...
@@ -568,8 +542,8 @@ SWITCH_DECLARE(switch_status_t) switch_vb_put_packet(switch_vb_t *vb, switch_rtp
switch_vb_frame_t
*
frame
;
switch_vb_frame_t
*
frame
;
#ifdef VB_PLOSS
#ifdef VB_PLOSS
int
r
=
(
rand
()
%
10000
0
)
+
1
;
int
r
=
(
rand
()
%
10000
)
+
1
;
if
(
r
<=
20
)
{
if
(
r
<=
20
0
)
{
vb_debug
(
vb
,
1
,
"Simulate dropped packet ......... ts: %u seq: %u
\n
"
,
ntohl
(
packet
->
header
.
ts
),
ntohs
(
packet
->
header
.
seq
));
vb_debug
(
vb
,
1
,
"Simulate dropped packet ......... ts: %u seq: %u
\n
"
,
ntohl
(
packet
->
header
.
ts
),
ntohs
(
packet
->
header
.
seq
));
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
...
@@ -588,6 +562,8 @@ SWITCH_DECLARE(switch_status_t) switch_vb_get_packet(switch_vb_t *vb, switch_rtp
...
@@ -588,6 +562,8 @@ SWITCH_DECLARE(switch_status_t) switch_vb_get_packet(switch_vb_t *vb, switch_rtp
switch_vb_node_t
*
node
=
NULL
;
switch_vb_node_t
*
node
=
NULL
;
switch_status_t
status
;
switch_status_t
status
;
vb
->
cur_errs
=
0
;
if
(
vb
->
complete_frames
<
vb
->
frame_len
)
{
if
(
vb
->
complete_frames
<
vb
->
frame_len
)
{
vb_debug
(
vb
,
2
,
"BUFFERING %u/%u
\n
"
,
vb
->
complete_frames
,
vb
->
frame_len
);
vb_debug
(
vb
,
2
,
"BUFFERING %u/%u
\n
"
,
vb
->
complete_frames
,
vb
->
frame_len
);
return
SWITCH_STATUS_MORE_DATA
;
return
SWITCH_STATUS_MORE_DATA
;
...
@@ -610,11 +586,19 @@ SWITCH_DECLARE(switch_status_t) switch_vb_get_packet(switch_vb_t *vb, switch_rtp
...
@@ -610,11 +586,19 @@ SWITCH_DECLARE(switch_status_t) switch_vb_get_packet(switch_vb_t *vb, switch_rtp
}
}
if
(
node
)
{
if
(
node
)
{
status
=
SWITCH_STATUS_SUCCESS
;
*
packet
=
node
->
packet
;
*
packet
=
node
->
packet
;
*
len
=
node
->
len
;
*
len
=
node
->
len
;
memcpy
(
packet
->
body
,
node
->
packet
.
body
,
node
->
len
);
memcpy
(
packet
->
body
,
node
->
packet
.
body
,
node
->
len
);
if
(
vb
->
cur_errs
)
{
vb_debug
(
vb
,
1
,
"One or more Missing SEQ TS %u
\n
"
,
ntohl
(
packet
->
header
.
ts
));
status
=
SWITCH_STATUS_BREAK
;
}
vb
->
last_read_ts
=
packet
->
header
.
ts
;
vb
->
last_read_ts
=
packet
->
header
.
ts
;
vb
->
last_read_seq
=
packet
->
header
.
seq
;
if
(
vb
->
timer
.
timer_interface
)
{
if
(
vb
->
timer
.
timer_interface
)
{
if
(
packet
->
header
.
m
||
!
vb
->
timer
.
samplecount
)
{
if
(
packet
->
header
.
m
||
!
vb
->
timer
.
samplecount
)
{
...
@@ -622,14 +606,21 @@ SWITCH_DECLARE(switch_status_t) switch_vb_get_packet(switch_vb_t *vb, switch_rtp
...
@@ -622,14 +606,21 @@ SWITCH_DECLARE(switch_status_t) switch_vb_get_packet(switch_vb_t *vb, switch_rtp
}
}
}
}
vb_debug
(
vb
,
1
,
"GET packet ts:%u seq:%u~%u m:%d
\n
"
,
ntohl
(
packet
->
header
.
ts
),
ntohs
(
packet
->
header
.
seq
),
vb
->
seq_out
,
packet
->
header
.
m
);
if
(
vb
->
cur_read_frame
&&
vb
->
cur_read_frame
->
visible_nodes
==
0
&&
!
packet
->
header
.
m
)
{
/* force mark bit */
vb_debug
(
vb
,
1
,
"LAST PACKET %u WITH NO MARK BIT, ADDIONG MARK BIT
\n
"
,
ntohl
(
packet
->
header
.
ts
));
packet
->
header
.
m
=
1
;
status
=
SWITCH_STATUS_BREAK
;
}
vb_debug
(
vb
,
1
,
"GET packet ts:%u seq:%u~%u%s
\n
"
,
ntohl
(
packet
->
header
.
ts
),
ntohs
(
packet
->
header
.
seq
),
vb
->
seq_out
,
packet
->
header
.
m
?
" <MARK>"
:
""
);
//packet->header.seq = htons(vb->seq_out++);
if
(
vb
->
timer
.
timer_interface
)
{
if
(
vb
->
timer
.
timer_interface
)
{
packet
->
header
.
seq
=
htons
(
vb
->
seq_out
++
);
packet
->
header
.
ts
=
htonl
(
vb
->
timer
.
samplecount
);
packet
->
header
.
ts
=
htonl
(
vb
->
timer
.
samplecount
);
}
}
return
SWITCH_STATUS_SUCCESS
;
return
status
;
}
}
return
SWITCH_STATUS_MORE_DATA
;
return
SWITCH_STATUS_MORE_DATA
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论