提交 3d7e14b8 authored 作者: José Luis Millán's avatar José Luis Millán

Tests: add RTCP PSFB TST[RN] tests

上级 8880528d
......@@ -100,7 +100,7 @@ namespace RTC { namespace RTCP
template <typename T>
uint8_t TstItem<T>::GetIndex()
{
return (uint8_t)ntohl(this->header->index);
return (uint8_t)this->header->index;
}
}}
......
......@@ -14,6 +14,7 @@
#include "RTC/RTCP/FeedbackPsSli.h"
#include "RTC/RTCP/FeedbackPsRpsi.h"
#include "RTC/RTCP/FeedbackPsFir.h"
#include "RTC/RTCP/FeedbackPsTst.h"
#include "Logger.h"
#include <string>
......@@ -545,5 +546,29 @@ FCTMF_SUITE_BGN(test_rtcp)
delete item;
}
FCT_TEST_END()
FCT_TEST_BGN(parse_psfb_tst_item)
{
uint8_t buffer[] =
{
0x00, 0x00, 0x00, 0x00, // SSRC
0x08, // Seq nr.
0x00, 0x00, 0x08 // Reserved | Index
};
uint32_t ssrc = 0;
uint8_t seq = 8;
uint8_t index = 1;
TstnItem* item = TstnItem::Parse(buffer, sizeof(buffer));
fct_req(item != nullptr);
fct_chk_eq_int(item->GetSsrc(), ssrc);
fct_chk_eq_int(item->GetSequenceNumber(), seq);
fct_chk_eq_int(item->GetIndex(), index);
delete item;
}
FCT_TEST_END()
}
FCTMF_SUITE_END();
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论