1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge branch '4.0release' into develop

This commit is contained in:
winlin 2022-08-17 11:10:30 +08:00
commit 4edf33326d
5 changed files with 45 additions and 7 deletions

View file

@ -3435,6 +3435,20 @@ VOID TEST(ProtocolRTMPTest, DiscoveryTcUrl)
EXPECT_STREQ("?key=abc&&vhost=demo.com", param.c_str());
}
if (true) {
int port; std::string tcUrl, schema, ip, vhost, app, stream, param;
tcUrl = "rtmp://winlin.cn/live"; stream= "show?key=abc&&domain=demo.com";
srs_discovery_tc_url(tcUrl, schema, ip, vhost, app, stream, port, param);
EXPECT_STREQ("rtmp", schema.c_str());
EXPECT_STREQ("winlin.cn", ip.c_str());
EXPECT_STREQ("demo.com", vhost.c_str());
EXPECT_STREQ("live", app.c_str());
EXPECT_STREQ("show", stream.c_str());
EXPECT_EQ(1935, port);
EXPECT_STREQ("?key=abc&&domain=demo.com", param.c_str());
}
// vhost in app
if (true) {
int port; std::string tcUrl, schema, ip, vhost, app, stream, param;