diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index d3165f78a..029613dd7 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -79,12 +79,6 @@ fi echo "" >> $SRS_AUTO_HEADERS_H # auto headers in depends. -if [ $SRS_STREAM_CASTER = YES ]; then - srs_define_macro "SRS_AUTO_STREAM_CASTER" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_STREAM_CASTER" $SRS_AUTO_HEADERS_H -fi - if [ $SRS_KAFKA = YES ]; then srs_define_macro "SRS_AUTO_KAFKA" $SRS_AUTO_HEADERS_H else diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 36ad5c5d6..92b8bea04 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_STREAM_CASTER=RESERVED SRS_KAFKA=RESERVED SRS_LIBRTMP=RESERVED SRS_RESEARCH=RESERVED @@ -30,6 +29,7 @@ SRS_GPERF_MP=NO # Performance test: gperf memory profile SRS_GPERF_CP=NO # Performance test: gperf cpu profile SRS_GPROF=NO # Performance test: gprof # Always enable the bellow features. +SRS_STREAM_CASTER=YES SRS_INGEST=YES SRS_SSL=YES SRS_STAT=YES @@ -383,7 +383,6 @@ function apply_user_presets() { SRS_HDS=NO SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=NO SRS_KAFKA=NO SRS_LIBRTMP=NO SRS_RESEARCH=NO @@ -396,7 +395,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=YES SRS_FFMPEG_TOOL=YES - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=YES @@ -409,7 +407,6 @@ function apply_user_presets() { SRS_HDS=NO SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=NO SRS_KAFKA=NO SRS_LIBRTMP=NO SRS_RESEARCH=NO @@ -422,7 +419,6 @@ function apply_user_presets() { SRS_HDS=NO SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=NO SRS_KAFKA=NO SRS_LIBRTMP=NO SRS_RESEARCH=NO @@ -435,7 +431,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO @@ -449,7 +444,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO @@ -462,7 +456,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO @@ -475,7 +468,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO @@ -491,7 +483,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=YES - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=YES @@ -504,7 +495,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=NO SRS_RESEARCH=NO @@ -517,7 +507,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=YES - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO @@ -530,7 +519,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=NO - SRS_STREAM_CASTER=YES SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO @@ -543,7 +531,6 @@ function apply_user_presets() { SRS_HDS=YES SRS_NGINX=NO SRS_FFMPEG_TOOL=YES - SRS_STREAM_CASTER=NO SRS_KAFKA=YES SRS_LIBRTMP=YES SRS_RESEARCH=NO @@ -570,6 +557,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_STREAM_CASTER = NO ]; then SRS_STREAM_CASTER=YES; echo -e "${YELLOW}[WARN] Always enable StreamCaster.${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 diff --git a/trunk/src/app/srs_app_caster_flv.cpp b/trunk/src/app/srs_app_caster_flv.cpp index 98a7c8520..278a9ed02 100644 --- a/trunk/src/app/srs_app_caster_flv.cpp +++ b/trunk/src/app/srs_app_caster_flv.cpp @@ -23,8 +23,6 @@ #include -#ifdef SRS_AUTO_STREAM_CASTER - #include using namespace std; @@ -324,4 +322,3 @@ srs_error_t SrsHttpFileReader::lseek(off_t offset, int whence, off_t* seeked) return srs_success; } -#endif diff --git a/trunk/src/app/srs_app_caster_flv.hpp b/trunk/src/app/srs_app_caster_flv.hpp index 08baa3e1e..d56b773f1 100644 --- a/trunk/src/app/srs_app_caster_flv.hpp +++ b/trunk/src/app/srs_app_caster_flv.hpp @@ -29,8 +29,6 @@ #include #include -#ifdef SRS_AUTO_STREAM_CASTER - class SrsConfDirective; class SrsHttpServeMux; class SrsRtmpClient; @@ -126,4 +124,3 @@ public: #endif -#endif diff --git a/trunk/src/app/srs_app_http_api.cpp b/trunk/src/app/srs_app_http_api.cpp index 1c2fa6a86..1739b49fb 100644 --- a/trunk/src/app/srs_app_http_api.cpp +++ b/trunk/src/app/srs_app_http_api.cpp @@ -612,11 +612,7 @@ srs_error_t SrsGoApiFeatures::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess #else features->set("ffmpeg", SrsJsonAny::boolean(false)); #endif -#ifdef SRS_AUTO_STREAM_CASTER features->set("caster", SrsJsonAny::boolean(true)); -#else - features->set("caster", SrsJsonAny::boolean(false)); -#endif #ifdef SRS_PERF_COMPLEX_SEND features->set("complex_send", SrsJsonAny::boolean(true)); #else diff --git a/trunk/src/app/srs_app_mpegts_udp.cpp b/trunk/src/app/srs_app_mpegts_udp.cpp index cdc86f476..0035077d2 100644 --- a/trunk/src/app/srs_app_mpegts_udp.cpp +++ b/trunk/src/app/srs_app_mpegts_udp.cpp @@ -23,8 +23,6 @@ #include -#ifdef SRS_AUTO_STREAM_CASTER - #include #include #include @@ -639,4 +637,3 @@ void SrsMpegtsOverUdp::close() srs_freep(sdk); } -#endif diff --git a/trunk/src/app/srs_app_mpegts_udp.hpp b/trunk/src/app/srs_app_mpegts_udp.hpp index e51fb133c..a46e28fd2 100644 --- a/trunk/src/app/srs_app_mpegts_udp.hpp +++ b/trunk/src/app/srs_app_mpegts_udp.hpp @@ -26,8 +26,6 @@ #include -#ifdef SRS_AUTO_STREAM_CASTER - struct sockaddr; #include #include @@ -123,4 +121,3 @@ private: #endif -#endif diff --git a/trunk/src/app/srs_app_rtsp.cpp b/trunk/src/app/srs_app_rtsp.cpp index bcbf1f916..97514660d 100644 --- a/trunk/src/app/srs_app_rtsp.cpp +++ b/trunk/src/app/srs_app_rtsp.cpp @@ -46,8 +46,6 @@ using namespace std; #include #include -#ifdef SRS_AUTO_STREAM_CASTER - SrsRtpConn::SrsRtpConn(SrsRtspConn* r, int p, int sid) { rtsp = r; @@ -746,5 +744,3 @@ void SrsRtspCaster::remove(SrsRtspConn* conn) srs_freep(conn); } -#endif - diff --git a/trunk/src/app/srs_app_rtsp.hpp b/trunk/src/app/srs_app_rtsp.hpp index 37e72fe52..11d529a1d 100644 --- a/trunk/src/app/srs_app_rtsp.hpp +++ b/trunk/src/app/srs_app_rtsp.hpp @@ -34,8 +34,6 @@ #include #include -#ifdef SRS_AUTO_STREAM_CASTER - class SrsStSocket; class SrsRtspConn; class SrsRtspStack; @@ -214,4 +212,3 @@ public: #endif -#endif diff --git a/trunk/src/app/srs_app_server.cpp b/trunk/src/app/srs_app_server.cpp index 36cb3e055..ab86a86e3 100644 --- a/trunk/src/app/srs_app_server.cpp +++ b/trunk/src/app/srs_app_server.cpp @@ -171,7 +171,6 @@ srs_error_t SrsBufferListener::on_tcp_client(srs_netfd_t stfd) return srs_success; } -#ifdef SRS_AUTO_STREAM_CASTER SrsRtspListener::SrsRtspListener(SrsServer* svr, SrsListenerType t, SrsConfDirective* c) : SrsListener(svr, t) { listener = NULL; @@ -281,7 +280,6 @@ srs_error_t SrsHttpFlvListener::on_tcp_client(srs_netfd_t stfd) return err; } -#endif SrsUdpStreamListener::SrsUdpStreamListener(SrsServer* svr, SrsListenerType t, ISrsUdpHandler* c) : SrsListener(svr, t) { @@ -323,7 +321,6 @@ srs_error_t SrsUdpStreamListener::listen(string i, int p) return err; } -#ifdef SRS_AUTO_STREAM_CASTER SrsUdpCasterListener::SrsUdpCasterListener(SrsServer* svr, SrsListenerType t, SrsConfDirective* c) : SrsUdpStreamListener(svr, t, NULL) { // the caller already ensure the type is ok, @@ -338,7 +335,6 @@ SrsUdpCasterListener::~SrsUdpCasterListener() { srs_freep(caster); } -#endif SrsSignalManager* SrsSignalManager::instance = NULL; @@ -1096,7 +1092,6 @@ srs_error_t SrsServer::listen_stream_caster() { srs_error_t err = srs_success; -#ifdef SRS_AUTO_STREAM_CASTER close_listeners(SrsListenerMpegTsOverUdp); std::vector::iterator it; @@ -1134,7 +1129,6 @@ srs_error_t SrsServer::listen_stream_caster() return srs_error_wrap(err, "listen at %d", port); } } -#endif return err; } diff --git a/trunk/src/app/srs_app_server.hpp b/trunk/src/app/srs_app_server.hpp index 283a3ad1c..4b3a74bff 100644 --- a/trunk/src/app/srs_app_server.hpp +++ b/trunk/src/app/srs_app_server.hpp @@ -49,9 +49,7 @@ class ISrsTcpHandler; class ISrsUdpHandler; class SrsUdpListener; class SrsTcpListener; -#ifdef SRS_AUTO_STREAM_CASTER class SrsAppCasterFlv; -#endif #ifdef SRS_AUTO_KAFKA class SrsKafkaProducer; #endif @@ -111,7 +109,6 @@ public: virtual srs_error_t on_tcp_client(srs_netfd_t stfd); }; -#ifdef SRS_AUTO_STREAM_CASTER /** * the tcp listener, for rtsp server. */ @@ -147,7 +144,6 @@ public: public: virtual srs_error_t on_tcp_client(srs_netfd_t stfd); }; -#endif /** * the udp listener, for udp server. @@ -167,14 +163,12 @@ public: /** * the udp listener, for udp stream caster server. */ -#ifdef SRS_AUTO_STREAM_CASTER class SrsUdpCasterListener : public SrsUdpStreamListener { public: SrsUdpCasterListener(SrsServer* svr, SrsListenerType t, SrsConfDirective* c); virtual ~SrsUdpCasterListener(); }; -#endif /** * convert signal to io, diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index a6570f188..aeb867f0f 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -235,7 +235,7 @@ void show_macro_features() // ff(ffmpeg) ss << ", ff:" << srs_bool2switch(SRS_AUTO_FFMPEG_TOOL_BOOL); // sc(stream-caster) - ss << ", sc:" << srs_bool2switch(SRS_AUTO_STREAM_CASTER_BOOL); + ss << ", sc:" << srs_bool2switch(true); srs_trace(ss.str().c_str()); } diff --git a/trunk/src/protocol/srs_rtsp_stack.cpp b/trunk/src/protocol/srs_rtsp_stack.cpp index ac0083d82..42354c26a 100644 --- a/trunk/src/protocol/srs_rtsp_stack.cpp +++ b/trunk/src/protocol/srs_rtsp_stack.cpp @@ -39,8 +39,6 @@ using namespace std; #include #include -#ifdef SRS_AUTO_STREAM_CASTER - #define SRS_RTSP_BUFFER 4096 // get the status text of code. @@ -1104,5 +1102,3 @@ srs_error_t SrsRtspStack::recv_token(std::string& token, SrsRtspTokenState& stat #endif -#endif - diff --git a/trunk/src/protocol/srs_rtsp_stack.hpp b/trunk/src/protocol/srs_rtsp_stack.hpp index 4e785a988..50c2a99a5 100644 --- a/trunk/src/protocol/srs_rtsp_stack.hpp +++ b/trunk/src/protocol/srs_rtsp_stack.hpp @@ -33,8 +33,6 @@ #include -#ifdef SRS_AUTO_STREAM_CASTER - class SrsBuffer; class SrsSimpleStream; class SrsAudioFrame; @@ -712,5 +710,3 @@ private: #endif -#endif -