diff --git a/trunk/conf/forward.master.conf b/trunk/conf/forward.master.conf index 2c88282e5..ca4a72160 100644 --- a/trunk/conf/forward.master.conf +++ b/trunk/conf/forward.master.conf @@ -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; } diff --git a/trunk/conf/forward.slave.conf b/trunk/conf/forward.slave.conf index 6ccc9a159..5d010d81e 100644 --- a/trunk/conf/forward.slave.conf +++ b/trunk/conf/forward.slave.conf @@ -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__ { } diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index db93554e0..15e976e88 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -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; } } diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 8c11b0bc8..c4ae22820 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -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); diff --git a/trunk/src/app/srs_app_config.hpp b/trunk/src/app/srs_app_config.hpp index 187ec7ab9..9742a4f94 100644 --- a/trunk/src/app/srs_app_config.hpp +++ b/trunk/src/app/srs_app_config.hpp @@ -147,16 +147,18 @@ public: virtual int get_engine_achannels(SrsConfDirective* engine); virtual void get_engine_aparams(SrsConfDirective* engine, std::vector& 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); diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 4bf200b68..8a9325411 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -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"