#define MS_CLASS "RTC::RTCP::FeedbackRtpTllei"
#include "RTC/RTCP/FeedbackRtpTllei.hpp"
#include "Logger.hpp"
#include <cstring>
namespace RTC
{
namespace RTCP
{
FeedbackRtpTlleiItem::FeedbackRtpTlleiItem(uint16_t packetId, uint16_t lostPacketBitmask)
{
this->raw = new uint8_t[HeaderSize];
this->header = reinterpret_cast<Header*>(this->raw);
this->header->packetId = htons(packetId);
this->header->lostPacketBitmask = htons(lostPacketBitmask);
}
size_t FeedbackRtpTlleiItem::Serialize(uint8_t* buffer)
{
MS_TRACE();
std::memcpy(buffer, this->header, HeaderSize);
return HeaderSize;
}
void FeedbackRtpTlleiItem::Dump(int indentation) const
{
MS_TRACE();
MS_DUMP_CLEAN(indentation, "<FeedbackRtpTlleiItem>");
MS_DUMP_CLEAN(indentation, " pid: %" PRIu16, this->GetPacketId());
MS_DUMP_CLEAN(indentation, " bpl: %" PRIu16, this->GetLostPacketBitmask());
MS_DUMP_CLEAN(indentation, "</FeedbackRtpTlleiItem>");
}
} }