diff options
author | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-04-25 23:10:28 +0000 |
---|---|---|
committer | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-04-25 23:10:28 +0000 |
commit | ba47616ee5a8d8a4d94e160b64b79a56845e291b (patch) | |
tree | 1b7c6445147e8d271e3bf09b381d69d800f2dd01 /modules/video_coding | |
parent | b10fcf5bca8208c5330acad5122c80a17e8226dd (diff) | |
download | webrtc-ba47616ee5a8d8a4d94e160b64b79a56845e291b.tar.gz |
Replace scoped_array<T> with scoped_ptr<T[]>.
scoped_array is deprecated. This was done using a Chromium clang tool:
http://src.chromium.org/viewvc/chrome/trunk/src/tools/clang/rewrite_scoped_ar...
except for the few not-built-on-Linux files which were updated manually.
TESTED=trybots
BUG=2515
R=niklas.enbom@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/12429004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5985 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'modules/video_coding')
5 files changed, 7 insertions, 7 deletions
diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc index 30ee6a8e..93738caf 100644 --- a/modules/video_coding/codecs/test/videoprocessor.cc +++ b/modules/video_coding/codecs/test/videoprocessor.cc @@ -331,7 +331,7 @@ void VideoProcessorImpl::FrameDecoded(const I420VideoFrame& image) { } // TODO(mikhal): Extracting the buffer for now - need to update test. int length = CalcBufferSize(kI420, up_image.width(), up_image.height()); - scoped_array<uint8_t> image_buffer(new uint8_t[length]); + scoped_ptr<uint8_t[]> image_buffer(new uint8_t[length]); length = ExtractBuffer(up_image, length, image_buffer.get()); // Update our copy of the last successful frame: memcpy(last_successful_frame_buffer_, image_buffer.get(), length); @@ -344,7 +344,7 @@ void VideoProcessorImpl::FrameDecoded(const I420VideoFrame& image) { // Update our copy of the last successful frame: // TODO(mikhal): Add as a member function, so won't be allocated per frame. int length = CalcBufferSize(kI420, image.width(), image.height()); - scoped_array<uint8_t> image_buffer(new uint8_t[length]); + scoped_ptr<uint8_t[]> image_buffer(new uint8_t[length]); length = ExtractBuffer(image, length, image_buffer.get()); assert(length > 0); memcpy(last_successful_frame_buffer_, image_buffer.get(), length); diff --git a/modules/video_coding/codecs/test_framework/unit_test.cc b/modules/video_coding/codecs/test_framework/unit_test.cc index 3b034e01..ec12a516 100644 --- a/modules/video_coding/codecs/test_framework/unit_test.cc +++ b/modules/video_coding/codecs/test_framework/unit_test.cc @@ -565,7 +565,7 @@ UnitTest::Perform() frameLength = WaitForDecodedFrame(); } unsigned int length = CalcBufferSize(kI420, width, height); - scoped_array<uint8_t> decoded_buffer(new uint8_t[length]); + scoped_ptr<uint8_t[]> decoded_buffer(new uint8_t[length]); ExtractBuffer(_decodedVideoBuffer, _lengthSourceFrame, decoded_buffer.get()); EXPECT_TRUE(CheckIfBitExact(decoded_buffer.get(), frameLength, _refDecFrame, @@ -645,7 +645,7 @@ UnitTest::Perform() // check that decoded frame matches with reference unsigned int length = CalcBufferSize(kI420, width, height); - scoped_array<uint8_t> decoded_buffer(new uint8_t[length]); + scoped_ptr<uint8_t[]> decoded_buffer(new uint8_t[length]); ExtractBuffer(_decodedVideoBuffer, length, decoded_buffer.get()); EXPECT_TRUE(CheckIfBitExact(decoded_buffer.get(), length, _refDecFrame, _lengthSourceFrame) == true); diff --git a/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc index ff99ed27..3cc8bc33 100644 --- a/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc +++ b/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc @@ -181,7 +181,7 @@ class TestVp8Impl : public ::testing::Test { scoped_ptr<Vp8UnitTestEncodeCompleteCallback> encode_complete_callback_; scoped_ptr<Vp8UnitTestDecodeCompleteCallback> decode_complete_callback_; - scoped_array<uint8_t> source_buffer_; + scoped_ptr<uint8_t[]> source_buffer_; FILE* source_file_; I420VideoFrame input_frame_; scoped_ptr<VideoEncoder> encoder_; diff --git a/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc b/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc index 1bd3e1a6..ffa0bcc6 100644 --- a/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc +++ b/modules/video_coding/codecs/vp8/vp8_sequence_coder.cc @@ -142,7 +142,7 @@ int SequenceCoder(webrtc::test::CommandLineParser& parser) { EXPECT_EQ(0, decoder->InitDecode(&inst, 1)); webrtc::I420VideoFrame input_frame; unsigned int length = webrtc::CalcBufferSize(webrtc::kI420, width, height); - webrtc::scoped_array<uint8_t> frame_buffer(new uint8_t[length]); + webrtc::scoped_ptr<uint8_t[]> frame_buffer(new uint8_t[length]); int half_width = (width + 1) / 2; // Set and register callbacks. diff --git a/modules/video_coding/main/test/rtp_player.cc b/modules/video_coding/main/test/rtp_player.cc index e314a7c9..f02aebba 100644 --- a/modules/video_coding/main/test/rtp_player.cc +++ b/modules/video_coding/main/test/rtp_player.cc @@ -61,7 +61,7 @@ class RawRtpPacket { uint16_t seq_num() const { return seq_num_; } private: - scoped_array<uint8_t> data_; + scoped_ptr<uint8_t[]> data_; uint32_t length_; int64_t resend_time_ms_; uint32_t ssrc_; |