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-04-17 12:59:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
996d042a33a9f7490ffa73b3b5a85445f04a893d
996d042a
1 parent
a63fa20e
add comments for file stream
显示空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
12 行增加
和
0 行删除
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_dvr.hpp
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_http_conn.cpp
trunk/src/app/srs_app_config.cpp
查看文件 @
996d042
...
...
@@ -104,6 +104,7 @@ int SrsFileBuffer::fullfill(const char* filename)
int
nread
=
0
;
int
filesize
=
0
;
// TODO: FIXME: refine the file stream.
if
((
fd
=
::
open
(
filename
,
O_RDONLY
,
0
))
<
0
)
{
ret
=
ERROR_SYSTEM_CONFIG_INVALID
;
srs_error
(
"open conf file error. ret=%d"
,
ret
);
...
...
trunk/src/app/srs_app_dvr.hpp
查看文件 @
996d042
...
...
@@ -37,6 +37,13 @@ class SrsAmf0Object;
class
SrsSharedPtrMessage
;
/**
* encode data to flv file.
*/
class
SrsFlvEncoder
{
};
/**
* dvr(digital video recorder) to record RTMP stream to flv file.
* TODO: FIXME: add utest for it.
*/
...
...
trunk/src/app/srs_app_hls.cpp
查看文件 @
996d042
...
...
@@ -152,6 +152,7 @@ public:
{
int
ret
=
ERROR_SUCCESS
;
// TODO: FIXME: maybe should use st_write.
if
(
::
write
(
fd
,
mpegts_header
,
sizeof
(
mpegts_header
))
!=
sizeof
(
mpegts_header
))
{
ret
=
ERROR_HLS_WRITE_FAILED
;
srs_error
(
"write ts file header failed. ret=%d"
,
ret
);
...
...
@@ -276,6 +277,7 @@ public:
}
// write ts packet
// TODO: FIXME: maybe should use st_write.
if
(
::
write
(
fd
,
packet
,
sizeof
(
packet
))
!=
sizeof
(
packet
))
{
ret
=
ERROR_HLS_WRITE_FAILED
;
srs_error
(
"write ts file failed. ret=%d"
,
ret
);
...
...
@@ -428,6 +430,7 @@ int SrsTSMuxer::open(string _path)
int
flags
=
O_CREAT
|
O_WRONLY
|
O_TRUNC
;
mode_t
mode
=
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
|
S_IROTH
;
// TODO: FIXME: refine the file stream.
if
((
fd
=
::
open
(
path
.
c_str
(),
flags
,
mode
))
<
0
)
{
ret
=
ERROR_HLS_OPEN_FAILED
;
srs_error
(
"open ts file %s failed. ret=%d"
,
path
.
c_str
(),
ret
);
...
...
trunk/src/app/srs_app_http_conn.cpp
查看文件 @
996d042
...
...
@@ -163,6 +163,7 @@ int SrsHttpVhost::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
std
::
string
fullpath
=
get_request_file
(
req
);
// TODO: FIXME: refine the file stream.
int
fd
=
::
open
(
fullpath
.
c_str
(),
O_RDONLY
);
if
(
fd
<
0
)
{
ret
=
ERROR_HTTP_OPEN_FILE
;
...
...
请
注册
或
登录
后发表评论