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-18 09:16:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bfff8413b628b2fde16849137d7ffbf3a8252709
bfff8413
1 parent
c695a8fc
refine code for #277, the copy first param is the dest.
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
4 行增加
和
4 行删除
trunk/src/app/srs_app_http.cpp
trunk/src/app/srs_app_http.hpp
trunk/src/app/srs_app_http_conn.cpp
trunk/src/app/srs_app_http.cpp
查看文件 @
bfff841
...
...
@@ -344,7 +344,7 @@ int SrsGoHttpFileServer::serve_file(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
// write body.
int64_t
left
=
length
;
if
((
ret
=
copy
(
&
fs
,
w
,
r
,
left
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
copy
(
w
,
&
fs
,
r
,
left
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"read file=%s size=%d failed, ret=%d"
,
fullpath
.
c_str
(),
left
,
ret
);
return
ret
;
}
...
...
@@ -357,7 +357,7 @@ int SrsGoHttpFileServer::serve_flv_stream(ISrsGoHttpResponseWriter* w, SrsHttpMe
return
serve_file
(
w
,
r
,
fullpath
);
}
int
SrsGoHttpFileServer
::
copy
(
SrsFileReader
*
fs
,
ISrsGoHttpResponseWriter
*
w
,
SrsHttpMessage
*
r
,
int
size
)
int
SrsGoHttpFileServer
::
copy
(
ISrsGoHttpResponseWriter
*
w
,
SrsFileReader
*
fs
,
SrsHttpMessage
*
r
,
int
size
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
trunk/src/app/srs_app_http.hpp
查看文件 @
bfff841
...
...
@@ -217,7 +217,7 @@ protected:
/**
* copy the fs to response writer in size bytes.
*/
virtual
int
copy
(
SrsFileReader
*
fs
,
ISrsGoHttpResponseWriter
*
w
,
SrsHttpMessage
*
r
,
int
size
);
virtual
int
copy
(
ISrsGoHttpResponseWriter
*
w
,
SrsFileReader
*
fs
,
SrsHttpMessage
*
r
,
int
size
);
};
// the mux entry for server mux.
...
...
trunk/src/app/srs_app_http_conn.cpp
查看文件 @
bfff841
...
...
@@ -127,7 +127,7 @@ int SrsVodStream::serve_flv_stream(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
}
// send data
if
((
ret
=
copy
(
&
fs
,
w
,
r
,
left
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
copy
(
w
,
&
fs
,
r
,
left
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"read flv=%s size=%d failed, ret=%d"
,
fullpath
.
c_str
(),
left
,
ret
);
return
ret
;
}
...
...
请
注册
或
登录
后发表评论