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

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

Issue 2300323002: Revert of Ignore Camera and Flip bits in CVO when parsing video rotation (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_utility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index b9f061a9d3af7739a2240b67efa56d34da878a3d..e11bf1ee5ae53ef0999ea4bd08a674ce199a8451 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -262,7 +262,8 @@
EXPECT_EQ(rtp_sender_->SSRC(), rtp_header.ssrc);
EXPECT_EQ(0, rtp_header.numCSRCs);
EXPECT_EQ(0U, rtp_header.paddingLength);
- EXPECT_EQ(rotation, rtp_header.extension.videoRotation);
+ EXPECT_EQ(ConvertVideoRotationToCVOByte(rotation),
+ rtp_header.extension.videoRotation);
}
};
@@ -576,7 +577,8 @@
VerifyRTPHeaderCommon(rtp_header);
EXPECT_EQ(length, rtp_header.headerLength);
EXPECT_TRUE(rtp_header.extension.hasVideoRotation);
- EXPECT_EQ(kRotation, rtp_header.extension.videoRotation);
+ EXPECT_EQ(ConvertVideoRotationToCVOByte(kRotation),
+ rtp_header.extension.videoRotation);
}
// Test CVO header extension is not set when marker bit is false.
@@ -1689,26 +1691,4 @@
transport_.sent_packets_[1]->size(), true, &map, kSeqNum + 1,
hdr.rotation);
}
-
-// Make sure rotation is parsed correctly when the Camera (C) and Flip (F) bits
-// are set in the CVO byte.
-TEST_F(RtpSenderVideoTest, SendVideoWithCameraAndFlipCVO) {
- // Test extracting rotation when Camera (C) and Flip (F) bits are zero.
- EXPECT_EQ(kVideoRotation_0, ConvertCVOByteToVideoRotation(0));
- EXPECT_EQ(kVideoRotation_90, ConvertCVOByteToVideoRotation(1));
- EXPECT_EQ(kVideoRotation_180, ConvertCVOByteToVideoRotation(2));
- EXPECT_EQ(kVideoRotation_270, ConvertCVOByteToVideoRotation(3));
- // Test extracting rotation when Camera (C) and Flip (F) bits are set.
- const int flip_bit = 1 << 2;
- const int camera_bit = 1 << 3;
- EXPECT_EQ(kVideoRotation_0,
- ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 0));
- EXPECT_EQ(kVideoRotation_90,
- ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 1));
- EXPECT_EQ(kVideoRotation_180,
- ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 2));
- EXPECT_EQ(kVideoRotation_270,
- ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 3));
-}
-
} // namespace webrtc
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_receiver_video.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698