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-10 10:58:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
81ea6d34ce77400660d0cc30b9bfa869880c7d1c
81ea6d34
1 parent
fa4d3cd8
add pdf of hls rfc, corrent the content type.
显示空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
8 行增加
和
7 行删除
trunk/doc/hls-m3u8-draft-pantos-http-live-streaming-12.pdf
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_http.cpp
trunk/doc/hls-m3u8-draft-pantos-http-live-streaming-12.pdf
0 → 100644
查看文件 @
81ea6d3
不能预览此文件类型
trunk/src/app/srs_app_hls.cpp
查看文件 @
81ea6d3
...
...
@@ -564,7 +564,7 @@ int SrsHlsMuxer::_refresh_m3u8(string m3u8_file)
// "#EXTINF:4294967295.208,\n"
char
ext_info
[
25
];
// 14+10+1
len
=
snprintf
(
ext_info
,
sizeof
(
ext_info
),
"#EXTINF:%.3f
\n
"
,
segment
->
duration
);
len
=
snprintf
(
ext_info
,
sizeof
(
ext_info
),
"#EXTINF:%.3f
,
\n
"
,
segment
->
duration
);
if
((
ret
=
writer
.
write
(
ext_info
,
len
,
NULL
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"write m3u8 segment info failed. ret=%d"
,
ret
);
return
ret
;
...
...
trunk/src/app/srs_app_http.cpp
查看文件 @
81ea6d3
...
...
@@ -56,7 +56,7 @@ using namespace std;
int
srs_go_http_response_json
(
ISrsGoHttpResponseWriter
*
w
,
string
data
)
{
w
->
header
()
->
set_content_length
(
data
.
length
());
w
->
header
()
->
set_content_type
(
"application/json
;charset=utf-8
"
);
w
->
header
()
->
set_content_type
(
"application/json"
);
return
w
->
write
((
char
*
)
data
.
data
(),
data
.
length
());
}
...
...
@@ -344,17 +344,18 @@ int SrsGoHttpFileServer::serve_file(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
_mime
[
".mp3"
]
=
"audio/mpeg"
;
_mime
[
".m4a"
]
=
"audio/x-m4a"
;
_mime
[
".ogg"
]
=
"audio/ogg"
;
_mime
[
".m3u8"
]
=
"application/x-mpegURL;charset=utf-8"
;
// @see hls-m3u8-draft-pantos-http-live-streaming-12.pdf, page 5.
_mime
[
".m3u8"
]
=
"application/vnd.apple.mpegurl"
;
// application/x-mpegURL
_mime
[
".rss"
]
=
"application/rss+xml"
;
_mime
[
".json"
]
=
"application/json
;charset=utf-8
"
;
_mime
[
".json"
]
=
"application/json"
;
_mime
[
".swf"
]
=
"application/x-shockwave-flash"
;
_mime
[
".doc"
]
=
"application/msword"
;
_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
[
".xml"
]
=
"text/xml"
;
_mime
[
".html"
]
=
"text/html"
;
_mime
[
".js"
]
=
"text/javascript"
;
_mime
[
".css"
]
=
"text/css
;charset=utf-8
"
;
_mime
[
".css"
]
=
"text/css"
;
_mime
[
".ico"
]
=
"image/x-icon"
;
_mime
[
".png"
]
=
"image/png"
;
_mime
[
".jpeg"
]
=
"image/jpeg"
;
...
...
请
注册
或
登录
后发表评论