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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2871173008: Fix packetization logic to leave space for extensions in the last packet (Closed)
Patch Set: Impelement Danilchap@ comments Created 3 years, 7 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/vp8_partition_aggregator_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index e24cb41aac3ac07ce895cd33acaaaee45cbf7aca..41a1cb85b4d5c8dc718734dce47a9a9a17329f84 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -263,6 +263,9 @@ TEST_F(VideoSendStreamTest, SupportsVideoRotation) {
Action OnSendRtp(const uint8_t* packet, size_t length) override {
RTPHeader header;
EXPECT_TRUE(parser_->Parse(packet, length, &header));
+ // Only the last packet of the frame is required to have the extension.
+ if (!header.markerBit)
+ return SEND_PACKET;
EXPECT_TRUE(header.extension.hasVideoRotation);
EXPECT_EQ(kVideoRotation_90, header.extension.videoRotation);
observation_complete_.Set();
@@ -302,6 +305,9 @@ TEST_F(VideoSendStreamTest, SupportsVideoContentType) {
Action OnSendRtp(const uint8_t* packet, size_t length) override {
RTPHeader header;
EXPECT_TRUE(parser_->Parse(packet, length, &header));
+ // Only the last packet of the frame must have extension.
+ if (!header.markerBit)
+ return SEND_PACKET;
EXPECT_TRUE(header.extension.hasVideoContentType);
EXPECT_EQ(VideoContentType::SCREENSHARE,
header.extension.videoContentType);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/vp8_partition_aggregator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698