1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

extract kernel module, depends on core and provides kernel service(no stream)

This commit is contained in:
winlin 2014-03-01 10:30:16 +08:00
parent bcbea86202
commit dea66a322d
28 changed files with 44 additions and 35 deletions

18
trunk/configure vendored
View file

@ -121,7 +121,7 @@ fi
#####################################################################################
# Modules, compile each module, then link to binary
#
#Core Module
#Core, depends only on system apis.
MODULE_ID="CORE"
MODULE_DEPENDS=()
ModuleLibIncs=(${SRS_OBJS})
@ -129,12 +129,20 @@ MODULE_FILES=("srs_core" "srs_core_autofree")
MODULE_DIR="src/core" . auto/modules.sh
CORE_OBJS="${MODULE_OBJS[@]}"
#
#Kernel, depends on core, provides error/log/config, nothing about stream information.
MODULE_ID="KERNEL"
MODULE_DEPENDS=("CORE")
ModuleLibIncs=(${SRS_OBJS})
MODULE_FILES=("srs_kernel_error")
MODULE_DIR="src/kernel" . auto/modules.sh
KERNEL_OBJS="${MODULE_OBJS[@]}"
#
#App Module
MODULE_ID="APP"
MODULE_DEPENDS=("CORE")
MODULE_DEPENDS=("CORE" "KERNEL")
ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${LibSSLRoot} ${SRS_OBJS})
MODULE_FILES=("srs_core_log" "srs_core_server"
"srs_core_error" "srs_core_conn" "srs_core_client"
"srs_core_conn" "srs_core_client"
"srs_core_rtmp" "srs_core_socket" "srs_core_buffer"
"srs_core_protocol" "srs_core_amf0"
"srs_core_stream" "srs_core_source" "srs_core_codec"
@ -148,7 +156,7 @@ APP_OBJS="${MODULE_OBJS[@]}"
#
#Main Module
MODULE_ID="MAIN"
MODULE_DEPENDS=("CORE" "APP")
MODULE_DEPENDS=("CORE" "KERNEL" "APP")
ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS})
MODULE_FILES=("srs_main_server" "srs_main_bandcheck")
MODULE_DIR="src/main" . auto/modules.sh
@ -164,7 +172,7 @@ MAIN_ENTRANCES=("srs_main_server" "srs_main_bandcheck")
# all depends libraries
ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile})
# all depends objects
MODULE_OBJS="${CORE_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}"
MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}"
LINK_OPTIONS="-ldl"
#
# srs:

View file

@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <utility>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_stream.hpp>
// AMF0 marker

View file

@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using namespace std;
#include <srs_core_rtmp.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_amf0.hpp>
#include <srs_core_protocol.hpp>
#include <srs_core_config.hpp>

View file

@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_buffer.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_socket.hpp>
#include <srs_core_log.hpp>

View file

@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using namespace std;
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_log.hpp>
#include <srs_core_rtmp.hpp>
#include <srs_core_protocol.hpp>

View file

@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string.h>
#include <stdlib.h>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_stream.hpp>
#include <srs_core_log.hpp>
#include <srs_core_autofree.hpp>

View file

@ -37,7 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <algorithm>
using namespace std;
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_log.hpp>
#include <srs_core_autofree.hpp>

View file

@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_conn.hpp>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_server.hpp>
SrsConnection::SrsConnection(SrsServer* srs_server, st_netfd_t client_stfd)

View file

@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <algorithm>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_log.hpp>
#include <srs_core_config.hpp>
#include <srs_core_rtmp.hpp>

View file

@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <netinet/in.h>
#include <arpa/inet.h>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_rtmp.hpp>
#include <srs_core_log.hpp>
#include <srs_core_protocol.hpp>

View file

@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <time.h>
#include <stdlib.h>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_log.hpp>
#include <srs_core_autofree.hpp>
#include <srs_core_socket.hpp>

View file

@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <algorithm>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_codec.hpp>
#include <srs_core_amf0.hpp>
#include <srs_core_protocol.hpp>

View file

@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <netinet/in.h>
#include <arpa/inet.h>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_rtmp.hpp>
#include <srs_core_log.hpp>
#include <srs_core_socket.hpp>

View file

@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_log.hpp>
#include <srs_core_config.hpp>
#include <srs_core_reload.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#define SRS_STAGE_DEFAULT_INTERVAL_MS 1200

View file

@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_log.hpp>
#include <srs_core_amf0.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_socket.hpp>
#include <srs_core_buffer.hpp>
#include <srs_core_stream.hpp>

View file

@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_st.hpp>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
// the following is the timeout for rtmp protocol,
// to avoid death connection.

View file

@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_refer.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_log.hpp>
#include <srs_core_config.hpp>

View file

@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using namespace std;
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
ISrsReloadHandler::ISrsReloadHandler()
{

View file

@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_rtmp.hpp>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_socket.hpp>
#include <srs_core_protocol.hpp>
#include <srs_core_autofree.hpp>

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <algorithm>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_client.hpp>
#include <srs_core_config.hpp>

View file

@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_socket.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
SrsSocket::SrsSocket(st_netfd_t client_stfd)
{

View file

@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_stream.hpp>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
SrsStream::SrsStream()
{

View file

@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_thread.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_log.hpp>
ISrsThreadHandler::ISrsThreadHandler()

View file

@ -21,7 +21,7 @@ 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_error.hpp>
#include <srs_kernel_error.hpp>
bool srs_is_system_control_error(int error_code)
{

View file

@ -21,11 +21,11 @@ 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_ERROR_HPP
#define SRS_CORE_ERROR_HPP
#ifndef SRS_KERNEL_ERROR_HPP
#define SRS_KERNEL_ERROR_HPP
/*
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
*/
#include <srs_core.hpp>

View file

@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_rtmp.hpp>
#include <srs_core_protocol.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_amf0.hpp>
#include <srs_core_autofree.hpp>
#include <srs_core_stream.hpp>

View file

@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_kernel_error.hpp>
#include <srs_core_server.hpp>
#include <srs_core_config.hpp>

View file

@ -9,6 +9,9 @@ file
..\core\srs_core.cpp,
..\core\srs_core_autofree.hpp,
..\core\srs_core_autofree.cpp,
kernel readonly separator,
..\kernel\srs_kernel_error.hpp,
..\kernel\srs_kernel_error.cpp,
app readonly separator,
..\app\srs_core_amf0.hpp,
..\app\srs_core_amf0.cpp,
@ -26,8 +29,6 @@ file
..\app\srs_core_conn.cpp,
..\app\srs_core_encoder.hpp,
..\app\srs_core_encoder.cpp,
..\app\srs_core_error.hpp,
..\app\srs_core_error.cpp,
..\app\srs_core_forward.hpp,
..\app\srs_core_forward.cpp,
..\app\srs_core_handshake.hpp,