[rtp_rtcp] rtcp::Sli packet moved into own file and got Parse function
BUG=webrtc:5260 R=åsapersson Review URL: https://codereview.webrtc.org/1551893002 Cr-Commit-Position: refs/heads/master@{#11228}
This commit is contained in:
@ -34,8 +34,6 @@ using webrtc::RTCPUtility::RTCPPacketPSFBFIR;
|
||||
using webrtc::RTCPUtility::RTCPPacketPSFBFIRItem;
|
||||
using webrtc::RTCPUtility::RTCPPacketPSFBREMBItem;
|
||||
using webrtc::RTCPUtility::RTCPPacketPSFBRPSI;
|
||||
using webrtc::RTCPUtility::RTCPPacketPSFBSLI;
|
||||
using webrtc::RTCPUtility::RTCPPacketPSFBSLIItem;
|
||||
using webrtc::RTCPUtility::RTCPPacketReportBlockItem;
|
||||
using webrtc::RTCPUtility::RTCPPacketRTPFBNACK;
|
||||
using webrtc::RTCPUtility::RTCPPacketRTPFBNACKItem;
|
||||
@ -181,30 +179,6 @@ void CreateSdes(const std::vector<Sdes::Chunk>& chunks,
|
||||
}
|
||||
}
|
||||
|
||||
// Slice loss indication (SLI) (RFC 4585).
|
||||
//
|
||||
// FCI:
|
||||
//
|
||||
// 0 1 2 3
|
||||
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
// | First | Number | PictureID |
|
||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
void CreateSli(const RTCPPacketPSFBSLI& sli,
|
||||
const RTCPPacketPSFBSLIItem& sli_item,
|
||||
uint8_t* buffer,
|
||||
size_t* pos) {
|
||||
AssignUWord32(buffer, pos, sli.SenderSSRC);
|
||||
AssignUWord32(buffer, pos, sli.MediaSSRC);
|
||||
|
||||
AssignUWord8(buffer, pos, sli_item.FirstMB >> 5);
|
||||
AssignUWord8(buffer, pos, (sli_item.FirstMB << 3) +
|
||||
((sli_item.NumberOfMB >> 10) & 0x07));
|
||||
AssignUWord8(buffer, pos, sli_item.NumberOfMB >> 2);
|
||||
AssignUWord8(buffer, pos, (sli_item.NumberOfMB << 6) + sli_item.PictureId);
|
||||
}
|
||||
|
||||
// Reference picture selection indication (RPSI) (RFC 4585).
|
||||
//
|
||||
// FCI:
|
||||
@ -494,20 +468,6 @@ size_t Sdes::BlockLength() const {
|
||||
return length;
|
||||
}
|
||||
|
||||
bool Sli::Create(uint8_t* packet,
|
||||
size_t* index,
|
||||
size_t max_length,
|
||||
RtcpPacket::PacketReadyCallback* callback) const {
|
||||
while (*index + BlockLength() > max_length) {
|
||||
if (!OnBufferFull(packet, index, callback))
|
||||
return false;
|
||||
}
|
||||
const uint8_t kFmt = 2;
|
||||
CreateHeader(kFmt, PT_PSFB, HeaderLength(), packet, index);
|
||||
CreateSli(sli_, sli_item_, packet, index);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Rpsi::Create(uint8_t* packet,
|
||||
size_t* index,
|
||||
size_t max_length,
|
||||
|
||||
Reference in New Issue
Block a user