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-12 20:37:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0a016e58bf3b461db9170a7ae2060a1f3d4cbabe
0a016e58
1 parent
b38df9cd
add comments for main
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
4 行删除
trunk/src/app/srs_app_server.cpp
trunk/src/main/srs_main_server.cpp
trunk/src/app/srs_app_server.cpp
查看文件 @
0a016e5
...
...
@@ -205,7 +205,7 @@ int SrsServer::initialize()
{
int
ret
=
ERROR_SUCCESS
;
// for the main objects(server, config, log),
// for the main objects(server, config, log
, context
),
// never subscribe handler in constructor,
// instead, subscribe handler in initialize method.
srs_assert
(
_srs_config
);
...
...
trunk/src/main/srs_main_server.cpp
查看文件 @
0a016e5
...
...
@@ -42,6 +42,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_app_log.hpp>
#include <srs_app_utility.hpp>
// pre-declare
int
run
();
int
run_master
();
// for the main objects(server, config, log, context),
// never subscribe handler in constructor,
// instead, subscribe handler in initialize method.
// kernel module.
ISrsLog
*
_srs_log
=
new
SrsFastLog
();
ISrsThreadContext
*
_srs_context
=
new
SrsThreadContext
();
...
...
@@ -49,15 +56,14 @@ ISrsThreadContext* _srs_context = new SrsThreadContext();
SrsConfig
*
_srs_config
=
new
SrsConfig
();
SrsServer
*
_srs_server
=
new
SrsServer
();
// signal handler
void
handler
(
int
signo
)
{
srs_trace
(
"get a signal, signo=%d"
,
signo
);
_srs_server
->
on_signal
(
signo
);
}
int
run
();
int
run_master
();
// main entrance.
int
main
(
int
argc
,
char
**
argv
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
请
注册
或
登录
后发表评论