mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTMP URL supports domain in stream parameters. v4.0.255
This commit is contained in:
parent
febd45d514
commit
f9941a325b
5 changed files with 45 additions and 7 deletions
|
@ -3388,6 +3388,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue