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

Remove bandwidth check because falsh is disabled. v5.0.52

This commit is contained in:
winlin 2022-08-30 10:36:01 +08:00
parent 1630918b0f
commit 937605b18c
16 changed files with 5 additions and 1490 deletions

View file

@ -4993,40 +4993,6 @@ VOID TEST(ProtocolStackTest, ProtocolSendSrsOnStatusCallPacket)
EXPECT_TRUE(srs_bytes_equals(bio.out_buffer.bytes(), buf, sizeof(buf)));
}
/**
* send a SrsBandwidthPacket packet
*/
VOID TEST(ProtocolStackTest, ProtocolSendSrsBandwidthPacket)
{
MockBufferIO bio;
SrsProtocol proto(&bio);
SrsAmf0Object* args = SrsAmf0Any::object();
args->set("stream" , SrsAmf0Any::str("livestream"));
args->set("start" , SrsAmf0Any::number(0));
SrsBandwidthPacket* pkt = new SrsBandwidthPacket();
pkt->command_name = "startPublish";
pkt->args = SrsAmf0Any::null();
pkt->data = args;
EXPECT_TRUE(ERROR_SUCCESS == proto.send_and_free_packet(pkt, 0));
char buf[] = {
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x14,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x73,
0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c,
0x69, 0x73, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x05, 0x03, 0x00, 0x06,
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x02, 0x00,
0x0a, 0x6c, 0x69, 0x76, 0x65, 0x73, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x00, 0x05, 0x73, 0x74, 0x61,
0x72, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x09
};
EXPECT_TRUE(srs_bytes_equals(bio.out_buffer.bytes(), buf, sizeof(buf)));
}
/**
* send a SrsOnStatusDataPacket packet
*/