提交 998c5da3 authored 作者: José Luis Millán's avatar José Luis Millán

Tests: add RTCP RTPFB TMMB[NR] tests

上级 3e683b26
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "RTC/RTCP/ReceiverReport.h" #include "RTC/RTCP/ReceiverReport.h"
#include "RTC/RTCP/Bye.h" #include "RTC/RTCP/Bye.h"
#include "RTC/RTCP/FeedbackRtpNack.h" #include "RTC/RTCP/FeedbackRtpNack.h"
#include "RTC/RTCP/FeedbackRtpTmmb.h"
#include "Logger.h" #include "Logger.h"
#include <string> #include <string>
...@@ -390,5 +391,28 @@ FCTMF_SUITE_BGN(test_rtcp) ...@@ -390,5 +391,28 @@ FCTMF_SUITE_BGN(test_rtcp)
fct_chk_eq_int(item3.GetLostPacketBitmask(), htons(lostPacketBitmask)); fct_chk_eq_int(item3.GetLostPacketBitmask(), htons(lostPacketBitmask));
} }
FCT_TEST_END() FCT_TEST_END()
FCT_TEST_BGN(parse_rtpfb_tmmb_item)
{
uint8_t buffer[] =
{
0x00, 0x00, 0x00, 0x00, // ssrc
0x04, 0x00, 0x02, 0x01
};
uint32_t ssrc = 0;
uint64_t bitrate = 2;
uint32_t overhead = 1;
TmmbrItem* item = TmmbrItem::Parse(buffer, sizeof(buffer));
fct_req(item != nullptr);
fct_chk_eq_int(item->GetSsrc(), ssrc);
fct_chk(item->GetBitrate() == bitrate);
fct_chk_eq_int(item->GetOverhead(), overhead);
delete item;
}
FCT_TEST_END()
} }
FCTMF_SUITE_END(); FCTMF_SUITE_END();
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论