Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h b/webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h |
similarity index 53% |
copy from webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h |
copy to webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h |
index c2b897e46e2be678cd077faba0a45a5779e3b3e6..1882ca6488fac5ea8e77206198305cce7ff2f02b 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h |
@@ -6,11 +6,10 @@ |
* tree. An additional intellectual property rights grant can be found |
* in the file PATENTS. All contributing project authors may |
* be found in the AUTHORS file in the root of the source tree. |
- * |
*/ |
-#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_FIR_H_ |
-#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_FIR_H_ |
+#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RPSI_H_ |
+#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RPSI_H_ |
#include "webrtc/base/basictypes.h" |
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" |
@@ -18,26 +17,28 @@ |
namespace webrtc { |
namespace rtcp { |
- |
-// Full intra request (FIR) (RFC 5104). |
-class Fir : public RtcpPacket { |
+// Reference picture selection indication (RPSI) (RFC 4585). |
+class Rpsi : public RtcpPacket { |
public: |
- Fir() : RtcpPacket() { |
- memset(&fir_, 0, sizeof(fir_)); |
- memset(&fir_item_, 0, sizeof(fir_item_)); |
+ Rpsi() |
+ : RtcpPacket(), |
+ padding_bytes_(0) { |
+ memset(&rpsi_, 0, sizeof(rpsi_)); |
} |
- virtual ~Fir() {} |
+ virtual ~Rpsi() {} |
void From(uint32_t ssrc) { |
- fir_.SenderSSRC = ssrc; |
+ rpsi_.SenderSSRC = ssrc; |
} |
void To(uint32_t ssrc) { |
- fir_item_.SSRC = ssrc; |
+ rpsi_.MediaSSRC = ssrc; |
} |
- void WithCommandSeqNum(uint8_t seq_num) { |
- fir_item_.CommandSequenceNumber = seq_num; |
+ void WithPayloadType(uint8_t payload) { |
+ assert(payload <= 0x7f); |
+ rpsi_.PayloadType = payload; |
} |
+ void WithPictureId(uint64_t picture_id); |
protected: |
bool Create(uint8_t* packet, |
@@ -47,14 +48,15 @@ class Fir : public RtcpPacket { |
private: |
size_t BlockLength() const { |
- const size_t kFciLength = 8; |
- return kCommonFbFmtLength + kFciLength; |
+ size_t fci_length = 2 + (rpsi_.NumberOfValidBits / 8) + padding_bytes_; |
+ return kCommonFbFmtLength + fci_length; |
} |
- RTCPUtility::RTCPPacketPSFBFIR fir_; |
- RTCPUtility::RTCPPacketPSFBFIRItem fir_item_; |
-}; |
+ uint8_t padding_bytes_; |
+ RTCPUtility::RTCPPacketPSFBRPSI rpsi_; |
+ RTC_DISALLOW_COPY_AND_ASSIGN(Rpsi); |
+}; |
} // namespace rtcp |
} // namespace webrtc |
-#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_FIR_H_ |
+#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_RPSI_H_ |