mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
bravo auto atc per stream. 0.9.84
This commit is contained in:
parent
f02ac02a50
commit
6ee49ee029
4 changed files with 1 additions and 28 deletions
|
@ -2656,29 +2656,6 @@ string SrsConfig::get_vhost_http_dir(string vhost)
|
||||||
return conf->arg0();
|
return conf->arg0();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SrsConfig::set_atc(std::string vhost, bool atc)
|
|
||||||
{
|
|
||||||
SrsConfDirective* conf = get_vhost(vhost);
|
|
||||||
if (!conf) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// create if not exists
|
|
||||||
if (conf->get("atc") == NULL) {
|
|
||||||
SrsConfDirective* o = new SrsConfDirective();
|
|
||||||
o->name = "atc";
|
|
||||||
conf->directives.push_back(o);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the atc node
|
|
||||||
conf = conf->get("atc");
|
|
||||||
srs_assert(conf);
|
|
||||||
|
|
||||||
// refresh
|
|
||||||
conf->directives.clear();
|
|
||||||
conf->args.push_back((atc? "true":"false"));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool srs_directive_equals(SrsConfDirective* a, SrsConfDirective* b)
|
bool srs_directive_equals(SrsConfDirective* a, SrsConfDirective* b)
|
||||||
{
|
{
|
||||||
// both NULL, equal.
|
// both NULL, equal.
|
||||||
|
|
|
@ -269,9 +269,6 @@ public:
|
||||||
virtual bool get_vhost_http_enabled(std::string vhost);
|
virtual bool get_vhost_http_enabled(std::string vhost);
|
||||||
virtual std::string get_vhost_http_mount(std::string vhost);
|
virtual std::string get_vhost_http_mount(std::string vhost);
|
||||||
virtual std::string get_vhost_http_dir(std::string vhost);
|
virtual std::string get_vhost_http_dir(std::string vhost);
|
||||||
// setter in memory
|
|
||||||
public:
|
|
||||||
virtual void set_atc(std::string vhost, bool atc);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -826,7 +826,6 @@ int SrsSource::on_meta_data(SrsMessage* msg, SrsOnMetaDataPacket* metadata)
|
||||||
if ((prop = metadata->metadata->get_property("bravo_atc")) != NULL) {
|
if ((prop = metadata->metadata->get_property("bravo_atc")) != NULL) {
|
||||||
if (prop->is_string() && prop->to_str() == "true") {
|
if (prop->is_string() && prop->to_str() == "true") {
|
||||||
atc = true;
|
atc = true;
|
||||||
_srs_config->set_atc(_req->vhost, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR "0"
|
#define VERSION_MAJOR "0"
|
||||||
#define VERSION_MINOR "9"
|
#define VERSION_MINOR "9"
|
||||||
#define VERSION_REVISION "83"
|
#define VERSION_REVISION "84"
|
||||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "srs"
|
#define RTMP_SIG_SRS_KEY "srs"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue