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
2016-09-08 19:56:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7aaa74b9e0c470effe5cf770aef21b98043f9933
7aaa74b9
1 parent
80a98cf8
TODO: FIXME: for librtmp, must group NALUs to frame.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
9 行增加
和
3 行删除
trunk/src/libs/srs_librtmp.cpp
trunk/src/libs/srs_librtmp.cpp
查看文件 @
7aaa74b
...
...
@@ -1296,12 +1296,18 @@ int srs_write_h264_ipb_frame(Context* context,
// 5bits, 7.3.1 NAL unit syntax,
// H.264-AVC-ISO_IEC_14496-10.pdf, page 44.
// 7: SPS, 8: PPS, 5: I Frame, 1: P Frame
SrsAvcNaluType
nal_unit_type
=
(
SrsAvcNaluType
)(
frame
[
0
]
&
0x1f
);
// 5: I Frame, 1: P/B Frame
// @remark for rtmp, we only need to send the I/P/B frames to server,
// the aud is used for server to remux stream to annexb.
// TODO: FIXME: we must group NALUs between AUD to a frame.
SrsAvcNaluType
nut
=
(
SrsAvcNaluType
)(
frame
[
0
]
&
0x1f
);
if
(
nut
!=
SrsAvcNaluTypeIDR
&&
nut
!=
SrsAvcNaluTypeNonIDR
)
{
return
ret
;
}
// for IDR frame, the frame is keyframe.
SrsCodecVideoAVCFrame
frame_type
=
SrsCodecVideoAVCFrameInterFrame
;
if
(
n
al_unit_type
==
SrsAvcNaluTypeIDR
)
{
if
(
n
ut
==
SrsAvcNaluTypeIDR
)
{
frame_type
=
SrsCodecVideoAVCFrameKeyFrame
;
}
...
...
请
注册
或
登录
后发表评论