1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

Modules: Enable app files for module

This commit is contained in:
winlin 2021-04-21 11:03:37 +08:00
parent aa07f45545
commit b29827d22c
3 changed files with 10 additions and 2 deletions

4
trunk/configure vendored
View file

@ -328,7 +328,7 @@ SERVER_OBJS="${MODULE_OBJS[@]}"
# #
#Main Module, for app from modules. #Main Module, for app from modules.
MODULE_ID="MAIN" MODULE_ID="MAIN"
MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL") MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "APP")
ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibGperfRoot} ${LibSSLRoot}) ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibGperfRoot} ${LibSSLRoot})
if [[ $SRS_RTC == YES ]]; then if [[ $SRS_RTC == YES ]]; then
ModuleLibIncs+=(${LibSrtpRoot}) 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 BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh
# #
# For modules, without the app module. # 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}) ModuleLibFiles=(${LibSTfile} ${LibSSLfile} ${LibGperfFile})
if [[ $SRS_RTC == YES ]]; then if [[ $SRS_RTC == YES ]]; then
ModuleLibFiles+=(${LibSrtpFile}) ModuleLibFiles+=(${LibSrtpFile})

View file

@ -46,6 +46,7 @@ using namespace std;
#include <srs_service_http_conn.hpp> #include <srs_service_http_conn.hpp>
#include <srs_service_rtmp_conn.hpp> #include <srs_service_rtmp_conn.hpp>
#include <srs_service_utility.hpp> #include <srs_service_utility.hpp>
#include <srs_app_config.hpp>
// pre-declare // pre-declare
srs_error_t proxy_hls2rtmp(std::string hls, std::string rtmp); 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); ISrsLog* _srs_log = new SrsConsoleLog(SrsLogLevelTrace, false);
ISrsContext* _srs_context = new SrsThreadContext(); ISrsContext* _srs_context = new SrsThreadContext();
// @global config object for app module.
SrsConfig* _srs_config = new SrsConfig();
/** /**
* main entrance. * main entrance.
*/ */

View file

@ -29,6 +29,7 @@
#include <srs_kernel_file.hpp> #include <srs_kernel_file.hpp>
#include <srs_kernel_stream.hpp> #include <srs_kernel_stream.hpp>
#include <srs_core_autofree.hpp> #include <srs_core_autofree.hpp>
#include <srs_app_config.hpp>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -40,6 +41,9 @@ using namespace std;
ISrsLog* _srs_log = new SrsConsoleLog(SrsLogLevelTrace, false); ISrsLog* _srs_log = new SrsConsoleLog(SrsLogLevelTrace, false);
ISrsContext* _srs_context = new SrsThreadContext(); 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 parse(std::string mp4_file, bool verbose)
{ {
srs_error_t err = srs_success; srs_error_t err = srs_success;