Index: webrtc/common_video/i420_buffer_pool_unittest.cc |
diff --git a/webrtc/common_video/i420_buffer_pool_unittest.cc b/webrtc/common_video/i420_buffer_pool_unittest.cc |
index 273b72dc915859c00ec63ed1d73e781ea0b18f22..2110066a928d7e10ce8171bf78d8c6e76d55232b 100644 |
--- a/webrtc/common_video/i420_buffer_pool_unittest.cc |
+++ b/webrtc/common_video/i420_buffer_pool_unittest.cc |
@@ -21,16 +21,16 @@ TEST(TestI420BufferPool, SimpleFrameReuse) { |
EXPECT_EQ(16, buffer->width()); |
EXPECT_EQ(16, buffer->height()); |
// Extract non-refcounted pointers for testing. |
- const uint8_t* y_ptr = buffer->data(kYPlane); |
- const uint8_t* u_ptr = buffer->data(kUPlane); |
- const uint8_t* v_ptr = buffer->data(kVPlane); |
+ const uint8_t* y_ptr = buffer->DataY(); |
+ const uint8_t* u_ptr = buffer->DataU(); |
+ const uint8_t* v_ptr = buffer->DataV(); |
// Release buffer so that it is returned to the pool. |
buffer = nullptr; |
// Check that the memory is resued. |
buffer = pool.CreateBuffer(16, 16); |
- EXPECT_EQ(y_ptr, buffer->data(kYPlane)); |
- EXPECT_EQ(u_ptr, buffer->data(kUPlane)); |
- EXPECT_EQ(v_ptr, buffer->data(kVPlane)); |
+ EXPECT_EQ(y_ptr, buffer->DataY()); |
+ EXPECT_EQ(u_ptr, buffer->DataU()); |
+ EXPECT_EQ(v_ptr, buffer->DataV()); |
EXPECT_EQ(16, buffer->width()); |
EXPECT_EQ(16, buffer->height()); |
} |
@@ -39,16 +39,16 @@ TEST(TestI420BufferPool, FailToReuse) { |
I420BufferPool pool; |
rtc::scoped_refptr<VideoFrameBuffer> buffer = pool.CreateBuffer(16, 16); |
// Extract non-refcounted pointers for testing. |
- const uint8_t* u_ptr = buffer->data(kUPlane); |
- const uint8_t* v_ptr = buffer->data(kVPlane); |
+ const uint8_t* u_ptr = buffer->DataU(); |
+ const uint8_t* v_ptr = buffer->DataV(); |
// Release buffer so that it is returned to the pool. |
buffer = nullptr; |
// Check that the pool doesn't try to reuse buffers of incorrect size. |
buffer = pool.CreateBuffer(32, 16); |
EXPECT_EQ(32, buffer->width()); |
EXPECT_EQ(16, buffer->height()); |
- EXPECT_NE(u_ptr, buffer->data(kUPlane)); |
- EXPECT_NE(v_ptr, buffer->data(kVPlane)); |
+ EXPECT_NE(u_ptr, buffer->DataU()); |
+ EXPECT_NE(v_ptr, buffer->DataV()); |
} |
TEST(TestI420BufferPool, ExclusiveOwner) { |
@@ -68,7 +68,7 @@ TEST(TestI420BufferPool, FrameValidAfterPoolDestruction) { |
EXPECT_EQ(16, buffer->width()); |
EXPECT_EQ(16, buffer->height()); |
// Try to trigger use-after-free errors by writing to y-plane. |
- memset(buffer->MutableData(kYPlane), 0xA5, 16 * buffer->stride(kYPlane)); |
+ memset(buffer->MutableDataY(), 0xA5, 16 * buffer->StrideY()); |
} |
} // namespace webrtc |