mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine options, add --with-stat. 0.9.199
This commit is contained in:
parent
3111870316
commit
6103b1c3ce
4 changed files with 39 additions and 19 deletions
|
@ -678,6 +678,13 @@ else
|
||||||
echo "#undef SRS_AUTO_INGEST" >> $SRS_AUTO_HEADERS_H
|
echo "#undef SRS_AUTO_INGEST" >> $SRS_AUTO_HEADERS_H
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# for statistic.
|
||||||
|
if [ $SRS_STAT = YES ]; then
|
||||||
|
echo "#define SRS_AUTO_STAT" >> $SRS_AUTO_HEADERS_H
|
||||||
|
else
|
||||||
|
echo "#undef SRS_AUTO_STAT" >> $SRS_AUTO_HEADERS_H
|
||||||
|
fi
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# build research code, librtmp
|
# build research code, librtmp
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
@ -808,17 +815,6 @@ echo "#define SRS_AUTO_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H
|
||||||
|
|
||||||
echo "" >> $SRS_AUTO_HEADERS_H
|
echo "" >> $SRS_AUTO_HEADERS_H
|
||||||
|
|
||||||
# os specified
|
|
||||||
echo "" >> $SRS_AUTO_HEADERS_H
|
|
||||||
|
|
||||||
if [ $SRS_OSX = YES ]; then
|
|
||||||
echo "#define SRS_AUTO_OSX" >> $SRS_AUTO_HEADERS_H
|
|
||||||
else
|
|
||||||
echo "#undef SRS_AUTO_OSX" >> $SRS_AUTO_HEADERS_H
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "" >> $SRS_AUTO_HEADERS_H
|
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# generated the contributors from AUTHORS.txt
|
# generated the contributors from AUTHORS.txt
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
|
@ -22,6 +22,7 @@ SRS_SSL=RESERVED
|
||||||
SRS_FFMPEG_TOOL=RESERVED
|
SRS_FFMPEG_TOOL=RESERVED
|
||||||
SRS_TRANSCODE=RESERVED
|
SRS_TRANSCODE=RESERVED
|
||||||
SRS_INGEST=RESERVED
|
SRS_INGEST=RESERVED
|
||||||
|
SRS_STAT=RESERVED
|
||||||
SRS_HTTP_CALLBACK=RESERVED
|
SRS_HTTP_CALLBACK=RESERVED
|
||||||
SRS_HTTP_SERVER=RESERVED
|
SRS_HTTP_SERVER=RESERVED
|
||||||
SRS_HTTP_API=RESERVED
|
SRS_HTTP_API=RESERVED
|
||||||
|
@ -118,6 +119,7 @@ Options:
|
||||||
user must specifies the transcode tools in conf.
|
user must specifies the transcode tools in conf.
|
||||||
--with-ingest enable ingest features.
|
--with-ingest enable ingest features.
|
||||||
user must specifies the ingest tools in conf.
|
user must specifies the ingest tools in conf.
|
||||||
|
--with-stat enable the data statistic, for http api.
|
||||||
--with-librtmp enable srs-librtmp, library for client.
|
--with-librtmp enable srs-librtmp, library for client.
|
||||||
--with-bwtc enable SRS bandwidth test client tool.
|
--with-bwtc enable SRS bandwidth test client tool.
|
||||||
--with-research build the research tools.
|
--with-research build the research tools.
|
||||||
|
@ -139,6 +141,7 @@ Options:
|
||||||
--without-ffmpeg disable the ffmpeg transcode tool feature.
|
--without-ffmpeg disable the ffmpeg transcode tool feature.
|
||||||
--without-transcode disable the transcoding feature.
|
--without-transcode disable the transcoding feature.
|
||||||
--without-ingest disable the ingest feature.
|
--without-ingest disable the ingest feature.
|
||||||
|
--without-stat disable the data statistic feature.
|
||||||
--without-librtmp disable srs-librtmp, library for client.
|
--without-librtmp disable srs-librtmp, library for client.
|
||||||
--without-bwtc disable SRS bandwidth test client tool.
|
--without-bwtc disable SRS bandwidth test client tool.
|
||||||
--without-research do not build the research tools.
|
--without-research do not build the research tools.
|
||||||
|
@ -206,6 +209,7 @@ function parse_user_option() {
|
||||||
--with-ffmpeg) SRS_FFMPEG_TOOL=YES ;;
|
--with-ffmpeg) SRS_FFMPEG_TOOL=YES ;;
|
||||||
--with-transcode) SRS_TRANSCODE=YES ;;
|
--with-transcode) SRS_TRANSCODE=YES ;;
|
||||||
--with-ingest) SRS_INGEST=YES ;;
|
--with-ingest) SRS_INGEST=YES ;;
|
||||||
|
--with-stat) SRS_STAT=YES ;;
|
||||||
--with-http-callback) SRS_HTTP_CALLBACK=YES ;;
|
--with-http-callback) SRS_HTTP_CALLBACK=YES ;;
|
||||||
--with-http-server) SRS_HTTP_SERVER=YES ;;
|
--with-http-server) SRS_HTTP_SERVER=YES ;;
|
||||||
--with-http-api) SRS_HTTP_API=YES ;;
|
--with-http-api) SRS_HTTP_API=YES ;;
|
||||||
|
@ -227,6 +231,7 @@ function parse_user_option() {
|
||||||
--without-ffmpeg) SRS_FFMPEG_TOOL=NO ;;
|
--without-ffmpeg) SRS_FFMPEG_TOOL=NO ;;
|
||||||
--without-transcode) SRS_TRANSCODE=NO ;;
|
--without-transcode) SRS_TRANSCODE=NO ;;
|
||||||
--without-ingest) SRS_INGEST=NO ;;
|
--without-ingest) SRS_INGEST=NO ;;
|
||||||
|
--without-stat) SRS_STAT=NO ;;
|
||||||
--without-http-callback) SRS_HTTP_CALLBACK=NO ;;
|
--without-http-callback) SRS_HTTP_CALLBACK=NO ;;
|
||||||
--without-http-server) SRS_HTTP_SERVER=NO ;;
|
--without-http-server) SRS_HTTP_SERVER=NO ;;
|
||||||
--without-http-api) SRS_HTTP_API=NO ;;
|
--without-http-api) SRS_HTTP_API=NO ;;
|
||||||
|
@ -353,6 +358,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=NO
|
SRS_TRANSCODE=NO
|
||||||
SRS_INGEST=NO
|
SRS_INGEST=NO
|
||||||
|
SRS_STAT=NO
|
||||||
SRS_HTTP_PARSER=NO
|
SRS_HTTP_PARSER=NO
|
||||||
SRS_HTTP_CALLBACK=NO
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=NO
|
SRS_HTTP_SERVER=NO
|
||||||
|
@ -377,6 +383,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=YES
|
SRS_FFMPEG_TOOL=YES
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -401,6 +408,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=NO
|
SRS_TRANSCODE=NO
|
||||||
SRS_INGEST=NO
|
SRS_INGEST=NO
|
||||||
|
SRS_STAT=NO
|
||||||
SRS_HTTP_PARSER=NO
|
SRS_HTTP_PARSER=NO
|
||||||
SRS_HTTP_CALLBACK=NO
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=NO
|
SRS_HTTP_SERVER=NO
|
||||||
|
@ -425,6 +433,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=NO
|
SRS_TRANSCODE=NO
|
||||||
SRS_INGEST=NO
|
SRS_INGEST=NO
|
||||||
|
SRS_STAT=NO
|
||||||
SRS_HTTP_PARSER=NO
|
SRS_HTTP_PARSER=NO
|
||||||
SRS_HTTP_CALLBACK=NO
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=NO
|
SRS_HTTP_SERVER=NO
|
||||||
|
@ -449,6 +458,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=NO
|
SRS_TRANSCODE=NO
|
||||||
SRS_INGEST=NO
|
SRS_INGEST=NO
|
||||||
|
SRS_STAT=NO
|
||||||
SRS_HTTP_PARSER=NO
|
SRS_HTTP_PARSER=NO
|
||||||
SRS_HTTP_CALLBACK=NO
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=NO
|
SRS_HTTP_SERVER=NO
|
||||||
|
@ -473,6 +483,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -498,6 +509,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -522,6 +534,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -546,6 +559,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=YES
|
SRS_FFMPEG_TOOL=YES
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -570,6 +584,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -594,6 +609,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=NO
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -620,6 +636,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=YES
|
SRS_FFMPEG_TOOL=YES
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -644,6 +661,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -668,6 +686,7 @@ function apply_user_presets() {
|
||||||
SRS_FFMPEG_TOOL=YES
|
SRS_FFMPEG_TOOL=YES
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
|
SRS_STAT=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
|
@ -795,11 +814,16 @@ function check_option_conflicts() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# for darwin, not support stat yet.
|
||||||
|
if [ $SRS_OSX = YES ]; then
|
||||||
|
if [ $SRS_STAT = YES ]; then
|
||||||
|
echo "osx should never use stat, see: ./configure --help"; __check_ok=NO;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# for darwin, must use --osx, vice versa
|
# for darwin, must use --osx, vice versa
|
||||||
if [ $SRS_OSX = YES ]; then
|
if [ $SRS_OSX = YES ]; then
|
||||||
if [ `uname -s` = Darwin ]; then
|
if [ `uname -s` != Darwin ]; then
|
||||||
echo "osx(darwin) is ok"
|
|
||||||
else
|
|
||||||
echo "--osx is for darwin(your os is not), see: ./configure --help"; __check_ok=NO;
|
echo "--osx is for darwin(your os is not), see: ./configure --help"; __check_ok=NO;
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
|
@ -672,7 +672,7 @@ int SrsServer::do_cycle()
|
||||||
// find the max loop
|
// find the max loop
|
||||||
int max = srs_max(0, SRS_SYS_TIME_RESOLUTION_MS_TIMES);
|
int max = srs_max(0, SRS_SYS_TIME_RESOLUTION_MS_TIMES);
|
||||||
|
|
||||||
#ifndef SRS_AUTO_OSX
|
#ifdef SRS_AUTO_STAT
|
||||||
max = srs_max(max, SRS_SYS_RUSAGE_RESOLUTION_TIMES);
|
max = srs_max(max, SRS_SYS_RUSAGE_RESOLUTION_TIMES);
|
||||||
max = srs_max(max, SRS_SYS_CPU_STAT_RESOLUTION_TIMES);
|
max = srs_max(max, SRS_SYS_CPU_STAT_RESOLUTION_TIMES);
|
||||||
max = srs_max(max, SRS_SYS_DISK_STAT_RESOLUTION_TIMES);
|
max = srs_max(max, SRS_SYS_DISK_STAT_RESOLUTION_TIMES);
|
||||||
|
@ -723,7 +723,7 @@ int SrsServer::do_cycle()
|
||||||
srs_update_system_time_ms();
|
srs_update_system_time_ms();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SRS_AUTO_OSX
|
#ifdef SRS_AUTO_STAT
|
||||||
if ((i % SRS_SYS_RUSAGE_RESOLUTION_TIMES) == 0) {
|
if ((i % SRS_SYS_RUSAGE_RESOLUTION_TIMES) == 0) {
|
||||||
srs_info("update resource info, rss.");
|
srs_info("update resource info, rss.");
|
||||||
srs_update_system_rusage();
|
srs_update_system_rusage();
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR "0"
|
#define VERSION_MAJOR "0"
|
||||||
#define VERSION_MINOR "9"
|
#define VERSION_MINOR "9"
|
||||||
#define VERSION_REVISION "198"
|
#define VERSION_REVISION "199"
|
||||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue