优化函数命名风格

FindField改名为findSubString
This commit is contained in:
xia-chu
2023-06-10 12:28:49 +08:00
committed by 夏楚
parent 31944a92ad
commit 64b8079ac1
17 changed files with 51 additions and 50 deletions

View File

@@ -65,9 +65,9 @@ void RtmpPusher::onPublishResult_l(const SockException &ex, bool handshake_done)
void RtmpPusher::publish(const string &url) {
teardown();
string host_url = FindField(url.data(), "://", "/");
_app = FindField(url.data(), (host_url + "/").data(), "/");
_stream_id = FindField(url.data(), (host_url + "/" + _app + "/").data(), NULL);
string host_url = findSubString(url.data(), "://", "/");
_app = findSubString(url.data(), (host_url + "/").data(), "/");
_stream_id = findSubString(url.data(), (host_url + "/" + _app + "/").data(), NULL);
_tc_url = string("rtmp://") + host_url + "/" + _app;
if (!_app.size() || !_stream_id.size()) {