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

Unified Diff: webrtc/modules/video_coding/video_packet_buffer_unittest.cc

Issue 2453143003: Delete method FrameObject::GetBitstream. (Closed)
Patch Set: Created 4 years, 2 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/video_coding/frame_object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_packet_buffer_unittest.cc
diff --git a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
index 7905e855b4172900101ec6f903c8fac097ff7994..0b1c2ea0e2e24ec54f4421a7d4f047c43c4cd9d3 100644
--- a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
@@ -145,7 +145,7 @@ TEST_F(TestPacketBuffer, FrameSize) {
InsertPacket(seq_num + 3, kKeyFrame, kNotFirst, kLast, 5, data);
ASSERT_EQ(1UL, frames_from_callback_.size());
- EXPECT_EQ(20UL, frames_from_callback_.begin()->second->size);
+ EXPECT_EQ(20UL, frames_from_callback_.begin()->second->size());
}
TEST_F(TestPacketBuffer, ExpandBuffer) {
@@ -286,8 +286,8 @@ TEST_F(TestPacketBuffer, GetBitstreamFromFrame) {
0x65, 0x61, 0x6d, 0x2c, 0x20};
uint8_t such[] = {0x73, 0x75, 0x63, 0x68, 0x20};
uint8_t data[] = {0x64, 0x61, 0x74, 0x61, 0x0};
- uint8_t
- result[sizeof(many) + sizeof(bitstream) + sizeof(such) + sizeof(data)];
+ const size_t total_size =
+ sizeof(many) + sizeof(bitstream) + sizeof(such) + sizeof(data);
uint16_t seq_num = Rand();
@@ -300,8 +300,9 @@ TEST_F(TestPacketBuffer, GetBitstreamFromFrame) {
ASSERT_EQ(1UL, frames_from_callback_.size());
CheckFrame(seq_num);
- EXPECT_TRUE(frames_from_callback_[seq_num]->GetBitstream(result));
- EXPECT_EQ(memcmp(result, "many bitstream, such data", sizeof(result)), 0);
+ EXPECT_EQ(frames_from_callback_[seq_num]->size(), total_size);
+ EXPECT_EQ(memcmp(frames_from_callback_[seq_num]->EncodedImage()._buffer,
+ "many bitstream, such data", total_size), 0);
}
TEST_F(TestPacketBuffer, FreeSlotsOnFrameDestruction) {
@@ -352,7 +353,7 @@ TEST_F(TestPacketBuffer, InvalidateFrameByClearing) {
ASSERT_EQ(1UL, frames_from_callback_.size());
packet_buffer_->Clear();
- EXPECT_FALSE(frames_from_callback_.begin()->second->GetBitstream(nullptr));
+ EXPECT_EQ(frames_from_callback_.begin()->second->size(), 0U);
}
} // namespace video_coding
« no previous file with comments | « webrtc/modules/video_coding/frame_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698