diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index 2b3eb7f41..fc4f21d78 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -142,12 +142,6 @@ else srs_undefine_macro "SRS_AUTO_FFMPEG_STUB" $SRS_AUTO_HEADERS_H fi -if [ $SRS_TRANSCODE = YES ]; then - srs_define_macro "SRS_AUTO_TRANSCODE" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_TRANSCODE" $SRS_AUTO_HEADERS_H -fi - if [ $SRS_INGEST = YES ]; then srs_define_macro "SRS_AUTO_INGEST" $SRS_AUTO_HEADERS_H else diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 98928ebf6..cb44649e5 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -19,7 +19,6 @@ SRS_HDS=RESERVED SRS_NGINX=RESERVED SRS_SSL=RESERVED SRS_FFMPEG_TOOL=RESERVED -SRS_TRANSCODE=RESERVED SRS_INGEST=RESERVED SRS_STAT=RESERVED SRS_STREAM_CASTER=RESERVED @@ -41,6 +40,7 @@ SRS_GPERF_CP=RESERVED SRS_GPROF=RESERVED # # Always enable the bellow features. +SRS_TRANSCODE=YES SRS_HTTP_CALLBACK=YES SRS_HTTP_SERVER=YES SRS_HTTP_API=YES @@ -391,7 +391,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=NO SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=NO SRS_INGEST=NO SRS_STAT=NO SRS_STREAM_CASTER=NO @@ -414,7 +413,6 @@ function apply_user_presets() { SRS_NGINX=YES SRS_SSL=YES SRS_FFMPEG_TOOL=YES - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -437,7 +435,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=NO SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=NO SRS_INGEST=NO SRS_STAT=NO SRS_STREAM_CASTER=NO @@ -460,7 +457,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=NO SRS_INGEST=NO SRS_STAT=NO SRS_STREAM_CASTER=NO @@ -483,7 +479,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -507,7 +502,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -530,7 +524,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -553,7 +546,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -579,7 +571,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=YES - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -602,7 +593,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -625,7 +615,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=YES - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -648,7 +637,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=NO - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=YES @@ -671,7 +659,6 @@ function apply_user_presets() { SRS_NGINX=NO SRS_SSL=YES SRS_FFMPEG_TOOL=YES - SRS_TRANSCODE=YES SRS_INGEST=YES SRS_STAT=YES SRS_STREAM_CASTER=NO @@ -707,6 +694,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_TRANSCODE = NO ]; then SRS_TRANSCODE=YES; echo -e "${YELLOW}[WARN] Always enable Transcode.${BLACK}"; fi if [ $SRS_HTTP_CALLBACK = NO ]; then SRS_HTTP_CALLBACK=YES; echo -e "${YELLOW}[WARN] Always enable HTTP callback.${BLACK}"; fi if [ $SRS_HTTP_SERVER = NO ]; then SRS_HTTP_SERVER=YES; echo -e "${YELLOW}[WARN] Always enable HTTP server.${BLACK}"; fi if [ $SRS_HTTP_API = NO ]; then SRS_HTTP_API=YES; echo -e "${YELLOW}[WARN] Always enable HTTP API.${BLACK}"; fi @@ -732,6 +720,7 @@ function apply_user_detail_options() { SRS_SSL=NO SRS_FFMPEG_TOOL=NO SRS_TRANSCODE=NO + SRS_HTTP_CALLBACK=NO SRS_INGEST=NO SRS_STAT=NO SRS_STREAM_CASTER=NO diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 32abb188a..7a5b5a4fd 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -3895,11 +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_TRANSCODE - if (get_transcode_enabled(get_transcode(vhost->arg0(), ""))) { - srs_warn("can't enable vhost.transcode of %s", vhost->arg0().c_str()); - } -#endif #ifndef SRS_AUTO_INGEST vector ingesters = get_ingesters(vhost->arg0()); for (int j = 0; j < (int)ingesters.size(); j++) { diff --git a/trunk/src/app/srs_app_encoder.cpp b/trunk/src/app/srs_app_encoder.cpp index 00370f93b..2a0d101ce 100644 --- a/trunk/src/app/srs_app_encoder.cpp +++ b/trunk/src/app/srs_app_encoder.cpp @@ -34,8 +34,6 @@ using namespace std; #include #include -#ifdef SRS_AUTO_TRANSCODE - // for encoder to detect the dead loop static std::vector _transcoded_url; @@ -334,6 +332,3 @@ void SrsEncoder::show_encode_log_message() } } -#endif - - diff --git a/trunk/src/app/srs_app_encoder.hpp b/trunk/src/app/srs_app_encoder.hpp index b8ebede58..9995e93f2 100644 --- a/trunk/src/app/srs_app_encoder.hpp +++ b/trunk/src/app/srs_app_encoder.hpp @@ -26,8 +26,6 @@ #include -#ifdef SRS_AUTO_TRANSCODE - #include #include @@ -72,5 +70,3 @@ private: #endif -#endif - diff --git a/trunk/src/app/srs_app_http_api.cpp b/trunk/src/app/srs_app_http_api.cpp index 9f0389826..a86c5802c 100644 --- a/trunk/src/app/srs_app_http_api.cpp +++ b/trunk/src/app/srs_app_http_api.cpp @@ -603,11 +603,7 @@ srs_error_t SrsGoApiFeatures::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess features->set("api", SrsJsonAny::boolean(true)); features->set("httpd", SrsJsonAny::boolean(true)); features->set("dvr", SrsJsonAny::boolean(true)); -#ifdef SRS_AUTO_TRANSCODE features->set("transcode", SrsJsonAny::boolean(true)); -#else - features->set("transcode", SrsJsonAny::boolean(false)); -#endif #ifdef SRS_AUTO_INGEST features->set("ingest", SrsJsonAny::boolean(true)); #else diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index fb47c6d61..c81696875 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -824,9 +824,7 @@ SrsOriginHub::SrsOriginHub() hls = new SrsHls(); dash = new SrsDash(); dvr = new SrsDvr(); -#ifdef SRS_AUTO_TRANSCODE encoder = new SrsEncoder(); -#endif #ifdef SRS_AUTO_HDS hds = new SrsHds(); #endif @@ -854,9 +852,7 @@ SrsOriginHub::~SrsOriginHub() srs_freep(hls); srs_freep(dash); srs_freep(dvr); -#ifdef SRS_AUTO_TRANSCODE srs_freep(encoder); -#endif #ifdef SRS_AUTO_HDS srs_freep(hds); #endif @@ -1116,11 +1112,9 @@ srs_error_t SrsOriginHub::on_publish() } // TODO: FIXME: use initialize to set req. -#ifdef SRS_AUTO_TRANSCODE if ((err = encoder->on_publish(req)) != srs_success) { return srs_error_wrap(err, "encoder publish"); } -#endif if ((err = hls->on_publish()) != srs_success) { return srs_error_wrap(err, "hls publish"); @@ -1158,10 +1152,7 @@ void SrsOriginHub::on_unpublish() // destroy all forwarders destroy_forwarders(); -#ifdef SRS_AUTO_TRANSCODE encoder->on_unpublish(); -#endif - hls->on_unpublish(); dash->on_unpublish(); dvr->on_unpublish(); @@ -1419,7 +1410,6 @@ srs_error_t SrsOriginHub::on_reload_vhost_transcode(string vhost) // TODO: FIXME: maybe should ignore when publish already stopped? -#ifdef SRS_AUTO_TRANSCODE encoder->on_unpublish(); // Don't start transcode when source is not active. @@ -1431,7 +1421,6 @@ srs_error_t SrsOriginHub::on_reload_vhost_transcode(string vhost) return srs_error_wrap(err, "start encoder failed"); } srs_trace("vhost %s transcode reload success", vhost.c_str()); -#endif return err; } diff --git a/trunk/src/app/srs_app_source.hpp b/trunk/src/app/srs_app_source.hpp index 9fd8dcea8..e19105d01 100644 --- a/trunk/src/app/srs_app_source.hpp +++ b/trunk/src/app/srs_app_source.hpp @@ -55,9 +55,7 @@ class SrsMessageHeader; class SrsHls; class SrsDvr; class SrsDash; -#ifdef SRS_AUTO_TRANSCODE class SrsEncoder; -#endif class SrsBuffer; #ifdef SRS_AUTO_HDS class SrsHds; @@ -428,9 +426,7 @@ private: // dvr handler. SrsDvr* dvr; // transcoding handler. -#ifdef SRS_AUTO_TRANSCODE SrsEncoder* encoder; -#endif #ifdef SRS_AUTO_HDS // adobe hds(http dynamic streaming). SrsHds *hds; diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index ca9b5dd43..2f03198be 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -226,7 +226,7 @@ void show_macro_features() ss << ", hp:" << srs_bool2switch(true); ss << ", dvr:" << srs_bool2switch(SRS_AUTO_DVR_BOOL); // trans(transcode) - ss << ", trans:" << srs_bool2switch(SRS_AUTO_TRANSCODE_BOOL); + ss << ", trans:" << srs_bool2switch(true); // inge(ingest) ss << ", inge:" << srs_bool2switch(SRS_AUTO_INGEST_BOOL); ss << ", kafka:" << srs_bool2switch(SRS_AUTO_KAFKA_BOOL);