From 71a4b3c3f7703951f307fbf810d9d3a9ad784283 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 11:38:25 +0800 Subject: [PATCH] Add conf/lighthouse.conf for LightHouse. v4.0.222 --- trunk/auto/auto_headers.sh | 1 + trunk/auto/options.sh | 4 +++ trunk/conf/lighthouse.conf | 43 ++++++++++++++++++++++++++++ trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_config.cpp | 2 +- trunk/src/core/srs_core_version4.hpp | 2 +- 6 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 trunk/conf/lighthouse.conf diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index 2c5f40649..19448404d 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -177,6 +177,7 @@ fi # prefix echo "" >> $SRS_AUTO_HEADERS_H echo "#define SRS_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_DEFAULT_CONFIG \"${SRS_DEFAULT_CONFIG}\"" >> $SRS_AUTO_HEADERS_H echo "" >> $SRS_AUTO_HEADERS_H diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 43100b148..c33acb5f8 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -36,6 +36,7 @@ SRS_FFMPEG_TOOL=NO SRS_FFMPEG_FIT=RESERVED # arguments SRS_PREFIX=/usr/local/srs +SRS_DEFAULT_CONFIG=conf/srs.conf SRS_JOBS=1 SRS_STATIC=NO # If enabled, link shared libraries for libst.so which uses MPL license. @@ -127,6 +128,7 @@ Features: --ffmpeg-fit=on|off Whether enable the FFmpeg fit(source code). Default: $(value2switch $SRS_FFMPEG_FIT) --prefix= The absolute installation path. Default: $SRS_PREFIX + --config= The default config file for SRS. Default: $SRS_DEFAULT_CONFIG --gcov=on|off Whether enable the GCOV compiler options. Default: $(value2switch $SRS_GCOV) --debug=on|off Whether enable the debug code, may hurt performance. Default: $(value2switch $SRS_DEBUG) --debug-stats=on|off Whether enable the debug stats, may hurt performance. Default: $(value2switch $SRS_DEBUG_STATS) @@ -220,6 +222,7 @@ function parse_user_option() { --jobs) SRS_JOBS=${value} ;; --prefix) SRS_PREFIX=${value} ;; + --config) SRS_DEFAULT_CONFIG=${value} ;; --static) SRS_STATIC=$(switch2value $value) ;; --cpu) SRS_CROSS_BUILD_CPU=${value} ;; @@ -492,6 +495,7 @@ function regenerate_options() { SRS_AUTO_USER_CONFIGURE=`echo $opt` # regenerate the options for default values. SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}" + SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --config=$SRS_DEFAULT_CONFIG" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hls=$(value2switch $SRS_HLS)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hds=$(value2switch $SRS_HDS)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --dvr=$(value2switch $SRS_DVR)" diff --git a/trunk/conf/lighthouse.conf b/trunk/conf/lighthouse.conf new file mode 100644 index 000000000..61e5ba5b0 --- /dev/null +++ b/trunk/conf/lighthouse.conf @@ -0,0 +1,43 @@ + +listen 1935; +max_connections 1000; +daemon on; +srs_log_tank file; + +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} + +http_api { + enabled on; + listen 1985; +} +stats { + network 0; +} +rtc_server { + enabled on; + listen 8000; # UDP port + # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate + candidate $CANDIDATE; +} + +vhost __defaultVhost__ { + hls { + enabled on; + } + http_remux { + enabled on; + mount [vhost]/[app]/[stream].flv; + } + rtc { + enabled on; + # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc + rtmp_to_rtc on; + # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp + rtc_to_rtmp on; + } +} + diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 0cfd30b9b..130d0bce1 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-13, Add conf/lighthouse.conf for LightHouse. v4.0.222 * v4.0, 2022-01-12, Refine the running homepage. v4.0.221 * v4.0, 2022-01-12, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips.(#2863). v4.0.220 * v4.0, 2022-01-05, For [#2717](https://github.com/ossrs/srs/issues/2717): When reopening segment, never update the duration. (#2717). v4.0.219 diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index a984b4cd8..f7174dbd7 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -50,7 +50,7 @@ const char* _srs_version = "XCORE-" RTMP_SIG_SRS_SERVER; #define SRS_CONF_PERFER_TRUE(conf_arg) conf_arg != "off" // default config file. -#define SRS_CONF_DEFAULT_COFNIG_FILE "conf/srs.conf" +#define SRS_CONF_DEFAULT_COFNIG_FILE SRS_DEFAULT_CONFIG // '\n' #define SRS_LF (char)SRS_CONSTS_LF diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 3ef0133b5..66794be67 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 221 +#define VERSION_REVISION 222 #endif