mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Always enable SRS_TRANSCODE
This commit is contained in:
parent
59d8bb532b
commit
330100769f
9 changed files with 4 additions and 54 deletions
|
@ -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<SrsConfDirective*> ingesters = get_ingesters(vhost->arg0());
|
||||
for (int j = 0; j < (int)ingesters.size(); j++) {
|
||||
|
|
|
@ -34,8 +34,6 @@ using namespace std;
|
|||
#include <srs_app_ffmpeg.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
|
||||
// for encoder to detect the dead loop
|
||||
static std::vector<std::string> _transcoded_url;
|
||||
|
||||
|
@ -334,6 +332,3 @@ void SrsEncoder::show_encode_log_message()
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -72,5 +70,3 @@ private:
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue