diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 082995164..eb312f10f 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -670,6 +670,15 @@ string SrsConfDirective::arg2() return ""; } +string SrsConfDirective::arg3() +{ + if (args.size() > 3) { + return args.at(3); + } + + return ""; +} + SrsConfDirective* SrsConfDirective::at(int index) { srs_assert(index < (int)directives.size()); diff --git a/trunk/src/app/srs_app_config.hpp b/trunk/src/app/srs_app_config.hpp index eba92904a..2fa234ee4 100644 --- a/trunk/src/app/srs_app_config.hpp +++ b/trunk/src/app/srs_app_config.hpp @@ -155,20 +155,20 @@ class SrsConfDirective { public: /** - * the line of config file in which the directive from - */ + * the line of config file in which the directive from + */ int conf_line; /** - * the name of directive, for example, the following config text: - * enabled on; - * will be parsed to a directive, its name is "enalbed" - */ + * the name of directive, for example, the following config text: + * enabled on; + * will be parsed to a directive, its name is "enalbed" + */ std::string name; /** - * the args of directive, for example, the following config text: - * listen 1935 1936; - * will be parsed to a directive, its args is ["1935", "1936"]. - */ + * the args of directive, for example, the following config text: + * listen 1935 1936; + * will be parsed to a directive, its args is ["1935", "1936"]. + */ std::vector args; /** * the child directives, for example, the following config text: @@ -201,6 +201,7 @@ public: virtual std::string arg0(); virtual std::string arg1(); virtual std::string arg2(); + virtual std::string arg3(); // directives public: /**