summaryrefslogtreecommitdiffstats
path: root/remoting/codec
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 20:13:23 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 20:13:23 +0000
commitc84c53d4f885f1b355213c575197255ea0945daf (patch)
tree541ea1e98b56d44779f6cccf29017cc7a26ad57a /remoting/codec
parent7886251782519c0100a0b10d9185bc4e0026023b (diff)
downloadchromium_src-c84c53d4f885f1b355213c575197255ea0945daf.zip
chromium_src-c84c53d4f885f1b355213c575197255ea0945daf.tar.gz
chromium_src-c84c53d4f885f1b355213c575197255ea0945daf.tar.bz2
Rewrite scoped_array<T> to scoped_ptr<T[]> in remoting/, Linux edition.
This changelist was automatically generated using a clang tool. BUG=171111 Review URL: https://codereview.chromium.org/13642007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192873 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/codec')
-rw-r--r--remoting/codec/audio_encoder_opus.h4
-rw-r--r--remoting/codec/audio_encoder_speex.h2
-rw-r--r--remoting/codec/codec_test.cc12
-rw-r--r--remoting/codec/video_decoder_verbatim.h2
-rw-r--r--remoting/codec/video_encoder_vp8.h4
5 files changed, 12 insertions, 12 deletions
diff --git a/remoting/codec/audio_encoder_opus.h b/remoting/codec/audio_encoder_opus.h
index 7f610d4..6799836 100644
--- a/remoting/codec/audio_encoder_opus.h
+++ b/remoting/codec/audio_encoder_opus.h
@@ -43,7 +43,7 @@ class AudioEncoderOpus : public AudioEncoder {
int frame_size_;
scoped_ptr<media::MultiChannelResampler> resampler_;
- scoped_array<char> resample_buffer_;
+ scoped_ptr<char[]> resample_buffer_;
scoped_ptr<media::AudioBus> resampler_bus_;
// Used to pass packet to the FetchBytesToResampler() callback.
@@ -52,7 +52,7 @@ class AudioEncoderOpus : public AudioEncoder {
int resampling_data_pos_;
// Left-over unencoded samples from the previous AudioPacket.
- scoped_array<int16> leftover_buffer_;
+ scoped_ptr<int16[]> leftover_buffer_;
int leftover_buffer_size_;
int leftover_samples_;
diff --git a/remoting/codec/audio_encoder_speex.h b/remoting/codec/audio_encoder_speex.h
index 372f36b..9cbdf59 100644
--- a/remoting/codec/audio_encoder_speex.h
+++ b/remoting/codec/audio_encoder_speex.h
@@ -30,7 +30,7 @@ class AudioEncoderSpeex : public AudioEncoder {
void* speex_state_;
int speex_frame_size_;
- scoped_array<int16> leftover_buffer_;
+ scoped_ptr<int16[]> leftover_buffer_;
// We may have some left-over unencoded frames from the previous AudioPacket.
int leftover_frames_;
diff --git a/remoting/codec/codec_test.cc b/remoting/codec/codec_test.cc
index 7c87307..af8b11b 100644
--- a/remoting/codec/codec_test.cc
+++ b/remoting/codec/codec_test.cc
@@ -271,7 +271,7 @@ class VideoDecoderTester {
SkRegion expected_region_;
SkRegion update_region_;
VideoDecoder* decoder_;
- scoped_array<uint8> image_data_;
+ scoped_ptr<uint8[]> image_data_;
scoped_refptr<media::ScreenCaptureData> capture_data_;
DISALLOW_COPY_AND_ASSIGN(VideoDecoderTester);
@@ -319,7 +319,7 @@ class VideoEncoderTester {
scoped_refptr<media::ScreenCaptureData> PrepareEncodeData(
const SkISize& size,
- scoped_array<uint8>* memory) {
+ scoped_ptr<uint8[]>* memory) {
int memory_size = size.width() * size.height() * kBytesPerPixel;
memory->reset(new uint8[memory_size]);
@@ -356,7 +356,7 @@ void TestVideoEncoder(VideoEncoder* encoder, bool strict) {
VideoEncoderTester tester(&message_tester);
- scoped_array<uint8> memory;
+ scoped_ptr<uint8[]> memory;
for (size_t xi = 0; xi < arraysize(kSizes); ++xi) {
for (size_t yi = 0; yi < arraysize(kSizes); ++yi) {
@@ -413,7 +413,7 @@ void TestVideoEncoderDecoder(
VideoEncoderTester encoder_tester(&message_tester);
- scoped_array<uint8> memory;
+ scoped_ptr<uint8[]> memory;
scoped_refptr<media::ScreenCaptureData> data =
PrepareEncodeData(kSize, &memory);
@@ -451,12 +451,12 @@ void TestVideoEncoderDecoderGradient(VideoEncoder* encoder,
double max_error_limit,
double mean_error_limit) {
SkIRect screen_rect = SkIRect::MakeSize(screen_size);
- scoped_array<uint8> screen_data(new uint8[
+ scoped_ptr<uint8[]> screen_data(new uint8[
screen_size.width() * screen_size.height() * kBytesPerPixel]);
FillWithGradient(screen_data.get(), screen_size, screen_rect);
SkIRect view_rect = SkIRect::MakeSize(view_size);
- scoped_array<uint8> expected_view_data(new uint8[
+ scoped_ptr<uint8[]> expected_view_data(new uint8[
view_size.width() * view_size.height() * kBytesPerPixel]);
FillWithGradient(expected_view_data.get(), view_size, view_rect);
diff --git a/remoting/codec/video_decoder_verbatim.h b/remoting/codec/video_decoder_verbatim.h
index 8c25013..46c7069 100644
--- a/remoting/codec/video_decoder_verbatim.h
+++ b/remoting/codec/video_decoder_verbatim.h
@@ -65,7 +65,7 @@ class VideoDecoderVerbatim : public VideoDecoder {
SkISize screen_size_;
// The bitmap holding the remote screen bits.
- scoped_array<uint8> screen_buffer_;
+ scoped_ptr<uint8[]> screen_buffer_;
DISALLOW_COPY_AND_ASSIGN(VideoDecoderVerbatim);
};
diff --git a/remoting/codec/video_encoder_vp8.h b/remoting/codec/video_encoder_vp8.h
index 4b3f903..f26fad3 100644
--- a/remoting/codec/video_encoder_vp8.h
+++ b/remoting/codec/video_encoder_vp8.h
@@ -48,13 +48,13 @@ class VideoEncoderVp8 : public VideoEncoder {
scoped_ptr<vpx_codec_ctx_t> codec_;
scoped_ptr<vpx_image_t> image_;
- scoped_array<uint8> active_map_;
+ scoped_ptr<uint8[]> active_map_;
int active_map_width_;
int active_map_height_;
int last_timestamp_;
// Buffer for storing the yuv image.
- scoped_array<uint8> yuv_image_;
+ scoped_ptr<uint8[]> yuv_image_;
DISALLOW_COPY_AND_ASSIGN(VideoEncoderVp8);
};