From b29827d22cd928fb102ef525666e1c9ed35c7680 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 21 Apr 2021 11:03:37 +0800 Subject: [PATCH] Modules: Enable app files for module --- trunk/configure | 4 ++-- trunk/src/main/srs_main_ingest_hls.cpp | 4 ++++ trunk/src/main/srs_main_mp4_parser.cpp | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/trunk/configure b/trunk/configure index 9fba358e6..07b794054 100755 --- a/trunk/configure +++ b/trunk/configure @@ -328,7 +328,7 @@ SERVER_OBJS="${MODULE_OBJS[@]}" # #Main Module, for app from modules. MODULE_ID="MAIN" -MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL") +MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP") ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibGperfRoot} ${LibSSLRoot}) if [[ $SRS_RTC == YES ]]; then ModuleLibIncs+=(${LibSrtpRoot}) @@ -390,7 +390,7 @@ LINK_OPTIONS="${SrsLinkOptions}${SrsGprofLink}${SrsGperfLink}" BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh # # For modules, without the app module. -MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${MAIN_OBJS[@]}" +MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}" ModuleLibFiles=(${LibSTfile} ${LibSSLfile} ${LibGperfFile}) if [[ $SRS_RTC == YES ]]; then ModuleLibFiles+=(${LibSrtpFile}) diff --git a/trunk/src/main/srs_main_ingest_hls.cpp b/trunk/src/main/srs_main_ingest_hls.cpp index 8bacabb45..cbc69119b 100644 --- a/trunk/src/main/srs_main_ingest_hls.cpp +++ b/trunk/src/main/srs_main_ingest_hls.cpp @@ -46,6 +46,7 @@ using namespace std; #include #include #include +#include // pre-declare srs_error_t proxy_hls2rtmp(std::string hls, std::string rtmp); @@ -54,6 +55,9 @@ srs_error_t proxy_hls2rtmp(std::string hls, std::string rtmp); ISrsLog* _srs_log = new SrsConsoleLog(SrsLogLevelTrace, false); ISrsContext* _srs_context = new SrsThreadContext(); +// @global config object for app module. +SrsConfig* _srs_config = new SrsConfig(); + /** * main entrance. */ diff --git a/trunk/src/main/srs_main_mp4_parser.cpp b/trunk/src/main/srs_main_mp4_parser.cpp index 5ce205fb5..d9ecc36e5 100644 --- a/trunk/src/main/srs_main_mp4_parser.cpp +++ b/trunk/src/main/srs_main_mp4_parser.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -40,6 +41,9 @@ using namespace std; ISrsLog* _srs_log = new SrsConsoleLog(SrsLogLevelTrace, false); ISrsContext* _srs_context = new SrsThreadContext(); +// @global config object for app module. +SrsConfig* _srs_config = new SrsConfig(); + srs_error_t parse(std::string mp4_file, bool verbose) { srs_error_t err = srs_success;