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-08-03 20:27:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6dd065bcc39ebff950b8e1aa042959236e684aec
6dd065bc
1 parent
5a95d594
fix #85, fix the segment-dvr sequence header missing. 0.9.187.
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
38 行增加
和
1 行删除
README.md
trunk/src/app/srs_app_dvr.cpp
trunk/src/app/srs_app_dvr.hpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
6dd065b
...
...
@@ -207,6 +207,7 @@ Supported operating systems and hardware:
*
2013-10-17, Created.
<br/>
## History
*
v1.0, 2014-08-03, fix
[
#85
](
https://github.com/winlinvip/simple-rtmp-server/issues/85
)
, fix the segment-dvr sequence header missing. 0.9.187.
*
v1.0, 2014-08-03, fix
[
#145
](
https://github.com/winlinvip/simple-rtmp-server/issues/145
)
, refine ffmpeg log, check abitrate for libaacplus. 0.9.186.
*
v1.0, 2014-08-03, fix
[
#143
](
https://github.com/winlinvip/simple-rtmp-server/issues/143
)
, fix retrieve sys stat bug for all linux. 0.9.185.
*
v1.0, 2014-08-02, fix
[
#138
](
https://github.com/winlinvip/simple-rtmp-server/issues/138
)
, fix http hooks bug, regression bug. 0.9.184.
...
...
trunk/src/app/srs_app_dvr.cpp
查看文件 @
6dd065b
...
...
@@ -399,10 +399,13 @@ void SrsDvrSessionPlan::on_unpublish()
SrsDvrSegmentPlan
::
SrsDvrSegmentPlan
()
{
segment_duration
=
-
1
;
sh_video
=
sh_audio
=
NULL
;
}
SrsDvrSegmentPlan
::~
SrsDvrSegmentPlan
()
{
srs_freep
(
sh_video
);
srs_freep
(
sh_audio
);
}
int
SrsDvrSegmentPlan
::
initialize
(
SrsSource
*
source
,
SrsRequest
*
req
)
...
...
@@ -445,6 +448,26 @@ void SrsDvrSegmentPlan::on_unpublish()
dvr_enabled
=
false
;
}
int
SrsDvrSegmentPlan
::
on_audio
(
SrsSharedPtrMessage
*
audio
)
{
if
(
SrsFlvCodec
::
audio_is_sequence_header
(
audio
->
payload
,
audio
->
size
))
{
srs_freep
(
sh_audio
);
sh_audio
=
audio
->
copy
();
}
return
SrsDvrPlan
::
on_audio
(
audio
);
}
int
SrsDvrSegmentPlan
::
on_video
(
SrsSharedPtrMessage
*
video
)
{
if
(
SrsFlvCodec
::
video_is_sequence_header
(
video
->
payload
,
video
->
size
))
{
srs_freep
(
sh_video
);
sh_video
=
video
->
copy
();
}
return
SrsDvrPlan
::
on_video
(
video
);
}
int
SrsDvrSegmentPlan
::
update_duration
(
SrsSharedPtrMessage
*
msg
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -463,9 +486,18 @@ int SrsDvrSegmentPlan::update_duration(SrsSharedPtrMessage* msg)
}
on_unpublish
();
// open new flv file
if
((
ret
=
open_new_segment
())
!=
ERROR_SUCCESS
)
{
return
ret
;
}
// update sequence header
if
(
sh_video
&&
(
ret
=
SrsDvrPlan
::
on_video
(
sh_video
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
if
(
sh_audio
&&
(
ret
=
SrsDvrPlan
::
on_audio
(
sh_audio
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
}
return
ret
;
...
...
trunk/src/app/srs_app_dvr.hpp
查看文件 @
6dd065b
...
...
@@ -161,6 +161,8 @@ class SrsDvrSegmentPlan : public SrsDvrPlan
private
:
// in config, in ms
int
segment_duration
;
SrsSharedPtrMessage
*
sh_audio
;
SrsSharedPtrMessage
*
sh_video
;
public
:
SrsDvrSegmentPlan
();
virtual
~
SrsDvrSegmentPlan
();
...
...
@@ -168,6 +170,8 @@ public:
virtual
int
initialize
(
SrsSource
*
source
,
SrsRequest
*
req
);
virtual
int
on_publish
();
virtual
void
on_unpublish
();
virtual
int
on_audio
(
SrsSharedPtrMessage
*
audio
);
virtual
int
on_video
(
SrsSharedPtrMessage
*
video
);
private
:
virtual
int
update_duration
(
SrsSharedPtrMessage
*
msg
);
};
...
...
trunk/src/core/srs_core.hpp
查看文件 @
6dd065b
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "18
6
"
#define VERSION_REVISION "18
7
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论