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-03-01 10:14:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4e91a3d5aa190d1bf0a4fde4a60405b04b828555
4e91a3d5
1 parent
62fbe9e7
extract core and app module.
隐藏空白字符变更
内嵌
并排对比
正在显示
18 个修改的文件
包含
99 行增加
和
20 行删除
trunk/configure
trunk/src/app/srs_core_bandwidth.hpp
trunk/src/app/srs_core_client.hpp
trunk/src/app/srs_core_conn.hpp
trunk/src/app/srs_core_forward.hpp
trunk/src/app/srs_core_http.hpp
trunk/src/app/srs_core_log.cpp
trunk/src/app/srs_core_protocol.hpp
trunk/src/app/srs_core_rtmp.hpp
trunk/src/app/srs_core_server.hpp
trunk/src/app/srs_core_socket.hpp
trunk/src/app/srs_core_source.hpp
trunk/src/app/srs_core_st.cpp
trunk/src/app/srs_core_st.hpp
trunk/src/app/srs_core_thread.hpp
trunk/src/core/srs_core.cpp
trunk/src/core/srs_core.hpp
trunk/src/srs/srs.upp
trunk/configure
查看文件 @
4e91a3d
...
...
@@ -124,7 +124,7 @@ fi
#Core Module
MODULE_ID
=
"CORE"
MODULE_DEPENDS
=()
ModuleLibIncs
=(
${
LibSTRoot
}
${
SRS_OBJS
}
)
ModuleLibIncs
=(
${
SRS_OBJS
}
)
MODULE_FILES
=(
"srs_core"
)
MODULE_DIR
=
"src/core"
. auto/modules.sh
CORE_OBJS
=
"
${
MODULE_OBJS
[@]
}
"
...
...
@@ -141,7 +141,8 @@ MODULE_FILES=("srs_core_log" "srs_core_server"
"srs_core_handshake"
"srs_core_pithy_print"
"srs_core_config"
"srs_core_refer"
"srs_core_reload"
"srs_core_hls"
"srs_core_forward"
"srs_core_encoder"
"srs_core_http"
"srs_core_thread"
"srs_core_bandwidth"
)
"srs_core_http"
"srs_core_thread"
"srs_core_bandwidth"
"srs_core_st"
)
MODULE_DIR
=
"src/app"
. auto/modules.sh
APP_OBJS
=
"
${
MODULE_OBJS
[@]
}
"
#
...
...
trunk/src/app/srs_core_bandwidth.hpp
查看文件 @
4e91a3d
...
...
@@ -29,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core.hpp>
#include <srs_core_st.hpp>
class
SrsRequest
;
class
SrsRtmp
;
...
...
trunk/src/app/srs_core_client.hpp
查看文件 @
4e91a3d
...
...
@@ -30,6 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp>
#include <srs_core_st.hpp>
#include <srs_core_conn.hpp>
#include <srs_core_reload.hpp>
...
...
trunk/src/app/srs_core_conn.hpp
查看文件 @
4e91a3d
...
...
@@ -30,6 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp>
#include <srs_core_st.hpp>
class
SrsServer
;
class
SrsConnection
{
...
...
trunk/src/app/srs_core_forward.hpp
查看文件 @
4e91a3d
...
...
@@ -31,6 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string>
#include <srs_core_st.hpp>
#include <srs_core_thread.hpp>
class
SrsSharedPtrMessage
;
...
...
trunk/src/app/srs_core_http.hpp
查看文件 @
4e91a3d
...
...
@@ -29,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core.hpp>
#include <srs_core_st.hpp>
#ifdef SRS_HTTP
class
SrsRequest
;
...
...
trunk/src/app/srs_core_log.cpp
查看文件 @
4e91a3d
...
...
@@ -29,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string>
#include <map>
#include <st.h>
ILogContext
::
ILogContext
()
{
}
...
...
trunk/src/app/srs_core_protocol.hpp
查看文件 @
4e91a3d
...
...
@@ -33,6 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <map>
#include <string>
#include <srs_core_st.hpp>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
...
...
trunk/src/app/srs_core_rtmp.hpp
查看文件 @
4e91a3d
...
...
@@ -32,6 +32,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string>
#include <srs_core_st.hpp>
class
SrsProtocol
;
class
ISrsMessage
;
class
SrsCommonMessage
;
...
...
trunk/src/app/srs_core_server.hpp
查看文件 @
4e91a3d
...
...
@@ -32,6 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <vector>
#include <srs_core_st.hpp>
#include <srs_core_reload.hpp>
#include <srs_core_thread.hpp>
...
...
trunk/src/app/srs_core_socket.hpp
查看文件 @
4e91a3d
...
...
@@ -30,6 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp>
#include <srs_core_st.hpp>
/**
* the socket provides TCP socket over st,
* that is, the sync socket mechanism.
...
...
trunk/src/app/srs_core_source.hpp
查看文件 @
4e91a3d
...
...
@@ -34,6 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <vector>
#include <string>
#include <srs_core_st.hpp>
#include <srs_core_reload.hpp>
class
SrsSource
;
...
...
trunk/src/app/srs_core_st.cpp
0 → 100644
查看文件 @
4e91a3d
/*
The MIT License (MIT)
Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core_st.hpp>
void
srs_close_stfd
(
st_netfd_t
&
stfd
)
{
if
(
stfd
)
{
int
fd
=
st_netfd_fileno
(
stfd
);
st_netfd_close
(
stfd
);
stfd
=
NULL
;
// st does not close it sometimes,
// close it manually.
close
(
fd
);
}
}
...
...
trunk/src/app/srs_core_st.hpp
0 → 100644
查看文件 @
4e91a3d
/*
The MIT License (MIT)
Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef SRS_CORE_ST_HPP
#define SRS_CORE_ST_HPP
/*
#include <srs_core_st.hpp>
*/
#include <srs_core.hpp>
#include <st.h>
// close the netfd, and close the underlayer fd.
extern
void
srs_close_stfd
(
st_netfd_t
&
stfd
);
#endif
...
...
trunk/src/app/srs_core_thread.hpp
查看文件 @
4e91a3d
...
...
@@ -29,6 +29,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core.hpp>
#include <srs_core_st.hpp>
/**
* the handler for the thread, callback interface.
* the thread model defines as:
...
...
trunk/src/core/srs_core.cpp
查看文件 @
4e91a3d
...
...
@@ -109,16 +109,3 @@ void srs_vhost_resolve(std::string& vhost, std::string& app)
}
}
void
srs_close_stfd
(
st_netfd_t
&
stfd
)
{
if
(
stfd
)
{
int
fd
=
st_netfd_fileno
(
stfd
);
st_netfd_close
(
stfd
);
stfd
=
NULL
;
// st does not close it sometimes,
// close it manually.
close
(
fd
);
}
}
...
...
trunk/src/core/srs_core.hpp
查看文件 @
4e91a3d
...
...
@@ -46,8 +46,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stddef.h>
#include <sys/types.h>
#include <st.h>
// generated by configure.
#include <srs_auto_headers.hpp>
...
...
@@ -104,9 +102,6 @@ extern std::string srs_dns_resolve(std::string host);
// app...vhost...request_vhost
extern
void
srs_vhost_resolve
(
std
::
string
&
vhost
,
std
::
string
&
app
);
// close the netfd, and close the underlayer fd.
extern
void
srs_close_stfd
(
st_netfd_t
&
stfd
);
/**
* disable copy constructor of class
*/
...
...
trunk/src/srs/srs.upp
查看文件 @
4e91a3d
...
...
@@ -52,6 +52,8 @@ file
..\app\srs_core_thread.cpp,
..\app\srs_core_server.hpp,
..\app\srs_core_server.cpp,
..\app\srs_core_st.hpp,
..\app\srs_core_st.cpp,
..\app\srs_core_stream.hpp,
..\app\srs_core_stream.cpp,
..\app\srs_core_socket.hpp,
...
...
请
注册
或
登录
后发表评论