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

Always enable SRS_Ingest

This commit is contained in:
winlin 2018-12-22 20:30:13 +08:00
parent c6844527fb
commit aa1a5442f9
9 changed files with 3 additions and 130 deletions

View file

@ -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

View file

@ -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

View file

@ -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<SrsConfDirective*> 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.
}

View file

@ -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));

View file

@ -23,8 +23,6 @@
#include <srs_app_ingest.hpp>
#ifdef SRS_AUTO_INGEST
#include <stdlib.h>
using namespace std;
@ -570,5 +568,3 @@ srs_error_t SrsIngester::on_reload_listen()
return srs_success;
}
#endif

View file

@ -26,8 +26,6 @@
#include <srs_core.hpp>
#ifdef SRS_AUTO_INGEST
#include <vector>
#include <srs_app_thread.hpp>
@ -115,5 +113,4 @@ public:
};
#endif
#endif

View file

@ -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;
}

View file

@ -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:
/**

View file

@ -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);