Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-11-07 23:19:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6407baffd5c38a316f28d10fbcb9c3bc8350bc38
6407baff
1 parent
72ad6894
for bug #66, output the h264 frame type.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
7 行增加
和
2 行删除
trunk/research/librtmp/srs_h264_raw_publish.c
trunk/research/librtmp/srs_h264_raw_publish.c
查看文件 @
6407baf
...
...
@@ -171,8 +171,13 @@ int main(int argc, char** argv)
if
(
srs_write_packet
(
rtmp
,
type
,
timestamp
,
rtmp_data
,
rtmp_size
)
!=
0
)
{
goto
rtmp_destroy
;
}
srs_trace
(
"sent packet: type=%s, time=%d, size=%d, fps=%d"
,
srs_type2string
(
type
),
timestamp
,
rtmp_size
,
fps
);
// 5bits, 7.3.1 NAL unit syntax,
// H.264-AVC-ISO_IEC_14496-10.pdf, page 44.
u_int8_t
nut
=
(
char
)
data
[
0
]
&
0x1f
;
srs_trace
(
"sent packet: type=%s, time=%d, size=%d, fps=%d, b[0]=%#x(%s)"
,
srs_type2string
(
type
),
timestamp
,
rtmp_size
,
fps
,
nut
,
(
nut
==
7
?
"SPS"
:
(
nut
==
8
?
"PPS"
:
(
nut
==
5
?
"I"
:
(
nut
==
1
?
"P"
:
"Unknown"
)))));
// @remark, when use encode device, it not need to sleep.
usleep
(
1000
/
fps
*
1000
);
...
...
请
注册
或
登录
后发表评论