正在显示
14 个修改的文件
包含
148 行增加
和
79 行删除
| @@ -183,6 +183,20 @@ System Architecture: | @@ -183,6 +183,20 @@ System Architecture: | ||
| 183 | | All Linux(RHEL,CentOS,Ubuntu,Fedora...) | | 183 | | All Linux(RHEL,CentOS,Ubuntu,Fedora...) | |
| 184 | +------------------------------------------------------+ | 184 | +------------------------------------------------------+ |
| 185 | </pre> | 185 | </pre> |
| 186 | +Modularity Architecture: | ||
| 187 | +<pre> | ||
| 188 | ++------------------------------------------------------+ | ||
| 189 | +| Main(srs/bandwidth/librtmp) | | ||
| 190 | ++------------------------------------------------------+ | ||
| 191 | +| App(Server/Client application) | | ||
| 192 | ++------------------------------------------------------+ | ||
| 193 | +| RTMP(Protocol stack) | | ||
| 194 | ++------------------------------------------------------+ | ||
| 195 | +| Kernel(depends on Core, provides error/log) | | ||
| 196 | ++------------------------------------------------------+ | ||
| 197 | +| Core(depends only on system apis) | | ||
| 198 | ++------------------------------------------------------+ | ||
| 199 | +</pre> | ||
| 186 | Stream Architecture: | 200 | Stream Architecture: |
| 187 | <pre> | 201 | <pre> |
| 188 | +---------+ +----------+ | 202 | +---------+ +----------+ |
| @@ -133,8 +133,8 @@ CORE_OBJS="${MODULE_OBJS[@]}" | @@ -133,8 +133,8 @@ CORE_OBJS="${MODULE_OBJS[@]}" | ||
| 133 | MODULE_ID="KERNEL" | 133 | MODULE_ID="KERNEL" |
| 134 | MODULE_DEPENDS=("CORE") | 134 | MODULE_DEPENDS=("CORE") |
| 135 | ModuleLibIncs=(${SRS_OBJS}) | 135 | ModuleLibIncs=(${SRS_OBJS}) |
| 136 | -MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_reload" "srs_kernel_config" | ||
| 137 | - "srs_kernel_stream" "srs_kernel_buffer" "srs_kernel_pithy_print") | 136 | +MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_reload" "srs_kernel_stream" |
| 137 | + "srs_kernel_buffer") | ||
| 138 | MODULE_DIR="src/kernel" . auto/modules.sh | 138 | MODULE_DIR="src/kernel" . auto/modules.sh |
| 139 | KERNEL_OBJS="${MODULE_OBJS[@]}" | 139 | KERNEL_OBJS="${MODULE_OBJS[@]}" |
| 140 | # | 140 | # |
| @@ -143,7 +143,7 @@ MODULE_ID="RTMP" | @@ -143,7 +143,7 @@ MODULE_ID="RTMP" | ||
| 143 | MODULE_DEPENDS=("CORE" "KERNEL") | 143 | MODULE_DEPENDS=("CORE" "KERNEL") |
| 144 | ModuleLibIncs=(${SRS_OBJS} ${LibSSLRoot}) | 144 | ModuleLibIncs=(${SRS_OBJS} ${LibSSLRoot}) |
| 145 | MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_protocol_rtmp_stack" "srs_protocol_rtmp" | 145 | MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_protocol_rtmp_stack" "srs_protocol_rtmp" |
| 146 | - "srs_protocol_handshake") | 146 | + "srs_protocol_handshake" "srs_protocol_utility") |
| 147 | MODULE_DIR="src/rtmp" . auto/modules.sh | 147 | MODULE_DIR="src/rtmp" . auto/modules.sh |
| 148 | RTMP_OBJS="${MODULE_OBJS[@]}" | 148 | RTMP_OBJS="${MODULE_OBJS[@]}" |
| 149 | # | 149 | # |
| @@ -151,14 +151,10 @@ RTMP_OBJS="${MODULE_OBJS[@]}" | @@ -151,14 +151,10 @@ RTMP_OBJS="${MODULE_OBJS[@]}" | ||
| 151 | MODULE_ID="APP" | 151 | MODULE_ID="APP" |
| 152 | MODULE_DEPENDS=("CORE" "KERNEL" "RTMP") | 152 | MODULE_DEPENDS=("CORE" "KERNEL" "RTMP") |
| 153 | ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${SRS_OBJS}) | 153 | ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${SRS_OBJS}) |
| 154 | -MODULE_FILES=("srs_core_server" | ||
| 155 | - "srs_core_conn" "srs_core_client" | ||
| 156 | - "srs_core_socket" | ||
| 157 | - "srs_core_source" "srs_core_codec" | ||
| 158 | - "srs_core_refer" | ||
| 159 | - "srs_core_hls" "srs_core_forward" "srs_core_encoder" | ||
| 160 | - "srs_core_http" "srs_core_thread" "srs_core_bandwidth" | ||
| 161 | - "srs_core_st" "srs_core_log_context") | 154 | +MODULE_FILES=("srs_core_server" "srs_core_conn" "srs_core_client" "srs_core_socket" "srs_core_source" |
| 155 | + "srs_core_codec" "srs_core_refer" "srs_core_hls" "srs_core_forward" "srs_core_encoder" | ||
| 156 | + "srs_core_http" "srs_core_thread" "srs_core_bandwidth" "srs_core_st" "srs_core_log_context" | ||
| 157 | + "srs_kernel_config" "srs_kernel_pithy_print") | ||
| 162 | MODULE_DIR="src/app" . auto/modules.sh | 158 | MODULE_DIR="src/app" . auto/modules.sh |
| 163 | APP_OBJS="${MODULE_OBJS[@]}" | 159 | APP_OBJS="${MODULE_OBJS[@]}" |
| 164 | # | 160 | # |
| @@ -103,6 +103,24 @@ int SrsClient::do_cycle() | @@ -103,6 +103,24 @@ int SrsClient::do_cycle() | ||
| 103 | } | 103 | } |
| 104 | srs_verbose("rtmp connect app success"); | 104 | srs_verbose("rtmp connect app success"); |
| 105 | 105 | ||
| 106 | + // discovery vhost, resolve the vhost from config | ||
| 107 | + SrsConfDirective* parsed_vhost = config->get_vhost(req->vhost); | ||
| 108 | + if (parsed_vhost) { | ||
| 109 | + req->vhost = parsed_vhost->arg0(); | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + srs_info("discovery app success. schema=%s, vhost=%s, port=%s, app=%s", | ||
| 113 | + req->schema.c_str(), req->vhost.c_str(), req->port.c_str(), req->app.c_str()); | ||
| 114 | + | ||
| 115 | + if (req->schema.empty() || req->vhost.empty() || req->port.empty() || req->app.empty()) { | ||
| 116 | + ret = ERROR_RTMP_REQ_TCURL; | ||
| 117 | + srs_error("discovery tcUrl failed. " | ||
| 118 | + "tcUrl=%s, schema=%s, vhost=%s, port=%s, app=%s, ret=%d", | ||
| 119 | + req->tcUrl.c_str(), req->schema.c_str(), req->vhost.c_str(), req->port.c_str(), req->app.c_str(), ret); | ||
| 120 | + return ret; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + // check vhost | ||
| 106 | if ((ret = check_vhost()) != ERROR_SUCCESS) { | 124 | if ((ret = check_vhost()) != ERROR_SUCCESS) { |
| 107 | srs_error("check vhost failed. ret=%d", ret); | 125 | srs_error("check vhost failed. ret=%d", ret); |
| 108 | return ret; | 126 | return ret; |
| @@ -28,16 +28,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -28,16 +28,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 28 | #include <netinet/in.h> | 28 | #include <netinet/in.h> |
| 29 | #include <arpa/inet.h> | 29 | #include <arpa/inet.h> |
| 30 | 30 | ||
| 31 | +#include <srs_core_source.hpp> | ||
| 32 | +#include <srs_core_autofree.hpp> | ||
| 33 | +#include <srs_core_socket.hpp> | ||
| 31 | #include <srs_kernel_error.hpp> | 34 | #include <srs_kernel_error.hpp> |
| 32 | -#include <srs_protocol_rtmp.hpp> | ||
| 33 | #include <srs_kernel_log.hpp> | 35 | #include <srs_kernel_log.hpp> |
| 34 | -#include <srs_protocol_rtmp_stack.hpp> | 36 | +#include <srs_kernel_config.hpp> |
| 35 | #include <srs_kernel_pithy_print.hpp> | 37 | #include <srs_kernel_pithy_print.hpp> |
| 36 | #include <srs_protocol_rtmp.hpp> | 38 | #include <srs_protocol_rtmp.hpp> |
| 37 | -#include <srs_kernel_config.hpp> | ||
| 38 | -#include <srs_core_source.hpp> | ||
| 39 | -#include <srs_core_autofree.hpp> | ||
| 40 | -#include <srs_core_socket.hpp> | 39 | +#include <srs_protocol_rtmp_stack.hpp> |
| 40 | +#include <srs_protocol_utility.hpp> | ||
| 41 | +#include <srs_protocol_rtmp.hpp> | ||
| 41 | 42 | ||
| 42 | SrsForwarder::SrsForwarder(SrsSource* _source) | 43 | SrsForwarder::SrsForwarder(SrsSource* _source) |
| 43 | { | 44 | { |
| @@ -39,6 +39,7 @@ using namespace std; | @@ -39,6 +39,7 @@ using namespace std; | ||
| 39 | 39 | ||
| 40 | #include <srs_kernel_error.hpp> | 40 | #include <srs_kernel_error.hpp> |
| 41 | #include <srs_kernel_log.hpp> | 41 | #include <srs_kernel_log.hpp> |
| 42 | +#include <srs_protocol_utility.hpp> | ||
| 42 | #include <srs_core_autofree.hpp> | 43 | #include <srs_core_autofree.hpp> |
| 43 | 44 | ||
| 44 | #define FILE_OFFSET(fd) lseek(fd, 0, SEEK_CUR) | 45 | #define FILE_OFFSET(fd) lseek(fd, 0, SEEK_CUR) |
| @@ -38,8 +38,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -38,8 +38,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 38 | #define RTMP_VHOST_DEFAULT "__defaultVhost__" | 38 | #define RTMP_VHOST_DEFAULT "__defaultVhost__" |
| 39 | 39 | ||
| 40 | #define SRS_LOCALHOST "127.0.0.1" | 40 | #define SRS_LOCALHOST "127.0.0.1" |
| 41 | -#define RTMP_DEFAULT_PORT 1935 | ||
| 42 | -#define RTMP_DEFAULT_PORTS "1935" | ||
| 43 | 41 | ||
| 44 | #define SRS_CONF_DEFAULT_HLS_PATH "./objs/nginx/html" | 42 | #define SRS_CONF_DEFAULT_HLS_PATH "./objs/nginx/html" |
| 45 | #define SRS_CONF_DEFAULT_HLS_FRAGMENT 10 | 43 | #define SRS_CONF_DEFAULT_HLS_FRAGMENT 10 |
| @@ -57,9 +55,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -57,9 +55,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 57 | // the interval in seconds for bandwidth check | 55 | // the interval in seconds for bandwidth check |
| 58 | #define SRS_CONF_DEFAULT_BANDWIDTH_LIMIT_KBPS 1000 | 56 | #define SRS_CONF_DEFAULT_BANDWIDTH_LIMIT_KBPS 1000 |
| 59 | 57 | ||
| 60 | -// the default chunk size for system. | ||
| 61 | -#define SRS_CONF_DEFAULT_CHUNK_SIZE 60000 | ||
| 62 | - | ||
| 63 | #define SRS_STAGE_PLAY_USER_INTERVAL_MS 1300 | 58 | #define SRS_STAGE_PLAY_USER_INTERVAL_MS 1300 |
| 64 | #define SRS_STAGE_PUBLISH_USER_INTERVAL_MS 1100 | 59 | #define SRS_STAGE_PUBLISH_USER_INTERVAL_MS 1100 |
| 65 | #define SRS_STAGE_FORWARDER_INTERVAL_MS 2000 | 60 | #define SRS_STAGE_FORWARDER_INTERVAL_MS 2000 |
| @@ -85,27 +85,3 @@ std::string srs_dns_resolve(std::string host) | @@ -85,27 +85,3 @@ std::string srs_dns_resolve(std::string host) | ||
| 85 | return ipv4; | 85 | return ipv4; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | -void srs_vhost_resolve(std::string& vhost, std::string& app) | ||
| 89 | -{ | ||
| 90 | - app = srs_replace(app, "...", "?"); | ||
| 91 | - | ||
| 92 | - size_t pos = 0; | ||
| 93 | - if ((pos = app.find("?")) == std::string::npos) { | ||
| 94 | - return; | ||
| 95 | - } | ||
| 96 | - | ||
| 97 | - std::string query = app.substr(pos + 1); | ||
| 98 | - app = app.substr(0, pos); | ||
| 99 | - | ||
| 100 | - if ((pos = query.find("vhost?")) != std::string::npos | ||
| 101 | - || (pos = query.find("vhost=")) != std::string::npos | ||
| 102 | - || (pos = query.find("Vhost?")) != std::string::npos | ||
| 103 | - || (pos = query.find("Vhost=")) != std::string::npos | ||
| 104 | - ) { | ||
| 105 | - query = query.substr(pos + 6); | ||
| 106 | - if (!query.empty()) { | ||
| 107 | - vhost = query; | ||
| 108 | - } | ||
| 109 | - } | ||
| 110 | -} | ||
| 111 | - |
| @@ -96,11 +96,6 @@ extern void srs_update_system_time_ms(); | @@ -96,11 +96,6 @@ extern void srs_update_system_time_ms(); | ||
| 96 | extern std::string srs_replace(std::string str, std::string old_str, std::string new_str); | 96 | extern std::string srs_replace(std::string str, std::string old_str, std::string new_str); |
| 97 | // dns resolve utility, return the resolved ip address. | 97 | // dns resolve utility, return the resolved ip address. |
| 98 | extern std::string srs_dns_resolve(std::string host); | 98 | extern std::string srs_dns_resolve(std::string host); |
| 99 | -// resolve the vhost in query string | ||
| 100 | -// @param app, may contains the vhost in query string format: | ||
| 101 | -// app?vhost=request_vhost | ||
| 102 | -// app...vhost...request_vhost | ||
| 103 | -extern void srs_vhost_resolve(std::string& vhost, std::string& app); | ||
| 104 | 99 | ||
| 105 | /** | 100 | /** |
| 106 | * disable copy constructor of class | 101 | * disable copy constructor of class |
| @@ -24,13 +24,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -24,13 +24,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 24 | #include <srs_protocol_rtmp.hpp> | 24 | #include <srs_protocol_rtmp.hpp> |
| 25 | 25 | ||
| 26 | #include <srs_core_autofree.hpp> | 26 | #include <srs_core_autofree.hpp> |
| 27 | -#include <srs_protocol_handshake.hpp> | ||
| 28 | #include <srs_kernel_log.hpp> | 27 | #include <srs_kernel_log.hpp> |
| 29 | #include <srs_kernel_error.hpp> | 28 | #include <srs_kernel_error.hpp> |
| 30 | -#include <srs_kernel_config.hpp> | ||
| 31 | #include <srs_protocol_io.hpp> | 29 | #include <srs_protocol_io.hpp> |
| 32 | -#include <srs_protocol_rtmp_stack.hpp> | ||
| 33 | #include <srs_protocol_amf0.hpp> | 30 | #include <srs_protocol_amf0.hpp> |
| 31 | +#include <srs_protocol_handshake.hpp> | ||
| 32 | +#include <srs_protocol_rtmp_stack.hpp> | ||
| 33 | +#include <srs_protocol_utility.hpp> | ||
| 34 | 34 | ||
| 35 | using namespace std; | 35 | using namespace std; |
| 36 | 36 | ||
| @@ -127,27 +127,6 @@ int SrsRequest::discovery_app() | @@ -127,27 +127,6 @@ int SrsRequest::discovery_app() | ||
| 127 | srs_vhost_resolve(vhost, app); | 127 | srs_vhost_resolve(vhost, app); |
| 128 | strip(); | 128 | strip(); |
| 129 | 129 | ||
| 130 | - // resolve the vhost from config | ||
| 131 | - SrsConfDirective* parsed_vhost = config->get_vhost(vhost); | ||
| 132 | - if (parsed_vhost) { | ||
| 133 | - vhost = parsed_vhost->arg0(); | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - // TODO: discovery the params of vhost. | ||
| 137 | - | ||
| 138 | - srs_info("discovery app success. schema=%s, vhost=%s, port=%s, app=%s", | ||
| 139 | - schema.c_str(), vhost.c_str(), port.c_str(), app.c_str()); | ||
| 140 | - | ||
| 141 | - if (schema.empty() || vhost.empty() || port.empty() || app.empty()) { | ||
| 142 | - ret = ERROR_RTMP_REQ_TCURL; | ||
| 143 | - srs_error("discovery tcUrl failed. " | ||
| 144 | - "tcUrl=%s, schema=%s, vhost=%s, port=%s, app=%s, ret=%d", | ||
| 145 | - tcUrl.c_str(), schema.c_str(), vhost.c_str(), port.c_str(), app.c_str(), ret); | ||
| 146 | - return ret; | ||
| 147 | - } | ||
| 148 | - | ||
| 149 | - strip(); | ||
| 150 | - | ||
| 151 | return ret; | 130 | return ret; |
| 152 | } | 131 | } |
| 153 | 132 |
trunk/src/rtmp/srs_protocol_utility.cpp
0 → 100644
| 1 | +/* | ||
| 2 | +The MIT License (MIT) | ||
| 3 | + | ||
| 4 | +Copyright (c) 2013-2014 winlin | ||
| 5 | + | ||
| 6 | +Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| 7 | +this software and associated documentation files (the "Software"), to deal in | ||
| 8 | +the Software without restriction, including without limitation the rights to | ||
| 9 | +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
| 10 | +the Software, and to permit persons to whom the Software is furnished to do so, | ||
| 11 | +subject to the following conditions: | ||
| 12 | + | ||
| 13 | +The above copyright notice and this permission notice shall be included in all | ||
| 14 | +copies or substantial portions of the Software. | ||
| 15 | + | ||
| 16 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| 18 | +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
| 19 | +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| 20 | +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 21 | +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 22 | +*/ | ||
| 23 | + | ||
| 24 | +#include <srs_protocol_utility.hpp> | ||
| 25 | + | ||
| 26 | +void srs_vhost_resolve(std::string& vhost, std::string& app) | ||
| 27 | +{ | ||
| 28 | + app = srs_replace(app, "...", "?"); | ||
| 29 | + | ||
| 30 | + size_t pos = 0; | ||
| 31 | + if ((pos = app.find("?")) == std::string::npos) { | ||
| 32 | + return; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + std::string query = app.substr(pos + 1); | ||
| 36 | + app = app.substr(0, pos); | ||
| 37 | + | ||
| 38 | + if ((pos = query.find("vhost?")) != std::string::npos | ||
| 39 | + || (pos = query.find("vhost=")) != std::string::npos | ||
| 40 | + || (pos = query.find("Vhost?")) != std::string::npos | ||
| 41 | + || (pos = query.find("Vhost=")) != std::string::npos | ||
| 42 | + ) { | ||
| 43 | + query = query.substr(pos + 6); | ||
| 44 | + if (!query.empty()) { | ||
| 45 | + vhost = query; | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | +} |
trunk/src/rtmp/srs_protocol_utility.hpp
0 → 100644
| 1 | +/* | ||
| 2 | +The MIT License (MIT) | ||
| 3 | + | ||
| 4 | +Copyright (c) 2013-2014 winlin | ||
| 5 | + | ||
| 6 | +Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| 7 | +this software and associated documentation files (the "Software"), to deal in | ||
| 8 | +the Software without restriction, including without limitation the rights to | ||
| 9 | +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
| 10 | +the Software, and to permit persons to whom the Software is furnished to do so, | ||
| 11 | +subject to the following conditions: | ||
| 12 | + | ||
| 13 | +The above copyright notice and this permission notice shall be included in all | ||
| 14 | +copies or substantial portions of the Software. | ||
| 15 | + | ||
| 16 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| 18 | +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
| 19 | +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| 20 | +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 21 | +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 22 | +*/ | ||
| 23 | + | ||
| 24 | +#ifndef SRS_RTMP_PROTOCOL_CONSTS_HPP | ||
| 25 | +#define SRS_RTMP_PROTOCOL_CONSTS_HPP | ||
| 26 | + | ||
| 27 | +/* | ||
| 28 | +#include <srs_protocol_utility.hpp> | ||
| 29 | +*/ | ||
| 30 | +#include <srs_core.hpp> | ||
| 31 | + | ||
| 32 | +#define RTMP_DEFAULT_PORT 1935 | ||
| 33 | +#define RTMP_DEFAULT_PORTS "1935" | ||
| 34 | + | ||
| 35 | +// the default chunk size for system. | ||
| 36 | +#define SRS_CONF_DEFAULT_CHUNK_SIZE 60000 | ||
| 37 | + | ||
| 38 | +// resolve the vhost in query string | ||
| 39 | +// @param app, may contains the vhost in query string format: | ||
| 40 | +// app?vhost=request_vhost | ||
| 41 | +// app...vhost...request_vhost | ||
| 42 | +extern void srs_vhost_resolve(std::string& vhost, std::string& app); | ||
| 43 | + | ||
| 44 | +#endif |
| @@ -12,14 +12,10 @@ file | @@ -12,14 +12,10 @@ file | ||
| 12 | kernel readonly separator, | 12 | kernel readonly separator, |
| 13 | ..\kernel\srs_kernel_buffer.hpp, | 13 | ..\kernel\srs_kernel_buffer.hpp, |
| 14 | ..\kernel\srs_kernel_buffer.cpp, | 14 | ..\kernel\srs_kernel_buffer.cpp, |
| 15 | - ..\kernel\srs_kernel_config.hpp, | ||
| 16 | - ..\kernel\srs_kernel_config.cpp, | ||
| 17 | ..\kernel\srs_kernel_error.hpp, | 15 | ..\kernel\srs_kernel_error.hpp, |
| 18 | ..\kernel\srs_kernel_error.cpp, | 16 | ..\kernel\srs_kernel_error.cpp, |
| 19 | ..\kernel\srs_kernel_log.hpp, | 17 | ..\kernel\srs_kernel_log.hpp, |
| 20 | ..\kernel\srs_kernel_log.cpp, | 18 | ..\kernel\srs_kernel_log.cpp, |
| 21 | - ..\kernel\srs_kernel_pithy_print.hpp, | ||
| 22 | - ..\kernel\srs_kernel_pithy_print.cpp, | ||
| 23 | ..\kernel\srs_kernel_reload.hpp, | 19 | ..\kernel\srs_kernel_reload.hpp, |
| 24 | ..\kernel\srs_kernel_reload.cpp, | 20 | ..\kernel\srs_kernel_reload.cpp, |
| 25 | ..\kernel\srs_kernel_stream.hpp, | 21 | ..\kernel\srs_kernel_stream.hpp, |
| @@ -35,6 +31,8 @@ file | @@ -35,6 +31,8 @@ file | ||
| 35 | ..\rtmp\srs_protocol_rtmp.cpp, | 31 | ..\rtmp\srs_protocol_rtmp.cpp, |
| 36 | ..\rtmp\srs_protocol_rtmp_stack.hpp, | 32 | ..\rtmp\srs_protocol_rtmp_stack.hpp, |
| 37 | ..\rtmp\srs_protocol_rtmp_stack.cpp, | 33 | ..\rtmp\srs_protocol_rtmp_stack.cpp, |
| 34 | + ..\rtmp\srs_protocol_utility.hpp, | ||
| 35 | + ..\rtmp\srs_protocol_utility.cpp, | ||
| 38 | app readonly separator, | 36 | app readonly separator, |
| 39 | ..\app\srs_core_bandwidth.hpp, | 37 | ..\app\srs_core_bandwidth.hpp, |
| 40 | ..\app\srs_core_bandwidth.cpp, | 38 | ..\app\srs_core_bandwidth.cpp, |
| @@ -44,6 +42,8 @@ file | @@ -44,6 +42,8 @@ file | ||
| 44 | ..\app\srs_core_codec.cpp, | 42 | ..\app\srs_core_codec.cpp, |
| 45 | ..\app\srs_core_conn.hpp, | 43 | ..\app\srs_core_conn.hpp, |
| 46 | ..\app\srs_core_conn.cpp, | 44 | ..\app\srs_core_conn.cpp, |
| 45 | + ..\app\srs_kernel_config.hpp, | ||
| 46 | + ..\app\srs_kernel_config.cpp, | ||
| 47 | ..\app\srs_core_encoder.hpp, | 47 | ..\app\srs_core_encoder.hpp, |
| 48 | ..\app\srs_core_encoder.cpp, | 48 | ..\app\srs_core_encoder.cpp, |
| 49 | ..\app\srs_core_forward.hpp, | 49 | ..\app\srs_core_forward.hpp, |
| @@ -56,6 +56,8 @@ file | @@ -56,6 +56,8 @@ file | ||
| 56 | ..\app\srs_core_log_context.cpp, | 56 | ..\app\srs_core_log_context.cpp, |
| 57 | ..\app\srs_core_refer.hpp, | 57 | ..\app\srs_core_refer.hpp, |
| 58 | ..\app\srs_core_refer.cpp, | 58 | ..\app\srs_core_refer.cpp, |
| 59 | + ..\app\srs_kernel_pithy_print.hpp, | ||
| 60 | + ..\app\srs_kernel_pithy_print.cpp, | ||
| 59 | ..\app\srs_core_thread.hpp, | 61 | ..\app\srs_core_thread.hpp, |
| 60 | ..\app\srs_core_thread.cpp, | 62 | ..\app\srs_core_thread.cpp, |
| 61 | ..\app\srs_core_server.hpp, | 63 | ..\app\srs_core_server.hpp, |
-
请 注册 或 登录 后发表评论