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
2015-02-27 21:11:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8ed256b7e969fa333cedd005c2b5d2d98a362771
8ed256b7
1 parent
0213cc64
for #179, wait keyframe for dvr. 2.0.127
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
13 行增加
和
3 行删除
trunk/src/app/srs_app_dvr.cpp
trunk/src/core/srs_core.hpp
trunk/src/app/srs_app_dvr.cpp
查看文件 @
8ed256b
...
...
@@ -307,10 +307,10 @@ int SrsFlvSegment::write_video(SrsSharedPtrMessage* __video)
char
*
payload
=
video
->
payload
;
int
size
=
video
->
size
;
bool
is_sequence_header
=
SrsFlvCodec
::
video_is_sequence_header
(
payload
,
size
);
#ifdef SRS_AUTO_HTTP_CALLBACK
bool
is_key_frame
=
SrsFlvCodec
::
video_is_h264
(
payload
,
size
)
&&
SrsFlvCodec
::
video_is_keyframe
(
payload
,
size
)
&&
!
SrsFlvCodec
::
video_is_sequence_header
(
payload
,
size
);
&&
SrsFlvCodec
::
video_is_keyframe
(
payload
,
size
)
&&
!
is_sequence_header
;
if
(
is_key_frame
)
{
has_keyframe
=
true
;
if
((
ret
=
plan
->
on_video_keyframe
())
!=
ERROR_SUCCESS
)
{
...
...
@@ -319,6 +319,16 @@ int SrsFlvSegment::write_video(SrsSharedPtrMessage* __video)
}
srs_verbose
(
"dvr video is key: %d"
,
is_key_frame
);
#endif
// accept the sequence header here.
// when got no keyframe, ignore when should wait keyframe.
if
(
!
has_keyframe
&&
!
is_sequence_header
)
{
bool
wait_keyframe
=
_srs_config
->
get_dvr_wait_keyframe
(
req
->
vhost
);
if
(
wait_keyframe
)
{
srs_info
(
"dvr: ignore when wait keyframe."
);
return
ret
;
}
}
if
((
jitter
->
correct
(
video
,
0
,
0
,
jitter_algorithm
))
!=
ERROR_SUCCESS
)
{
return
ret
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
8ed256b
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 12
6
#define VERSION_REVISION 12
7
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论