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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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
Index: webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
diff --git a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
index a47c209ad42945bbe4de5cd7b110aabbf3b85e1c..85b697df5a2bdaf538cff7eae03f5307e3ca82ba 100644
--- a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
@@ -130,7 +130,7 @@ class TestVp8Impl : public ::testing::Test {
decoder_.reset(VP8Decoder::Create());
memset(&codec_inst_, 0, sizeof(codec_inst_));
encode_complete_callback_.reset(
- new Vp8UnitTestEncodeCompleteCallback(&encoded_frame_, 0, NULL));
+ new Vp8UnitTestEncodeCompleteCallback(&encoded_frame_, 0, nullptr));
decode_complete_callback_.reset(
new Vp8UnitTestDecodeCompleteCallback(&decoded_frame_));
encoder_->RegisterEncodeCompleteCallback(encode_complete_callback_.get());
@@ -138,7 +138,7 @@ class TestVp8Impl : public ::testing::Test {
// Using a QCIF image (aligned stride (u,v planes) > width).
// Processing only one frame.
source_file_ = fopen(test::ResourcePath("paris_qcif", "yuv").c_str(), "rb");
- ASSERT_TRUE(source_file_ != NULL);
+ ASSERT_TRUE(source_file_ != nullptr);
rtc::scoped_refptr<VideoFrameBuffer> compact_buffer(
test::ReadI420Buffer(kWidth, kHeight, source_file_));
ASSERT_TRUE(compact_buffer);
@@ -251,13 +251,13 @@ TEST_F(TestVp8Impl, EncoderParameterTest) {
#endif
TEST_F(TestVp8Impl, MAYBE_AlignedStrideEncodeDecode) {
SetUpEncodeDecode();
- encoder_->Encode(*input_frame_, NULL, NULL);
+ encoder_->Encode(*input_frame_, nullptr, nullptr);
EXPECT_GT(WaitForEncodedFrame(), 0u);
// First frame should be a key frame.
encoded_frame_._frameType = kVideoFrameKey;
encoded_frame_.ntp_time_ms_ = kTestNtpTimeMs;
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
- decoder_->Decode(encoded_frame_, false, NULL));
+ decoder_->Decode(encoded_frame_, false, nullptr));
EXPECT_GT(WaitForDecodedFrame(), 0u);
ASSERT_TRUE(decoded_frame_);
// Compute PSNR on all planes (faster than SSIM).
@@ -273,21 +273,21 @@ TEST_F(TestVp8Impl, MAYBE_AlignedStrideEncodeDecode) {
#endif
TEST_F(TestVp8Impl, MAYBE_DecodeWithACompleteKeyFrame) {
SetUpEncodeDecode();
- encoder_->Encode(*input_frame_, NULL, NULL);
+ encoder_->Encode(*input_frame_, nullptr, nullptr);
EXPECT_GT(WaitForEncodedFrame(), 0u);
// Setting complete to false -> should return an error.
encoded_frame_._completeFrame = false;
EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR,
- decoder_->Decode(encoded_frame_, false, NULL));
+ decoder_->Decode(encoded_frame_, false, nullptr));
// Setting complete back to true. Forcing a delta frame.
encoded_frame_._frameType = kVideoFrameDelta;
encoded_frame_._completeFrame = true;
EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR,
- decoder_->Decode(encoded_frame_, false, NULL));
+ decoder_->Decode(encoded_frame_, false, nullptr));
// Now setting a key frame.
encoded_frame_._frameType = kVideoFrameKey;
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
- decoder_->Decode(encoded_frame_, false, NULL));
+ decoder_->Decode(encoded_frame_, false, nullptr));
ASSERT_TRUE(decoded_frame_);
EXPECT_GT(I420PSNR(input_frame_.get(), &*decoded_frame_), 36);
}

Powered by Google App Engine
This is Rietveld 408576698