mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Always enable SRS_StreamCaster
This commit is contained in:
parent
0d5c86853a
commit
2e9bf2af83
14 changed files with 3 additions and 64 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include <srs_app_caster_flv.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_STREAM_CASTER
|
||||
|
||||
#include <algorithm>
|
||||
using namespace std;
|
||||
|
||||
|
@ -324,4 +322,3 @@ srs_error_t SrsHttpFileReader::lseek(off_t offset, int whence, off_t* seeked)
|
|||
return srs_success;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifdef SRS_AUTO_STREAM_CASTER
|
||||
|
||||
class SrsConfDirective;
|
||||
class SrsHttpServeMux;
|
||||
class SrsRtmpClient;
|
||||
|
@ -126,4 +124,3 @@ public:
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include <srs_app_mpegts_udp.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_STREAM_CASTER
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
@ -639,4 +637,3 @@ void SrsMpegtsOverUdp::close()
|
|||
srs_freep(sdk);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_STREAM_CASTER
|
||||
|
||||
struct sockaddr;
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
@ -123,4 +121,3 @@ private:
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -46,8 +46,6 @@ using namespace std;
|
|||
#include <srs_protocol_utility.hpp>
|
||||
#include <srs_protocol_format.hpp>
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
#include <srs_app_thread.hpp>
|
||||
#include <srs_app_listener.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_STREAM_CASTER
|
||||
|
||||
class SrsStSocket;
|
||||
class SrsRtspConn;
|
||||
class SrsRtspStack;
|
||||
|
@ -214,4 +212,3 @@ public:
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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<SrsConfDirective*>::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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ using namespace std;
|
|||
#include <srs_kernel_buffer.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
|
||||
#include <srs_kernel_consts.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_STREAM_CASTER
|
||||
|
||||
class SrsBuffer;
|
||||
class SrsSimpleStream;
|
||||
class SrsAudioFrame;
|
||||
|
@ -712,5 +710,3 @@ private:
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue