Use base/scoped_ptr.h; system_wrappers/interface/scoped_ptr.h is going away

BUG=
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36229004

Cr-Commit-Position: refs/heads/master@{#8517}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8517 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kwiberg@webrtc.org
2015-02-26 14:34:55 +00:00
parent ac2d27d9ae
commit 00b8f6b364
391 changed files with 1427 additions and 1402 deletions

View File

@ -9,10 +9,10 @@
*/
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_audio/vad/mock/mock_vad.h"
#include "webrtc/modules/audio_coding/codecs/cng/include/audio_encoder_cng.h"
#include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
using ::testing::Return;
using ::testing::_;
@ -176,7 +176,7 @@ class AudioEncoderCngTest : public ::testing::Test {
}
AudioEncoderCng::Config config_;
scoped_ptr<AudioEncoderCng> cng_;
rtc::scoped_ptr<AudioEncoderCng> cng_;
MockAudioEncoder mock_encoder_;
MockVad* mock_vad_; // Ownership is transferred to |cng_|.
uint32_t timestamp_;

View File

@ -13,10 +13,10 @@
#include <vector>
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_audio/vad/include/vad.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
@ -63,7 +63,7 @@ class AudioEncoderCng final : public AudioEncoder {
private:
// Deleter for use with scoped_ptr. E.g., use as
// scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
// rtc::scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
struct CngInstDeleter {
inline void operator()(CNG_enc_inst* ptr) const { WebRtcCng_FreeEnc(ptr); }
};
@ -81,8 +81,8 @@ class AudioEncoderCng final : public AudioEncoder {
uint32_t first_timestamp_in_buffer_;
int frames_in_buffer_;
bool last_frame_active_;
scoped_ptr<Vad> vad_;
scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
rtc::scoped_ptr<Vad> vad_;
rtc::scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
};
} // namespace webrtc

View File

@ -11,9 +11,9 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_INCLUDE_AUDIO_ENCODER_G722_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_INCLUDE_AUDIO_ENCODER_G722_H_
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
@ -47,8 +47,8 @@ class AudioEncoderG722 : public AudioEncoder {
// The encoder state for one channel.
struct EncoderState {
G722EncInst* encoder;
scoped_ptr<int16_t[]> speech_buffer; // Queued up for encoding.
scoped_ptr<uint8_t[]> encoded_buffer; // Already encoded.
rtc::scoped_ptr<int16_t[]> speech_buffer; // Queued up for encoding.
rtc::scoped_ptr<uint8_t[]> encoded_buffer; // Already encoded.
EncoderState();
~EncoderState();
};
@ -58,8 +58,8 @@ class AudioEncoderG722 : public AudioEncoder {
const int num_10ms_frames_per_packet_;
int num_10ms_frames_buffered_;
uint32_t first_timestamp_in_buffer_;
const scoped_ptr<EncoderState[]> encoders_;
const scoped_ptr<uint8_t[]> interleave_buffer_;
const rtc::scoped_ptr<EncoderState[]> encoders_;
const rtc::scoped_ptr<uint8_t[]> interleave_buffer_;
};
} // namespace webrtc

View File

@ -11,9 +11,9 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_INTERFACE_AUDIO_ENCODER_ILBC_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_INTERFACE_AUDIO_ENCODER_ILBC_H_
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {

View File

@ -13,10 +13,10 @@
#include <vector>
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
@ -112,14 +112,14 @@ class AudioEncoderDecoderIsacT : public AudioEncoder, public AudioDecoder {
// iSAC encoder/decoder state, guarded by a mutex to ensure that encode calls
// from one thread won't clash with decode calls from another thread.
// Note: PT_GUARDED_BY is disabled since it is not yet supported by clang.
const scoped_ptr<CriticalSectionWrapper> state_lock_;
const rtc::scoped_ptr<CriticalSectionWrapper> state_lock_;
typename T::instance_type* isac_state_
GUARDED_BY(state_lock_) /* PT_GUARDED_BY(lock_)*/;
int decoder_sample_rate_hz_ GUARDED_BY(state_lock_);
// Must be acquired before state_lock_.
const scoped_ptr<CriticalSectionWrapper> lock_;
const rtc::scoped_ptr<CriticalSectionWrapper> lock_;
// Have we accepted input but not yet emitted it in a packet?
bool packet_in_progress_ GUARDED_BY(lock_);

View File

@ -11,8 +11,8 @@
#include <stdlib.h>
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_isac.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {

View File

@ -9,8 +9,8 @@
*/
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
@ -32,7 +32,7 @@ class AudioEncoderOpusTest : public ::testing::Test {
}
}
scoped_ptr<AudioEncoderOpus> opus_;
rtc::scoped_ptr<AudioEncoderOpus> opus_;
};
namespace {

View File

@ -9,9 +9,9 @@
*/
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
using ::std::string;
using ::std::tr1::tuple;
@ -60,9 +60,9 @@ class OpusFecTest : public TestWithParam<coding_param> {
string in_filename_;
scoped_ptr<int16_t[]> in_data_;
scoped_ptr<int16_t[]> out_data_;
scoped_ptr<uint8_t[]> bit_stream_;
rtc::scoped_ptr<int16_t[]> in_data_;
rtc::scoped_ptr<int16_t[]> out_data_;
rtc::scoped_ptr<uint8_t[]> bit_stream_;
};
void OpusFecTest::SetUp() {

View File

@ -13,8 +13,8 @@
#include <vector>
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
namespace webrtc {
@ -53,7 +53,7 @@ class AudioEncoderCopyRed : public AudioEncoder {
private:
AudioEncoder* speech_encoder_;
int red_payload_type_;
scoped_ptr<uint8_t[]> secondary_encoded_;
rtc::scoped_ptr<uint8_t[]> secondary_encoded_;
size_t secondary_allocated_;
EncodedInfoLeaf secondary_info_;
};

View File

@ -10,9 +10,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
#include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
using ::testing::Return;
using ::testing::_;
@ -63,7 +63,7 @@ class AudioEncoderCopyRedTest : public ::testing::Test {
}
MockAudioEncoder mock_encoder_;
scoped_ptr<AudioEncoderCopyRed> red_;
rtc::scoped_ptr<AudioEncoderCopyRed> red_;
uint32_t timestamp_;
int16_t audio_[kMaxNumSamples];
const int sample_rate_hz_;

View File

@ -13,7 +13,7 @@
#include <string>
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@ -60,11 +60,11 @@ class AudioCodecSpeedTest : public testing::TestWithParam<coding_param> {
// Expected output number of samples-per-channel in a frame.
int output_length_sample_;
scoped_ptr<int16_t[]> in_data_;
scoped_ptr<int16_t[]> out_data_;
rtc::scoped_ptr<int16_t[]> in_data_;
rtc::scoped_ptr<int16_t[]> out_data_;
size_t data_pointer_;
size_t loop_length_samples_;
scoped_ptr<uint8_t[]> bit_stream_;
rtc::scoped_ptr<uint8_t[]> bit_stream_;
// Maximum number of bytes in output bitstream for a frame of audio.
int max_bytes_;