Declare the RTCP packets_lost field as signed in the API.
The definition of this field in RFC 3550 says that under certain conditions it may have a negative value. This change exposes that property in the WebRTC API. Bug: webrtc:8626 Change-Id: I4ee249da045dcee940db66ebd915268a97fc13db Reviewed-on: https://webrtc-review.googlesource.com/31260 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21159}
This commit is contained in:

committed by
Commit Bot

parent
99b1bd1553
commit
c7c4191325
@ -104,7 +104,7 @@ struct RtcpStatistics {
|
|||||||
|
|
||||||
uint8_t fraction_lost;
|
uint8_t fraction_lost;
|
||||||
union {
|
union {
|
||||||
uint32_t packets_lost;
|
int32_t packets_lost; // Defined as a 24 bit signed integer in RTCP
|
||||||
RTC_DEPRECATED uint32_t cumulative_lost;
|
RTC_DEPRECATED uint32_t cumulative_lost;
|
||||||
};
|
};
|
||||||
union {
|
union {
|
||||||
|
@ -195,7 +195,7 @@ TEST_F(ReceiveStatisticsTest, RtcpCallbacks) {
|
|||||||
EXPECT_EQ(statistics.fraction_lost, callback.stats_.fraction_lost);
|
EXPECT_EQ(statistics.fraction_lost, callback.stats_.fraction_lost);
|
||||||
EXPECT_EQ(statistics.jitter, callback.stats_.jitter);
|
EXPECT_EQ(statistics.jitter, callback.stats_.jitter);
|
||||||
EXPECT_EQ(51, statistics.fraction_lost);
|
EXPECT_EQ(51, statistics.fraction_lost);
|
||||||
EXPECT_EQ(1u, statistics.packets_lost);
|
EXPECT_EQ(1, statistics.packets_lost);
|
||||||
EXPECT_EQ(5u, statistics.extended_highest_sequence_number);
|
EXPECT_EQ(5u, statistics.extended_highest_sequence_number);
|
||||||
EXPECT_EQ(4u, statistics.jitter);
|
EXPECT_EQ(4u, statistics.jitter);
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDiscardedPackets) {
|
|||||||
|
|
||||||
TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsRtcpStats) {
|
TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsRtcpStats) {
|
||||||
const uint8_t kFracLost = 0;
|
const uint8_t kFracLost = 0;
|
||||||
const uint32_t kCumLost = 1;
|
const int32_t kCumLost = 1;
|
||||||
const uint32_t kExtSeqNum = 10;
|
const uint32_t kExtSeqNum = 10;
|
||||||
const uint32_t kJitter = 4;
|
const uint32_t kJitter = 4;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user