mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-12 19:24:22 +08:00
优化函数命名风格
FindField改名为findSubString
This commit is contained in:
@@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {
|
||||
auto delay_ms = cmd_main["delay"].as<int>();
|
||||
auto pusher_count = cmd_main["count"].as<int>();
|
||||
auto merge_ms = cmd_main["merge"].as<int>();
|
||||
auto schema = FindField(out_url.data(), nullptr, "://");
|
||||
auto schema = findSubString(out_url.data(), nullptr, "://");
|
||||
if (schema != RTSP_SCHEMA && schema != RTMP_SCHEMA) {
|
||||
cout << "推流协议只支持rtsp或rtmp!" << endl;
|
||||
return -1;
|
||||
|
||||
@@ -114,7 +114,7 @@ int domain(const string &filePath, const string &pushUrl) {
|
||||
|
||||
auto poller = EventPollerPool::Instance().getPoller();
|
||||
//vhost/app/stream可以随便自己填,现在不限制app应用名了
|
||||
createPusher(poller, FindField(pushUrl.data(), nullptr, "://").substr(0, 4), DEFAULT_VHOST, "live", "stream", filePath, pushUrl);
|
||||
createPusher(poller, findSubString(pushUrl.data(), nullptr, "://").substr(0, 4), DEFAULT_VHOST, "live", "stream", filePath, pushUrl);
|
||||
//设置退出信号处理函数
|
||||
static semaphore sem;
|
||||
signal(SIGINT, [](int) { sem.post(); });// 设置退出信号
|
||||
|
||||
Reference in New Issue
Block a user