winlin

fix forward conf file bug, change pid file. change to 0.9.48

... ... @@ -3,6 +3,9 @@
# @see full.conf for detail config.
listen 1935;
pid ./objs/srs.master.pid;
srs_log_tank file;
srs_log_file ./objs/srs.master.log;
vhost __defaultVhost__ {
forward 127.0.0.1:19350;
}
... ...
... ... @@ -3,5 +3,8 @@
# @see full.conf for detail config.
listen 19350;
pid ./objs/srs.slave.pid;
srs_log_tank file;
srs_log_file ./objs/srs.slave.log;
vhost __defaultVhost__ {
}
... ...
... ... @@ -89,6 +89,7 @@ vhost __defaultVhost__ {
gop_cache on;
http {
enabled on;
mount /;
dir ./objs/nginx/html;
}
}
... ... @@ -100,9 +101,11 @@ vhost http.srs.com {
# whether enable the http streaming service for vhost.
# default: off
enabled on;
# the virtual directory root for this vhost to mount at
# for example, if mount to /hls, user access by http://server/hls
mount /hls;
# main dir of vhost,
# to delivery HTTP stream of this vhost.
# default: ./objs/nginx/html;
dir ./objs/nginx/html;
}
}
... ...
... ... @@ -1266,54 +1266,6 @@ string SrsConfig::get_engine_output(SrsConfDirective* engine)
return conf->arg0();
}
string SrsConfig::get_ffmpeg_log_dir()
{
srs_assert(root);
SrsConfDirective* conf = root->get("ff_log_dir");
if (!conf || conf->arg0().empty()) {
return "./objs/logs";
}
return conf->arg0();
}
string SrsConfig::get_srs_log_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_file");
if (!conf || conf->arg0().empty()) {
return "./objs/srs.log";
}
return conf->arg0();
}
string SrsConfig::get_srs_log_level()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_level");
if (!conf || conf->arg0().empty()) {
return "trace";
}
return conf->arg0();
}
bool SrsConfig::get_srs_log_tank_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_tank");
if (conf && conf->arg0() == "console") {
return false;
}
return true;
}
bool SrsConfig::get_deamon()
{
srs_assert(root);
... ... @@ -1397,6 +1349,54 @@ SrsConfDirective* SrsConfig::get_forward(string vhost)
return conf->get("forward");
}
string SrsConfig::get_srs_log_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_file");
if (!conf || conf->arg0().empty()) {
return "./objs/srs.log";
}
return conf->arg0();
}
string SrsConfig::get_ffmpeg_log_dir()
{
srs_assert(root);
SrsConfDirective* conf = root->get("ff_log_dir");
if (!conf || conf->arg0().empty()) {
return "./objs/logs";
}
return conf->arg0();
}
string SrsConfig::get_srs_log_level()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_level");
if (!conf || conf->arg0().empty()) {
return "trace";
}
return conf->arg0();
}
bool SrsConfig::get_srs_log_tank_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_tank");
if (conf && conf->arg0() == "console") {
return false;
}
return true;
}
SrsConfDirective* SrsConfig::get_hls(string vhost)
{
SrsConfDirective* conf = get_vhost(vhost);
... ...
... ... @@ -147,16 +147,18 @@ public:
virtual int get_engine_achannels(SrsConfDirective* engine);
virtual void get_engine_aparams(SrsConfDirective* engine, std::vector<std::string>& aparams);
virtual std::string get_engine_output(SrsConfDirective* engine);
virtual std::string get_ffmpeg_log_dir();
virtual bool get_srs_log_tank_file();
virtual std::string get_srs_log_level();
virtual std::string get_srs_log_file();
virtual bool get_deamon();
virtual int get_max_connections();
virtual bool get_gop_cache(std::string vhost);
virtual bool get_atc(std::string vhost);
virtual double get_queue_length(std::string vhost);
virtual SrsConfDirective* get_forward(std::string vhost);
// log section
public:
virtual bool get_srs_log_tank_file();
virtual std::string get_srs_log_level();
virtual std::string get_srs_log_file();
virtual std::string get_ffmpeg_log_dir();
// hls section
private:
virtual SrsConfDirective* get_hls(std::string vhost);
... ...
... ... @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "47"
#define VERSION_REVISION "48"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "srs"
... ...