diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index 5dbc31423..d3165f78a 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -124,12 +124,6 @@ else srs_undefine_macro "SRS_AUTO_FFMPEG_STUB" $SRS_AUTO_HEADERS_H fi -if [ $SRS_INGEST = YES ]; then - srs_define_macro "SRS_AUTO_INGEST" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_INGEST" $SRS_AUTO_HEADERS_H -fi - if [ $SRS_GPERF = YES ]; then srs_define_macro "SRS_AUTO_GPERF" $SRS_AUTO_HEADERS_H else diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 55b790cd5..cb74469d9 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -18,7 +18,6 @@ help=no SRS_HDS=RESERVED SRS_NGINX=RESERVED SRS_FFMPEG_TOOL=RESERVED -SRS_INGEST=RESERVED SRS_STREAM_CASTER=RESERVED SRS_KAFKA=RESERVED SRS_LIBRTMP=RESERVED @@ -38,6 +37,7 @@ SRS_GPERF_CP=RESERVED SRS_GPROF=RESERVED # # Always enable the bellow features. +SRS_INGEST=YES SRS_SSL=YES SRS_STAT=YES SRS_TRANSCODE=YES @@ -390,18 +390,11 @@ function apply_user_presets() { SRS_HDS=NO SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=NO SRS_STREAM_CASTER=NO SRS_KAFKA=NO SRS_LIBRTMP=NO SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -410,18 +403,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=YES SRS_FFMPEG_TOOL=YES - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=YES SRS_UTEST=YES - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -430,18 +416,11 @@ function apply_user_presets() { SRS_HDS=NO SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=NO SRS_STREAM_CASTER=NO SRS_KAFKA=NO SRS_LIBRTMP=NO SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -450,18 +429,11 @@ function apply_user_presets() { SRS_HDS=NO SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=NO SRS_STREAM_CASTER=NO SRS_KAFKA=NO SRS_LIBRTMP=NO SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -470,18 +442,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO # TODO: FIXME: need static? maybe donot. SRS_STATIC=YES fi @@ -491,18 +456,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -511,18 +469,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO SRS_UTEST=YES - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -531,18 +482,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO SRS_UTEST=YES - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO # valgrind is not supported by macOS sierra, read # https://stackoverflow.com/questions/40650338/valgrind-on-macos-sierra @@ -554,18 +498,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=YES - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=YES SRS_UTEST=YES - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -574,18 +511,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=NO SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -594,18 +524,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=YES - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO SRS_UTEST=YES - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -614,18 +537,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_INGEST=YES SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi @@ -634,18 +550,11 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=YES - SRS_INGEST=YES SRS_STREAM_CASTER=NO SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO SRS_UTEST=NO - SRS_GPERF=NO - SRS_GPERF_MC=NO - SRS_GPERF_MD=NO - SRS_GPERF_MP=NO - SRS_GPERF_CP=NO - SRS_GPROF=NO SRS_STATIC=NO fi } @@ -668,6 +577,7 @@ function apply_user_detail_options() { # Always enable HTTP utilies. if [ $SRS_HTTP_CORE = NO ]; then SRS_HTTP_CORE=YES; echo -e "${YELLOW}[WARN] Always enable HTTP utilies.${BLACK}"; fi + if [ $SRS_INGEST = NO ]; then SRS_INGEST=YES; echo -e "${YELLOW}[WARN] Always enable Ingest.${BLACK}"; fi if [ $SRS_SSL = NO ]; then SRS_SSL=YES; echo -e "${YELLOW}[WARN] Always enable SSL.${BLACK}"; fi if [ $SRS_STAT = NO ]; then SRS_STAT=YES; echo -e "${YELLOW}[WARN] Always enable Statistic.${BLACK}"; fi if [ $SRS_TRANSCODE = NO ]; then SRS_TRANSCODE=YES; echo -e "${YELLOW}[WARN] Always enable Transcode.${BLACK}"; fi diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 7a5b5a4fd..6a5cfd87d 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -3895,16 +3895,6 @@ srs_error_t SrsConfig::check_normal_config() if (get_hls_enabled(vhost->arg0())) { srs_warn("can't enable vhost.hls of %s", vhost->arg0().c_str()); } -#ifndef SRS_AUTO_INGEST - vector ingesters = get_ingesters(vhost->arg0()); - for (int j = 0; j < (int)ingesters.size(); j++) { - SrsConfDirective* ingest = ingesters[j]; - if (get_ingest_enabled(ingest)) { - srs_warn("cant' enable vhost.ingest.%s of %s", - ingest->arg0().c_str(), vhost->arg0().c_str()); - } - } -#endif // TODO: FIXME: required http server when hls storage is ram or both. } diff --git a/trunk/src/app/srs_app_http_api.cpp b/trunk/src/app/srs_app_http_api.cpp index 01fb10738..1c2fa6a86 100644 --- a/trunk/src/app/srs_app_http_api.cpp +++ b/trunk/src/app/srs_app_http_api.cpp @@ -600,11 +600,7 @@ srs_error_t SrsGoApiFeatures::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess features->set("httpd", SrsJsonAny::boolean(true)); features->set("dvr", SrsJsonAny::boolean(true)); features->set("transcode", SrsJsonAny::boolean(true)); -#ifdef SRS_AUTO_INGEST features->set("ingest", SrsJsonAny::boolean(true)); -#else - features->set("ingest", SrsJsonAny::boolean(false)); -#endif features->set("stat", SrsJsonAny::boolean(true)); #ifdef SRS_AUTO_NGINX features->set("nginx", SrsJsonAny::boolean(true)); diff --git a/trunk/src/app/srs_app_ingest.cpp b/trunk/src/app/srs_app_ingest.cpp index 4117b88a6..57e293d91 100644 --- a/trunk/src/app/srs_app_ingest.cpp +++ b/trunk/src/app/srs_app_ingest.cpp @@ -23,8 +23,6 @@ #include -#ifdef SRS_AUTO_INGEST - #include using namespace std; @@ -570,5 +568,3 @@ srs_error_t SrsIngester::on_reload_listen() return srs_success; } -#endif - diff --git a/trunk/src/app/srs_app_ingest.hpp b/trunk/src/app/srs_app_ingest.hpp index 991f94067..e0d54e03b 100644 --- a/trunk/src/app/srs_app_ingest.hpp +++ b/trunk/src/app/srs_app_ingest.hpp @@ -26,8 +26,6 @@ #include -#ifdef SRS_AUTO_INGEST - #include #include @@ -115,5 +113,4 @@ public: }; #endif -#endif diff --git a/trunk/src/app/srs_app_server.cpp b/trunk/src/app/srs_app_server.cpp index 05b9e7208..36cb3e055 100644 --- a/trunk/src/app/srs_app_server.cpp +++ b/trunk/src/app/srs_app_server.cpp @@ -485,10 +485,7 @@ SrsServer::SrsServer() http_api_mux = new SrsHttpServeMux(); http_server = new SrsHttpServer(this); http_heartbeat = new SrsHttpHeartbeat(); - -#ifdef SRS_AUTO_INGEST ingester = new SrsIngester(); -#endif } SrsServer::~SrsServer() @@ -505,10 +502,7 @@ void SrsServer::destroy() srs_freep(http_api_mux); srs_freep(http_server); srs_freep(http_heartbeat); - -#ifdef SRS_AUTO_INGEST srs_freep(ingester); -#endif if (pid_fd > 0) { ::close(pid_fd); @@ -810,11 +804,9 @@ srs_error_t SrsServer::ingest() { srs_error_t err = srs_success; -#ifdef SRS_AUTO_INGEST if ((err = ingester->start()) != srs_success) { return srs_error_wrap(err, "ingest start"); } -#endif return err; } diff --git a/trunk/src/app/srs_app_server.hpp b/trunk/src/app/srs_app_server.hpp index 71986e70e..283a3ad1c 100644 --- a/trunk/src/app/srs_app_server.hpp +++ b/trunk/src/app/srs_app_server.hpp @@ -243,9 +243,7 @@ private: SrsHttpServeMux* http_api_mux; SrsHttpServer* http_server; SrsHttpHeartbeat* http_heartbeat; -#ifdef SRS_AUTO_INGEST SrsIngester* ingester; -#endif SrsCoroutineManager* conn_manager; private: /** diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index 09f6867c4..a6570f188 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -228,7 +228,7 @@ void show_macro_features() // trans(transcode) ss << ", trans:" << srs_bool2switch(true); // inge(ingest) - ss << ", inge:" << srs_bool2switch(SRS_AUTO_INGEST_BOOL); + ss << ", inge:" << srs_bool2switch(true); ss << ", kafka:" << srs_bool2switch(SRS_AUTO_KAFKA_BOOL); ss << ", stat:" << srs_bool2switch(true); ss << ", nginx:" << srs_bool2switch(SRS_AUTO_NGINX_BOOL);