Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet.cc

Issue 1581983003: [rtp_rtcp] rtcp::Fir moved into own file (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
index 533564d277d2d30a4b2e3f8950b00b54e6feb698..7b671c094a4e34c585d60127e489a1a29759913b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
@@ -29,8 +29,6 @@ using webrtc::RTCPUtility::PT_SR;
using webrtc::RTCPUtility::PT_XR;
using webrtc::RTCPUtility::RTCPPacketAPP;
-using webrtc::RTCPUtility::RTCPPacketPSFBFIR;
-using webrtc::RTCPUtility::RTCPPacketPSFBFIRItem;
using webrtc::RTCPUtility::RTCPPacketPSFBRPSI;
using webrtc::RTCPUtility::RTCPPacketReportBlockItem;
using webrtc::RTCPUtility::RTCPPacketRTPFBNACK;
@@ -42,9 +40,6 @@ using webrtc::RTCPUtility::RTCPPacketXR;
namespace webrtc {
namespace rtcp {
namespace {
-// Unused SSRC of media source, set to 0.
-const uint32_t kUnusedMediaSourceSsrc0 = 0;
-
void AssignUWord8(uint8_t* buffer, size_t* offset, uint8_t value) {
buffer[(*offset)++] = value;
}
@@ -52,10 +47,6 @@ void AssignUWord16(uint8_t* buffer, size_t* offset, uint16_t value) {
ByteWriter<uint16_t>::WriteBigEndian(buffer + *offset, value);
*offset += 2;
}
-void AssignUWord24(uint8_t* buffer, size_t* offset, uint32_t value) {
- ByteWriter<uint32_t, 3>::WriteBigEndian(buffer + *offset, value);
- *offset += 3;
-}
void AssignUWord32(uint8_t* buffer, size_t* offset, uint32_t value) {
ByteWriter<uint32_t>::WriteBigEndian(buffer + *offset, value);
*offset += 4;
@@ -187,29 +178,6 @@ void CreateRpsi(const RTCPPacketPSFBRPSI& rpsi,
*pos += padding_bytes;
}
-// Full intra request (FIR) (RFC 5104).
-//
-// 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
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// | SSRC |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// | Seq nr. | Reserved |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-void CreateFir(const RTCPPacketPSFBFIR& fir,
- const RTCPPacketPSFBFIRItem& fir_item,
- uint8_t* buffer,
- size_t* pos) {
- AssignUWord32(buffer, pos, fir.SenderSSRC);
- AssignUWord32(buffer, pos, kUnusedMediaSourceSsrc0);
- AssignUWord32(buffer, pos, fir_item.SSRC);
- AssignUWord8(buffer, pos, fir_item.CommandSequenceNumber);
- AssignUWord24(buffer, pos, 0);
-}
-
// From RFC 3611: RTP Control Protocol Extended Reports (RTCP XR).
//
// Format for XR packets:
@@ -437,20 +405,6 @@ void Rpsi::WithPictureId(uint64_t picture_id) {
}
}
-bool Fir::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 = 4;
- CreateHeader(kFmt, PT_PSFB, HeaderLength(), packet, index);
- CreateFir(fir_, fir_item_, packet, index);
- return true;
-}
-
bool Xr::Create(uint8_t* packet,
size_t* index,
size_t max_length,
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698