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

for #155, osx(darwin) enable http api and stat, rusage is ok.

This commit is contained in:
winlin 2015-03-17 22:35:47 +08:00
parent ab673e1300
commit cf3becbc17
3 changed files with 5 additions and 12 deletions

View file

@ -266,15 +266,6 @@ function OSX_prepare()
echo "OSX detected, must specifies the --osx" echo "OSX detected, must specifies the --osx"
exit 1 exit 1
fi fi
# TODO: FIXME: support following features.
if [ $SRS_HTTP_API = YES ]; then
echo "OSX does not support http-api, use --without-http-api"
exit 1
fi
if [ $SRS_STAT = YES ]; then
echo "OSX does not support stat, use --without-stat"
exit 1
fi
fi fi
brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then

View file

@ -592,12 +592,12 @@ 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_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
SRS_STREAM_CASTER=NO SRS_STREAM_CASTER=NO
SRS_HTTP_API=NO SRS_HTTP_API=YES
SRS_LIBRTMP=YES SRS_LIBRTMP=YES
SRS_RESEARCH=NO SRS_RESEARCH=NO
SRS_UTEST=NO SRS_UTEST=NO

View file

@ -836,6 +836,7 @@ int SrsServer::do_cycle()
srs_info("update resource info, rss."); srs_info("update resource info, rss.");
srs_update_system_rusage(); srs_update_system_rusage();
} }
#ifndef SRS_OSX
if ((i % SRS_SYS_CPU_STAT_RESOLUTION_TIMES) == 0) { if ((i % SRS_SYS_CPU_STAT_RESOLUTION_TIMES) == 0) {
srs_info("update cpu info, cpu usage."); srs_info("update cpu info, cpu usage.");
srs_update_proc_stat(); srs_update_proc_stat();
@ -868,6 +869,7 @@ int SrsServer::do_cycle()
} }
} }
#endif #endif
#endif
#endif #endif
srs_info("server main thread loop"); srs_info("server main thread loop");
} }