mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add http callback in config
This commit is contained in:
parent
d3cee00b3b
commit
3600be9796
2 changed files with 20 additions and 0 deletions
|
@ -475,6 +475,8 @@ int SrsConfig::reload()
|
|||
srs_trace("reload pithy_print success.");
|
||||
}
|
||||
|
||||
// TODO: suppor reload hls/forward/ffmpeg/http
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -557,6 +559,22 @@ SrsConfDirective* SrsConfig::get_vhost(std::string vhost)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
std::string SrsConfig::get_vhost_on_connect(std::string vhost)
|
||||
{
|
||||
SrsConfDirective* vhost_conf = get_vhost(vhost);
|
||||
|
||||
if (!vhost_conf) {
|
||||
return "";
|
||||
}
|
||||
|
||||
SrsConfDirective* conf = vhost_conf->get("on_connect");
|
||||
if (!conf) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return conf->arg0();
|
||||
}
|
||||
|
||||
bool SrsConfig::get_vhost_enabled(std::string vhost)
|
||||
{
|
||||
SrsConfDirective* vhost_conf = get_vhost(vhost);
|
||||
|
@ -1128,6 +1146,7 @@ int SrsConfig::parse_file(const char* filename)
|
|||
// TODO: check hls.
|
||||
// TODO: check ssl.
|
||||
// TODO: check ffmpeg.
|
||||
// TODO: check http.
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ public:
|
|||
public:
|
||||
virtual SrsConfDirective* get_vhost(std::string vhost);
|
||||
virtual bool get_vhost_enabled(std::string vhost);
|
||||
virtual std::string get_vhost_on_connect(std::string vhost);
|
||||
virtual SrsConfDirective* get_transcode(std::string vhost, std::string scope);
|
||||
virtual bool get_transcode_enabled(SrsConfDirective* transcode);
|
||||
virtual std::string get_transcode_ffmpeg(SrsConfDirective* transcode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue