Cover protocol stack RTMP. 3.0.63

pull/1568/head
winlin 5 years ago
parent 2b2a62ccba
commit 1583f6cc3f

@ -152,6 +152,8 @@ Please select according to languages:
### V3 changes
* v3.0, 2019-10-30, Cover protocol stack RTMP. 3.0.63
* v3.0, 2019-10-23, Cover JSON codec. 3.0.62
* v3.0, 2019-10-13, Use http://ossrs.net:8000 as homepage.
* v3.0, 2019-10-10, Cover AMF0 codec. 3.0.61
* <strong>v3.0, 2019-10-07, [3.0 alpha1(3.0.60)][r3.0a1] released. 107962 lines.</strong>

@ -34,8 +34,44 @@ using namespace std;
#include <srs_protocol_amf0.hpp>
#include <srs_rtmp_stack.hpp>
#include <srs_service_http_conn.hpp>
#include <srs_kernel_buffer.hpp>
VOID TEST(ProtoStackTest, RTMPTest)
class MockErrorPacket : public SrsPacket
{
protected:
virtual int get_size() {
return 1024;
}
};
VOID TEST(ProtoStackTest, PacketEncode)
{
srs_error_t err;
int size;
char* payload;
if (true) {
MockErrorPacket pkt;
HELPER_EXPECT_FAILED(pkt.encode(size, payload));
}
if (true) {
MockErrorPacket pkt;
SrsBuffer b;
HELPER_EXPECT_FAILED(pkt.decode(&b));
}
if (true) {
SrsPacket pkt;
EXPECT_EQ(0, pkt.get_prefer_cid());
EXPECT_EQ(0, pkt.get_message_type());
EXPECT_EQ(0, pkt.get_size());
}
if (true) {
MockErrorPacket pkt;
EXPECT_EQ(1024, pkt.get_size());
}
}

Loading…
Cancel
Save