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-01-25 17:06:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
919a85b1031bd626198c519ada721034da13e08d
919a85b1
1 parent
2c423504
for #301, hls support h.264+mp3, ok for vlc. 2.0.107
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
24 行增加
和
9 行删除
README.md
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.hpp
trunk/src/app/srs_app_http.cpp
trunk/src/core/srs_core.hpp
trunk/src/kernel/srs_kernel_ts.cpp
trunk/src/kernel/srs_kernel_ts.hpp
README.md
查看文件 @
919a85b
...
...
@@ -521,6 +521,7 @@ Supported operating systems and hardware:
### SRS 2.0 history
*
v2.0, 2015-01-25, for
[
#301
](
https://github.com/winlinvip/simple-rtmp-server/issues/301
)
, hls support h.264+mp3, ok for vlc. 2.0.107
*
v2.0, 2015-01-25, for
[
#301
](
https://github.com/winlinvip/simple-rtmp-server/issues/301
)
, http ts stream support h.264+mp3. 2.0.106
*
v2.0, 2015-01-25, hotfix
[
#268
](
https://github.com/winlinvip/simple-rtmp-server/issues/268
)
, refine the pcr start at 0, dts/pts plus delay. 2.0.105
*
v2.0, 2015-01-25, hotfix
[
#151
](
https://github.com/winlinvip/simple-rtmp-server/issues/151
)
, refine pcr=dts-800ms and use dts/pts directly. 2.0.104
...
...
trunk/src/app/srs_app_hls.cpp
查看文件 @
919a85b
...
...
@@ -92,6 +92,7 @@ SrsHlsMuxer::SrsHlsMuxer()
hls_fragment
=
hls_window
=
0
;
_sequence_no
=
0
;
current
=
NULL
;
acodec
=
SrsCodecAudioReserved1
;
}
SrsHlsMuxer
::~
SrsHlsMuxer
()
...
...
@@ -170,6 +171,11 @@ int SrsHlsMuxer::segment_open(int64_t segment_start_dts)
}
srs_info
(
"open HLS muxer success. path=%s, tmp=%s"
,
current
->
full_path
.
c_str
(),
tmp_file
.
c_str
());
// set the segment muxer audio codec.
if
(
acodec
!=
SrsCodecAudioReserved1
)
{
current
->
muxer
->
update_acodec
(
acodec
);
}
return
ret
;
}
...
...
@@ -199,11 +205,12 @@ bool SrsHlsMuxer::is_segment_absolutely_overflow()
return
current
->
duration
>=
2
*
hls_fragment
;
}
int
SrsHlsMuxer
::
update_acodec
(
SrsCodecAudio
ac
odec
)
int
SrsHlsMuxer
::
update_acodec
(
SrsCodecAudio
ac
)
{
srs_assert
(
current
);
srs_assert
(
current
->
muxer
);
return
current
->
muxer
->
update_acodec
(
acodec
);
acodec
=
ac
;
return
current
->
muxer
->
update_acodec
(
ac
);
}
int
SrsHlsMuxer
::
flush_audio
(
SrsMpegtsFrame
*
af
,
SrsSimpleBuffer
*
ab
)
...
...
@@ -801,7 +808,7 @@ int SrsHls::on_audio(SrsSharedPtrMessage* __audio)
}
// ignore sequence header
if
(
sample
->
aac_packet_type
==
SrsCodecAudioTypeSequenceHeader
)
{
if
(
acodec
==
SrsCodecAudioAAC
&&
sample
->
aac_packet_type
==
SrsCodecAudioTypeSequenceHeader
)
{
return
hls_cache
->
on_sequence_header
(
muxer
);
}
...
...
trunk/src/app/srs_app_hls.hpp
查看文件 @
919a85b
...
...
@@ -118,6 +118,12 @@ private:
* current writing segment.
*/
SrsHlsSegment
*
current
;
/**
* the current audio codec, when open new muxer,
* set the muxer audio codec.
* @see https://github.com/winlinvip/simple-rtmp-server/issues/301
*/
SrsCodecAudio
acodec
;
public
:
SrsHlsMuxer
();
virtual
~
SrsHlsMuxer
();
...
...
@@ -144,7 +150,7 @@ public:
*/
virtual
bool
is_segment_absolutely_overflow
();
public
:
virtual
int
update_acodec
(
SrsCodecAudio
ac
odec
);
virtual
int
update_acodec
(
SrsCodecAudio
ac
);
virtual
int
flush_audio
(
SrsMpegtsFrame
*
af
,
SrsSimpleBuffer
*
ab
);
virtual
int
flush_video
(
SrsMpegtsFrame
*
af
,
SrsSimpleBuffer
*
ab
,
SrsMpegtsFrame
*
vf
,
SrsSimpleBuffer
*
vb
);
/**
...
...
trunk/src/app/srs_app_http.cpp
查看文件 @
919a85b
...
...
@@ -352,6 +352,7 @@ int SrsGoHttpFileServer::serve_file(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
_mime
[
".zip"
]
=
"application/zip"
;
_mime
[
".rar"
]
=
"application/x-rar-compressed"
;
_mime
[
".xml"
]
=
"text/xml;charset=utf-8"
;
_mime
[
".html"
]
=
"text/html;charset=utf-8"
;
_mime
[
".js"
]
=
"text/javascript"
;
_mime
[
".css"
]
=
"text/css;charset=utf-8"
;
_mime
[
".ico"
]
=
"image/x-icon"
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
919a85b
...
...
@@ -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 10
6
#define VERSION_REVISION 10
7
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
trunk/src/kernel/srs_kernel_ts.cpp
查看文件 @
919a85b
...
...
@@ -430,14 +430,14 @@ int SrsTSMuxer::open(string _path)
return
ret
;
}
int
SrsTSMuxer
::
update_acodec
(
SrsCodecAudio
ac
odec
)
int
SrsTSMuxer
::
update_acodec
(
SrsCodecAudio
ac
)
{
int
ret
=
ERROR_SUCCESS
;
if
(
current
==
ac
odec
)
{
if
(
current
==
ac
)
{
return
ret
;
}
current
=
ac
odec
;
current
=
ac
;
return
ret
;
}
...
...
trunk/src/kernel/srs_kernel_ts.hpp
查看文件 @
919a85b
...
...
@@ -85,7 +85,7 @@ public:
* @remark for audio aac codec, for example, SRS1, it's ok to write PSI when open ts.
* @see https://github.com/winlinvip/simple-rtmp-server/issues/301
*/
virtual
int
update_acodec
(
SrsCodecAudio
ac
odec
);
virtual
int
update_acodec
(
SrsCodecAudio
ac
);
/**
* write an audio frame to ts,
* @remark write PSI first when not write yet.
...
...
请
注册
或
登录
后发表评论