diff --git a/trunk/configure b/trunk/configure index b1405134d..5259b8f8b 100755 --- a/trunk/configure +++ b/trunk/configure @@ -422,7 +422,8 @@ MODULE_ID="KERNEL" MODULE_DEPENDS=("CORE") ModuleLibIncs=(${SRS_OBJS}) MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_stream" "srs_kernel_buffer" - "srs_kernel_utility" "srs_kernel_flv" "srs_kernel_codec" "srs_kernel_file") + "srs_kernel_utility" "srs_kernel_flv" "srs_kernel_codec" "srs_kernel_file" + "srs_kernel_consts") KERNEL_INCS="src/kernel"; MODULE_DIR=${KERNEL_INCS} . auto/modules.sh KERNEL_OBJS="${MODULE_OBJS[@]}" # @@ -488,7 +489,7 @@ fi # # utest, the unit-test cases of srs, base on gtest1.6 MODULE_FILES=("srs_utest" "srs_utest_amf0" "srs_utest_protocol" - "srs_utest_kernel" "srs_utest_core") + "srs_utest_kernel" "srs_utest_core" "srs_utest_config") ModuleLibIncs=(${SRS_OBJS} ${LibSTRoot}) ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile}) MODULE_DEPENDS=("CORE" "KERNEL" "RTMP" "APP") diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 03fbbb756..d8cd77069 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -1143,8 +1143,8 @@ void SrsConfig::print_help(char** argv) "\n" "For example:\n" " %s -v\n" - " %s -t -c "SRS_DEFAULT_CONF"\n" - " %s -c "SRS_DEFAULT_CONF"\n", + " %s -t -c "SRS_CONF_DEFAULT_COFNIG_FILE"\n" + " %s -c "SRS_CONF_DEFAULT_COFNIG_FILE"\n", argv[0], argv[0], argv[0], argv[0]); } @@ -1968,12 +1968,12 @@ bool SrsConfig::get_engine_enabled(SrsConfDirective* engine) string SrsConfig::get_engine_iformat(SrsConfDirective* engine) { if (!engine) { - return "flv"; + return SRS_CONF_DEFAULT_TRANSCODE_IFORMAT; } SrsConfDirective* conf = engine->get("iformat"); if (!conf) { - return "flv"; + return SRS_CONF_DEFAULT_TRANSCODE_IFORMAT; } return conf->arg0(); @@ -2228,12 +2228,12 @@ vector SrsConfig::get_engine_aparams(SrsConfDirective* engine) string SrsConfig::get_engine_oformat(SrsConfDirective* engine) { if (!engine) { - return "flv"; + return SRS_CONF_DEFAULT_TRANSCODE_OFORMAT; } SrsConfDirective* conf = engine->get("oformat"); if (!conf) { - return "flv"; + return SRS_CONF_DEFAULT_TRANSCODE_OFORMAT; } return conf->arg0(); @@ -2346,7 +2346,7 @@ string SrsConfig::get_log_file() SrsConfDirective* conf = root->get("srs_log_file"); if (!conf || conf->arg0().empty()) { - return "./objs/srs.log"; + return SRS_CONF_DEFAULT_LOG_FILE; } return conf->arg0(); @@ -2355,7 +2355,7 @@ string SrsConfig::get_log_file() bool SrsConfig::get_ffmpeg_log_enabled() { string log = get_ffmpeg_log_dir(); - return log != "/dev/null"; + return log != SRS_CONSTS_NULL_FILE; } string SrsConfig::get_ffmpeg_log_dir() @@ -2364,7 +2364,7 @@ string SrsConfig::get_ffmpeg_log_dir() SrsConfDirective* conf = root->get("ff_log_dir"); if (!conf || conf->arg0().empty()) { - return "./objs"; + return SRS_CONF_DEFAULT_FF_LOG_DIR; } return conf->arg0(); @@ -2376,7 +2376,7 @@ string SrsConfig::get_log_level() SrsConfDirective* conf = root->get("srs_log_level"); if (!conf || conf->arg0().empty()) { - return "trace"; + return SRS_CONF_DEFAULT_LOG_LEVEL; } return conf->arg0(); @@ -2387,7 +2387,7 @@ bool SrsConfig::get_log_tank_file() srs_assert(root); SrsConfDirective* conf = root->get("srs_log_tank"); - if (conf && conf->arg0() == "console") { + if (conf && conf->arg0() == SRS_CONF_DEFAULT_LOG_TANK_CONSOLE) { return false; } diff --git a/trunk/src/app/srs_app_config.hpp b/trunk/src/app/srs_app_config.hpp index 461be847b..979fb440c 100644 --- a/trunk/src/app/srs_app_config.hpp +++ b/trunk/src/app/srs_app_config.hpp @@ -34,9 +34,21 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include -#define SRS_LOCALHOST "127.0.0.1" +/////////////////////////////////////////////////////////// +// the value consts +/////////////////////////////////////////////////////////// +#define SRS_CONSTS_NULL_FILE "/dev/null" +#define SRS_CONSTS_LOCALHOST "127.0.0.1" + +/////////////////////////////////////////////////////////// +// default consts values +/////////////////////////////////////////////////////////// #define SRS_CONF_DEFAULT_PID_FILE "./objs/srs.pid" -#define SRS_DEFAULT_CONF "conf/srs.conf" +#define SRS_CONF_DEFAULT_LOG_FILE "./objs/srs.log" +#define SRS_CONF_DEFAULT_LOG_LEVEL "trace" +#define SRS_CONF_DEFAULT_LOG_TANK_CONSOLE "console" +#define SRS_CONF_DEFAULT_COFNIG_FILE "conf/srs.conf" +#define SRS_CONF_DEFAULT_FF_LOG_DIR "./objs" #define SRS_CONF_DEFAULT_MAX_CONNECTIONS 12345 #define SRS_CONF_DEFAULT_HLS_PATH "./objs/nginx/html" @@ -67,7 +79,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define SRS_CONF_DEFAULT_HTTP_HEAETBEAT_ENABLED false #define SRS_CONF_DEFAULT_HTTP_HEAETBEAT_INTERVAL 9.9 -#define SRS_CONF_DEFAULT_HTTP_HEAETBEAT_URL "http://127.0.0.1:8085/api/v1/servers" +#define SRS_CONF_DEFAULT_HTTP_HEAETBEAT_URL "http://"SRS_CONSTS_LOCALHOST":8085/api/v1/servers" #define SRS_CONF_DEFAULT_HTTP_HEAETBEAT_INDEX 0 #define SRS_CONF_DEFAULT_HTTP_HEAETBEAT_SUMMARIES false @@ -82,6 +94,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define SRS_AUTO_INGEST_TYPE_FILE "file" #define SRS_AUTO_INGEST_TYPE_STREAM "stream" +#define SRS_CONF_DEFAULT_TRANSCODE_IFORMAT "flv" +#define SRS_CONF_DEFAULT_TRANSCODE_OFORMAT "flv" + namespace _srs_internal { class SrsConfigBuffer; @@ -687,7 +702,7 @@ public: */ virtual std::string get_engine_oformat(SrsConfDirective* engine); /** - * get the output of engine, for example, rtmp://127.0.0.1/live/livestream, + * get the output of engine, for example, rtmp://localhost/live/livestream, * @remark, we will use some variable, for instance, [vhost] to substitude with vhost. */ virtual std::string get_engine_output(SrsConfDirective* engine); diff --git a/trunk/src/app/srs_app_encoder.cpp b/trunk/src/app/srs_app_encoder.cpp index 7393f0f59..8b30140bf 100644 --- a/trunk/src/app/srs_app_encoder.cpp +++ b/trunk/src/app/srs_app_encoder.cpp @@ -261,8 +261,10 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir std::string input; // input stream, from local. - // ie. rtmp://127.0.0.1:1935/live/livestream - input = "rtmp://127.0.0.1:"; + // ie. rtmp://localhost:1935/live/livestream + input = "rtmp://"; + input += SRS_CONSTS_LOCALHOST; + input += ":"; input += req->port; input += "/"; input += req->app; @@ -280,14 +282,14 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir std::string output = _srs_config->get_engine_output(engine); // output stream, to other/self server - // ie. rtmp://127.0.0.1:1935/live/livestream_sd + // ie. rtmp://localhost:1935/live/livestream_sd output = srs_string_replace(output, "[vhost]", req->vhost); output = srs_string_replace(output, "[port]", req->port); output = srs_string_replace(output, "[app]", req->app); output = srs_string_replace(output, "[stream]", req->stream); output = srs_string_replace(output, "[engine]", engine->arg0()); - std::string log_file = "/dev/null"; // disabled + std::string log_file = SRS_CONSTS_NULL_FILE; // disabled // write ffmpeg info to log file. if (_srs_config->get_ffmpeg_log_enabled()) { log_file = _srs_config->get_ffmpeg_log_dir(); diff --git a/trunk/src/app/srs_app_forward.cpp b/trunk/src/app/srs_app_forward.cpp index 7e80f1710..562c9c6dd 100644 --- a/trunk/src/app/srs_app_forward.cpp +++ b/trunk/src/app/srs_app_forward.cpp @@ -111,7 +111,7 @@ int SrsForwarder::on_publish(SrsRequest* req, std::string forward_server) source_ep += req->vhost; std::string dest_ep = "rtmp://"; - if (forward_server == "127.0.0.1") { + if (forward_server == SRS_CONSTS_LOCALHOST) { dest_ep += req->host; } else { dest_ep += forward_server; diff --git a/trunk/src/app/srs_app_ingest.cpp b/trunk/src/app/srs_app_ingest.cpp index dcfe0fe8a..ddb02b3fc 100644 --- a/trunk/src/app/srs_app_ingest.cpp +++ b/trunk/src/app/srs_app_ingest.cpp @@ -235,7 +235,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S std::string output = _srs_config->get_engine_output(engine); // output stream, to other/self server - // ie. rtmp://127.0.0.1:1935/live/livestream_sd + // ie. rtmp://localhost:1935/live/livestream_sd output = srs_string_replace(output, "[vhost]", vhost->arg0()); output = srs_string_replace(output, "[port]", port); if (output.empty()) { @@ -260,7 +260,7 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S app = app.substr(0, pos); } - std::string log_file = "/dev/null"; // disabled + std::string log_file = SRS_CONSTS_NULL_FILE; // disabled // write ffmpeg info to log file. if (_srs_config->get_ffmpeg_log_enabled()) { log_file = _srs_config->get_ffmpeg_log_dir(); diff --git a/trunk/src/app/srs_app_utility.cpp b/trunk/src/app/srs_app_utility.cpp index 9ad8e0106..c0bb40f5f 100644 --- a/trunk/src/app/srs_app_utility.cpp +++ b/trunk/src/app/srs_app_utility.cpp @@ -37,8 +37,6 @@ using namespace std; #include #include -#define SRS_LOCAL_LOOP_IP "127.0.0.1" - int srs_socket_connect(std::string server, int port, int64_t timeout, st_netfd_t* pstfd) { int ret = ERROR_SUCCESS; @@ -707,7 +705,7 @@ void retrieve_local_ipv4_ips() } std::string ip = buf; - if (ip != SRS_LOCAL_LOOP_IP) { + if (ip != SRS_CONSTS_LOCALHOST) { srs_trace("retrieve local ipv4 addresses: %s", ip.c_str()); ips.push_back(ip); } diff --git a/trunk/src/kernel/srs_kernel_consts.cpp b/trunk/src/kernel/srs_kernel_consts.cpp new file mode 100644 index 000000000..6f5a6d915 --- /dev/null +++ b/trunk/src/kernel/srs_kernel_consts.cpp @@ -0,0 +1,25 @@ +/* +The MIT License (MIT) + +Copyright (c) 2013-2014 winlin + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + diff --git a/trunk/src/kernel/srs_kernel_consts.hpp b/trunk/src/kernel/srs_kernel_consts.hpp new file mode 100644 index 000000000..fbd0af96d --- /dev/null +++ b/trunk/src/kernel/srs_kernel_consts.hpp @@ -0,0 +1,33 @@ +/* +The MIT License (MIT) + +Copyright (c) 2013-2014 winlin + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SRS_KERNEL_CONSTS_HPP +#define SRS_KERNEL_CONSTS_HPP + +/* +#include +*/ + +#include + +#endif diff --git a/trunk/src/libs/srs_librtmp.hpp b/trunk/src/libs/srs_librtmp.hpp index 35186cd1d..90ae7612a 100644 --- a/trunk/src/libs/srs_librtmp.hpp +++ b/trunk/src/libs/srs_librtmp.hpp @@ -48,14 +48,14 @@ typedef void* srs_rtmp_t; /** * create/destroy a rtmp protocol stack. * @url rtmp url, for example: -* rtmp://127.0.0.1/live/livestream +* rtmp://localhost/live/livestream * @return a rtmp handler, or NULL if error occured. */ srs_rtmp_t srs_rtmp_create(const char* url); /** * create rtmp with url, used for connection specified application. * @param url the tcUrl, for exmple: -* rtmp://127.0.0.1/live +* rtmp://localhost/live * @remark this is used to create application connection-oriented, * for example, the bandwidth client used this, no stream specified. */ diff --git a/trunk/src/srs/srs.upp b/trunk/src/srs/srs.upp index 4584de8e8..5b9d66dc9 100755 --- a/trunk/src/srs/srs.upp +++ b/trunk/src/srs/srs.upp @@ -20,6 +20,8 @@ file ..\kernel\srs_kernel_buffer.cpp, ..\kernel\srs_kernel_codec.hpp, ..\kernel\srs_kernel_codec.cpp, + ..\kernel\srs_kernel_consts.hpp, + ..\kernel\srs_kernel_consts.cpp, ..\kernel\srs_kernel_error.hpp, ..\kernel\srs_kernel_error.cpp, ..\kernel\srs_kernel_file.hpp, @@ -115,6 +117,8 @@ file ..\utest\srs_utest.cpp, ..\utest\srs_utest_amf0.hpp, ..\utest\srs_utest_amf0.cpp, + ..\utest\srs_utest_config.hpp, + ..\utest\srs_utest_config.cpp, ..\utest\srs_utest_core.hpp, ..\utest\srs_utest_core.cpp, ..\utest\srs_utest_kernel.hpp, diff --git a/trunk/src/utest/srs_utest_config.cpp b/trunk/src/utest/srs_utest_config.cpp new file mode 100644 index 000000000..28f66af5d --- /dev/null +++ b/trunk/src/utest/srs_utest_config.cpp @@ -0,0 +1,196 @@ +/* +The MIT License (MIT) + +Copyright (c) 2013-2014 winlin + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +#include + +using namespace std; + +#include + +VOID TEST(ConfigTest, CheckMacros) +{ +#ifndef SRS_CONSTS_LOCALHOST + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_PID_FILE + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_COFNIG_FILE + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_MAX_CONNECTIONS + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HLS_PATH + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HLS_FRAGMENT + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HLS_WINDOW + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_DVR_PATH + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_DVR_PLAN_SESSION + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_DVR_PLAN_SEGMENT + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_DVR_PLAN_HSS + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_DVR_PLAN + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_DVR_DURATION + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_TIME_JITTER + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_QUEUE_LENGTH + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_PAUSED_LENGTH + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_BANDWIDTH_LIMIT_KBPS + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_MOUNT + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_DIR + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_STREAM_PORT + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_API_PORT + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_HEAETBEAT_ENABLED + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_HEAETBEAT_INTERVAL + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_HEAETBEAT_URL + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_HEAETBEAT_INDEX + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_HTTP_HEAETBEAT_SUMMARIES + EXPECT_TRUE(false); +#endif +#ifndef SRS_STAGE_PLAY_USER_INTERVAL_MS + EXPECT_TRUE(false); +#endif +#ifndef SRS_STAGE_PUBLISH_USER_INTERVAL_MS + EXPECT_TRUE(false); +#endif +#ifndef SRS_STAGE_FORWARDER_INTERVAL_MS + EXPECT_TRUE(false); +#endif +#ifndef SRS_STAGE_ENCODER_INTERVAL_MS + EXPECT_TRUE(false); +#endif +#ifndef SRS_STAGE_INGESTER_INTERVAL_MS + EXPECT_TRUE(false); +#endif +#ifndef SRS_STAGE_HLS_INTERVAL_MS + EXPECT_TRUE(false); +#endif +#ifndef SRS_STAGE_EDGE_INTERVAL_MS + EXPECT_TRUE(false); +#endif +#ifndef SRS_AUTO_INGEST_TYPE_FILE + EXPECT_TRUE(false); +#endif +#ifndef SRS_AUTO_INGEST_TYPE_STREAM + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_TRANSCODE_IFORMAT + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_TRANSCODE_OFORMAT + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_LOG_FILE + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONSTS_NULL_FILE + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_FF_LOG_DIR + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_LOG_LEVEL + EXPECT_TRUE(false); +#endif +#ifndef SRS_CONF_DEFAULT_LOG_TANK_CONSOLE + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +#ifndef xxxxxxxxxxxxxxxxxxxxxxxx + EXPECT_TRUE(false); +#endif +} diff --git a/trunk/src/utest/srs_utest_config.hpp b/trunk/src/utest/srs_utest_config.hpp new file mode 100644 index 000000000..7445f8bb3 --- /dev/null +++ b/trunk/src/utest/srs_utest_config.hpp @@ -0,0 +1,34 @@ +/* +The MIT License (MIT) + +Copyright (c) 2013-2014 winlin + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SRS_UTEST_CONFIG_HPP +#define SRS_UTEST_CONFIG_HPP + +/* +#include +*/ +#include + +#include + +#endif