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:
@ -17,7 +17,7 @@ extern "C" {
|
||||
#include "opus_private.h"
|
||||
}
|
||||
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -39,7 +39,7 @@ void RunAnalysisTest(const std::string& audio_filename,
|
||||
const std::string& data_filename,
|
||||
size_t channels) {
|
||||
AudioClassifier classifier;
|
||||
scoped_ptr<int16_t[]> in(new int16_t[channels * kFrameSize]);
|
||||
rtc::scoped_ptr<int16_t[]> in(new int16_t[channels * kFrameSize]);
|
||||
bool is_music_ref;
|
||||
|
||||
FILE* audio_file = fopen(audio_filename.c_str(), "rb");
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/g711/include/audio_encoder_pcm.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/ilbc/interface/audio_encoder_ilbc.h"
|
||||
@ -26,7 +27,6 @@
|
||||
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/audio_encoder_pcm16b.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
|
||||
#include "webrtc/system_wrappers/interface/data_log.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -139,7 +139,7 @@ class AudioDecoderTest : public ::testing::Test {
|
||||
const size_t samples_per_10ms = audio_encoder_->SampleRateHz() / 100;
|
||||
CHECK_EQ(samples_per_10ms * audio_encoder_->Num10MsFramesInNextPacket(),
|
||||
input_len_samples);
|
||||
scoped_ptr<int16_t[]> interleaved_input(
|
||||
rtc::scoped_ptr<int16_t[]> interleaved_input(
|
||||
new int16_t[channels_ * samples_per_10ms]);
|
||||
for (int i = 0; i < audio_encoder_->Num10MsFramesInNextPacket(); ++i) {
|
||||
EXPECT_EQ(0u, encoded_info_.encoded_bytes);
|
||||
@ -213,21 +213,21 @@ class AudioDecoderTest : public ::testing::Test {
|
||||
// decode. Verifies that the decoded result is the same.
|
||||
void ReInitTest() {
|
||||
InitEncoder();
|
||||
scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
|
||||
rtc::scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
|
||||
ASSERT_TRUE(
|
||||
input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
|
||||
size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
|
||||
size_t dec_len;
|
||||
AudioDecoder::SpeechType speech_type1, speech_type2;
|
||||
EXPECT_EQ(0, decoder_->Init());
|
||||
scoped_ptr<int16_t[]> output1(new int16_t[frame_size_ * channels_]);
|
||||
rtc::scoped_ptr<int16_t[]> output1(new int16_t[frame_size_ * channels_]);
|
||||
dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
|
||||
output1.get(), &speech_type1);
|
||||
ASSERT_LE(dec_len, frame_size_ * channels_);
|
||||
EXPECT_EQ(frame_size_ * channels_, dec_len);
|
||||
// Re-init decoder and decode again.
|
||||
EXPECT_EQ(0, decoder_->Init());
|
||||
scoped_ptr<int16_t[]> output2(new int16_t[frame_size_ * channels_]);
|
||||
rtc::scoped_ptr<int16_t[]> output2(new int16_t[frame_size_ * channels_]);
|
||||
dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
|
||||
output2.get(), &speech_type2);
|
||||
ASSERT_LE(dec_len, frame_size_ * channels_);
|
||||
@ -241,13 +241,13 @@ class AudioDecoderTest : public ::testing::Test {
|
||||
// Call DecodePlc and verify that the correct number of samples is produced.
|
||||
void DecodePlcTest() {
|
||||
InitEncoder();
|
||||
scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
|
||||
rtc::scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
|
||||
ASSERT_TRUE(
|
||||
input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
|
||||
size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
|
||||
AudioDecoder::SpeechType speech_type;
|
||||
EXPECT_EQ(0, decoder_->Init());
|
||||
scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
|
||||
rtc::scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
|
||||
size_t dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
|
||||
output.get(), &speech_type);
|
||||
EXPECT_EQ(frame_size_ * channels_, dec_len);
|
||||
@ -268,7 +268,7 @@ class AudioDecoderTest : public ::testing::Test {
|
||||
const int payload_type_;
|
||||
AudioEncoder::EncodedInfo encoded_info_;
|
||||
AudioDecoder* decoder_;
|
||||
scoped_ptr<AudioEncoder> audio_encoder_;
|
||||
rtc::scoped_ptr<AudioEncoder> audio_encoder_;
|
||||
};
|
||||
|
||||
class AudioDecoderPcmUTest : public AudioDecoderTest {
|
||||
@ -332,13 +332,13 @@ class AudioDecoderIlbcTest : public AudioDecoderTest {
|
||||
// not return any data. It simply resets a few states and returns 0.
|
||||
void DecodePlcTest() {
|
||||
InitEncoder();
|
||||
scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
|
||||
rtc::scoped_ptr<int16_t[]> input(new int16_t[frame_size_]);
|
||||
ASSERT_TRUE(
|
||||
input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
|
||||
size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
|
||||
AudioDecoder::SpeechType speech_type;
|
||||
EXPECT_EQ(0, decoder_->Init());
|
||||
scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
|
||||
rtc::scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
|
||||
size_t dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
|
||||
output.get(), &speech_type);
|
||||
EXPECT_EQ(frame_size_, dec_len);
|
||||
|
||||
@ -155,7 +155,7 @@ int16_t& AudioVector::operator[](size_t index) {
|
||||
|
||||
void AudioVector::Reserve(size_t n) {
|
||||
if (capacity_ < n) {
|
||||
scoped_ptr<int16_t[]> temp_array(new int16_t[n]);
|
||||
rtc::scoped_ptr<int16_t[]> temp_array(new int16_t[n]);
|
||||
memcpy(temp_array.get(), array_.get(), Size() * sizeof(int16_t));
|
||||
array_.swap(temp_array);
|
||||
capacity_ = n;
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include <string.h> // Access to size_t.
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -108,7 +108,7 @@ class AudioVector {
|
||||
|
||||
void Reserve(size_t n);
|
||||
|
||||
scoped_ptr<int16_t[]> array_;
|
||||
rtc::scoped_ptr<int16_t[]> array_;
|
||||
size_t first_free_ix_; // The first index after the last sample in array_.
|
||||
// Note that this index may point outside of array_.
|
||||
size_t capacity_; // Allocated number of samples in the array.
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
#include <string.h> // size_t
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -126,7 +126,7 @@ class BackgroundNoise {
|
||||
int32_t residual_energy);
|
||||
|
||||
size_t num_channels_;
|
||||
scoped_ptr<ChannelParameters[]> channel_parameters_;
|
||||
rtc::scoped_ptr<ChannelParameters[]> channel_parameters_;
|
||||
bool initialized_;
|
||||
NetEq::BackgroundNoiseMode mode_;
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -167,7 +167,7 @@ class Expand {
|
||||
int lag_index_direction_;
|
||||
int current_lag_index_;
|
||||
bool stop_muting_;
|
||||
scoped_ptr<ChannelParameters[]> channel_parameters_;
|
||||
rtc::scoped_ptr<ChannelParameters[]> channel_parameters_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Expand);
|
||||
};
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
|
||||
#include <algorithm> // min, max
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/dsp_helper.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/expand.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -310,7 +310,8 @@ int16_t Merge::CorrelateAndPeakSearch(int16_t expanded_max, int16_t input_max,
|
||||
// Normalize correlation to 14 bits and copy to a 16-bit array.
|
||||
const int pad_length = static_cast<int>(expand_->overlap_length() - 1);
|
||||
const int correlation_buffer_size = 2 * pad_length + kMaxCorrelationLength;
|
||||
scoped_ptr<int16_t[]> correlation16(new int16_t[correlation_buffer_size]);
|
||||
rtc::scoped_ptr<int16_t[]> correlation16(
|
||||
new int16_t[correlation_buffer_size]);
|
||||
memset(correlation16.get(), 0, correlation_buffer_size * sizeof(int16_t));
|
||||
int16_t* correlation_ptr = &correlation16[pad_length];
|
||||
int32_t max_correlation = WebRtcSpl_MaxAbsValueW32(correlation,
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
// Test to verify correct operation for externally created decoders.
|
||||
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -148,16 +148,16 @@ class NetEqExternalDecoderUnitTest : public test::NetEqExternalDecoderTest {
|
||||
|
||||
int samples_per_ms() const { return samples_per_ms_; }
|
||||
private:
|
||||
scoped_ptr<MockExternalPcm16B> external_decoder_;
|
||||
rtc::scoped_ptr<MockExternalPcm16B> external_decoder_;
|
||||
int samples_per_ms_;
|
||||
size_t frame_size_samples_;
|
||||
scoped_ptr<test::RtpGenerator> rtp_generator_;
|
||||
rtc::scoped_ptr<test::RtpGenerator> rtp_generator_;
|
||||
int16_t* input_;
|
||||
uint8_t* encoded_;
|
||||
size_t payload_size_bytes_;
|
||||
uint32_t last_send_time_;
|
||||
uint32_t last_arrival_time_;
|
||||
scoped_ptr<test::InputAudioFile> input_file_;
|
||||
rtc::scoped_ptr<test::InputAudioFile> input_file_;
|
||||
WebRtcRTPHeader rtp_header_;
|
||||
};
|
||||
|
||||
@ -228,7 +228,7 @@ class NetEqExternalVsInternalDecoderTest : public NetEqExternalDecoderUnitTest,
|
||||
|
||||
private:
|
||||
int sample_rate_hz_;
|
||||
scoped_ptr<NetEq> neteq_internal_;
|
||||
rtc::scoped_ptr<NetEq> neteq_internal_;
|
||||
int16_t output_internal_[kMaxBlockSize];
|
||||
int16_t output_[kMaxBlockSize];
|
||||
};
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/base/thread_annotations.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/defines.h"
|
||||
@ -22,7 +23,6 @@
|
||||
#include "webrtc/modules/audio_coding/neteq/random_vector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/rtcp.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/statistics_calculator.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -334,37 +334,40 @@ class NetEqImpl : public webrtc::NetEq {
|
||||
// Creates DecisionLogic object with the mode given by |playout_mode_|.
|
||||
virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||
|
||||
const scoped_ptr<CriticalSectionWrapper> crit_sect_;
|
||||
const scoped_ptr<BufferLevelFilter> buffer_level_filter_
|
||||
const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
|
||||
const rtc::scoped_ptr<BufferLevelFilter> buffer_level_filter_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<DecoderDatabase> decoder_database_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<DelayPeakDetector> delay_peak_detector_
|
||||
const rtc::scoped_ptr<DecoderDatabase> decoder_database_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<DtmfToneGenerator> dtmf_tone_generator_
|
||||
const rtc::scoped_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<DelayPeakDetector> delay_peak_detector_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<PacketBuffer> packet_buffer_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<PayloadSplitter> payload_splitter_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<TimestampScaler> timestamp_scaler_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<PostDecodeVad> vad_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<ExpandFactory> expand_factory_ GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<AccelerateFactory> accelerate_factory_
|
||||
const rtc::scoped_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<DtmfToneGenerator> dtmf_tone_generator_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const scoped_ptr<PreemptiveExpandFactory> preemptive_expand_factory_
|
||||
const rtc::scoped_ptr<PacketBuffer> packet_buffer_ GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<PayloadSplitter> payload_splitter_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<TimestampScaler> timestamp_scaler_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<PostDecodeVad> vad_ GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<ExpandFactory> expand_factory_ GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<AccelerateFactory> accelerate_factory_
|
||||
GUARDED_BY(crit_sect_);
|
||||
const rtc::scoped_ptr<PreemptiveExpandFactory> preemptive_expand_factory_
|
||||
GUARDED_BY(crit_sect_);
|
||||
|
||||
scoped_ptr<BackgroundNoise> background_noise_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<DecisionLogic> decision_logic_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<AudioMultiVector> algorithm_buffer_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<SyncBuffer> sync_buffer_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<Expand> expand_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<Normal> normal_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<Merge> merge_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<Accelerate> accelerate_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<PreemptiveExpand> preemptive_expand_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<BackgroundNoise> background_noise_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<DecisionLogic> decision_logic_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<AudioMultiVector> algorithm_buffer_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<SyncBuffer> sync_buffer_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<Expand> expand_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<Normal> normal_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<Merge> merge_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<Accelerate> accelerate_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<PreemptiveExpand> preemptive_expand_ GUARDED_BY(crit_sect_);
|
||||
RandomVector random_vector_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_);
|
||||
Rtcp rtcp_ GUARDED_BY(crit_sect_);
|
||||
StatisticsCalculator stats_ GUARDED_BY(crit_sect_);
|
||||
int fs_hz_ GUARDED_BY(crit_sect_);
|
||||
@ -372,9 +375,9 @@ class NetEqImpl : public webrtc::NetEq {
|
||||
int output_size_samples_ GUARDED_BY(crit_sect_);
|
||||
int decoder_frame_length_ GUARDED_BY(crit_sect_);
|
||||
Modes last_mode_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_);
|
||||
size_t decoded_buffer_length_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_);
|
||||
uint32_t playout_timestamp_ GUARDED_BY(crit_sect_);
|
||||
bool new_codec_ GUARDED_BY(crit_sect_);
|
||||
uint32_t timestamp_ GUARDED_BY(crit_sect_);
|
||||
|
||||
@ -9,10 +9,10 @@
|
||||
*/
|
||||
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/neteq_external_decoder_test.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -259,7 +259,7 @@ struct NetEqNetworkStatsCheck {
|
||||
MockAudioDecoderOpus* external_decoder_;
|
||||
const int samples_per_ms_;
|
||||
const size_t frame_size_samples_;
|
||||
scoped_ptr<test::RtpGenerator> rtp_generator_;
|
||||
rtc::scoped_ptr<test::RtpGenerator> rtp_generator_;
|
||||
WebRtcRTPHeader rtp_header_;
|
||||
uint32_t last_lost_time_;
|
||||
uint32_t packet_loss_interval_;
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
#include <list>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
|
||||
@ -260,7 +260,7 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
|
||||
int multi_payload_size_bytes_;
|
||||
int last_send_time_;
|
||||
int last_arrival_time_;
|
||||
scoped_ptr<test::InputAudioFile> input_file_;
|
||||
rtc::scoped_ptr<test::InputAudioFile> input_file_;
|
||||
};
|
||||
|
||||
class NetEqStereoTestNoJitter : public NetEqStereoTest {
|
||||
|
||||
@ -25,10 +25,10 @@
|
||||
|
||||
#include "gflags/gflags.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
@ -262,8 +262,8 @@ class NetEqDecodingTest : public ::testing::Test {
|
||||
|
||||
NetEq* neteq_;
|
||||
NetEq::Config config_;
|
||||
scoped_ptr<test::RtpFileSource> rtp_source_;
|
||||
scoped_ptr<test::Packet> packet_;
|
||||
rtc::scoped_ptr<test::RtpFileSource> rtp_source_;
|
||||
rtc::scoped_ptr<test::Packet> packet_;
|
||||
unsigned int sim_clock_;
|
||||
int16_t out_data_[kMaxBlockSize];
|
||||
int output_sample_rate_;
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/background_noise.h"
|
||||
@ -23,7 +24,6 @@
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_expand.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/random_vector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
using ::testing::_;
|
||||
|
||||
@ -53,7 +53,7 @@ TEST(Normal, AvoidDivideByZero) {
|
||||
Normal normal(fs, &db, bgn, &expand);
|
||||
|
||||
int16_t input[1000] = {0};
|
||||
scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
|
||||
rtc::scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
|
||||
for (size_t i = 0; i < channels; ++i) {
|
||||
mute_factor_array[i] = 16384;
|
||||
}
|
||||
@ -97,7 +97,7 @@ TEST(Normal, InputLengthAndChannelsDoNotMatch) {
|
||||
Normal normal(fs, &db, bgn, &expand);
|
||||
|
||||
int16_t input[1000] = {0};
|
||||
scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
|
||||
rtc::scoped_ptr<int16_t[]> mute_factor_array(new int16_t[channels]);
|
||||
for (size_t i = 0; i < channels; ++i) {
|
||||
mute_factor_array[i] = 16384;
|
||||
}
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
#include <utility> // pair
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/packet.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
using ::testing::Return;
|
||||
using ::testing::ReturnNull;
|
||||
@ -371,27 +371,27 @@ TEST(AudioPayloadSplitter, NonSplittable) {
|
||||
// Tell the mock decoder database to return DecoderInfo structs with different
|
||||
// codec types.
|
||||
// Use scoped pointers to avoid having to delete them later.
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info0(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info0(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderISAC, 16000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(0))
|
||||
.WillRepeatedly(Return(info0.get()));
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info1(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info1(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderISACswb, 32000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(1))
|
||||
.WillRepeatedly(Return(info1.get()));
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info2(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info2(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderRED, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(2))
|
||||
.WillRepeatedly(Return(info2.get()));
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info3(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info3(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderAVT, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(3))
|
||||
.WillRepeatedly(Return(info3.get()));
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info4(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info4(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderCNGnb, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(4))
|
||||
.WillRepeatedly(Return(info4.get()));
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info5(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info5(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderArbitrary, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(5))
|
||||
.WillRepeatedly(Return(info5.get()));
|
||||
@ -529,7 +529,7 @@ TEST_P(SplitBySamplesTest, PayloadSizes) {
|
||||
// codec types.
|
||||
// Use scoped pointers to avoid having to delete them later.
|
||||
// (Sample rate is set to 8000 Hz, but does not matter.)
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
new DecoderDatabase::DecoderInfo(decoder_type_, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
|
||||
.WillRepeatedly(Return(info.get()));
|
||||
@ -608,7 +608,7 @@ TEST_P(SplitIlbcTest, NumFrames) {
|
||||
// Tell the mock decoder database to return DecoderInfo structs with different
|
||||
// codec types.
|
||||
// Use scoped pointers to avoid having to delete them later.
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderILBC, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
|
||||
.WillRepeatedly(Return(info.get()));
|
||||
@ -671,7 +671,7 @@ TEST(IlbcPayloadSplitter, TooLargePayload) {
|
||||
packet_list.push_back(packet);
|
||||
|
||||
MockDecoderDatabase decoder_database;
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderILBC, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
|
||||
.WillRepeatedly(Return(info.get()));
|
||||
@ -702,7 +702,7 @@ TEST(IlbcPayloadSplitter, UnevenPayload) {
|
||||
packet_list.push_back(packet);
|
||||
|
||||
MockDecoderDatabase decoder_database;
|
||||
scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
rtc::scoped_ptr<DecoderDatabase::DecoderInfo> info(
|
||||
new DecoderDatabase::DecoderInfo(kDecoderILBC, 8000, NULL, false));
|
||||
EXPECT_CALL(decoder_database, GetDecoderInfo(kPayloadType))
|
||||
.WillRepeatedly(Return(info.get()));
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc != 5) {
|
||||
@ -48,7 +48,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
const int data_size = channels * kFrameSizeSamples;
|
||||
webrtc::scoped_ptr<int16_t[]> in(new int16_t[data_size]);
|
||||
rtc::scoped_ptr<int16_t[]> in(new int16_t[data_size]);
|
||||
|
||||
std::string input_filename = argv[3];
|
||||
std::string output_filename = argv[4];
|
||||
|
||||
@ -12,10 +12,10 @@
|
||||
|
||||
#include <algorithm> // min, max
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/background_noise.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/dsp_helper.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -29,7 +29,7 @@ TimeStretch::ReturnCodes TimeStretch::Process(
|
||||
int fs_mult_120 = fs_mult_ * 120; // Corresponds to 15 ms.
|
||||
|
||||
const int16_t* signal;
|
||||
scoped_ptr<int16_t[]> signal_array;
|
||||
rtc::scoped_ptr<int16_t[]> signal_array;
|
||||
size_t signal_len;
|
||||
if (num_channels_ == 1) {
|
||||
signal = input;
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -49,7 +49,7 @@ class AudioLoop {
|
||||
size_t next_index_;
|
||||
size_t loop_length_samples_;
|
||||
size_t block_length_samples_;
|
||||
scoped_ptr<int16_t[]> audio_array_;
|
||||
rtc::scoped_ptr<int16_t[]> audio_array_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AudioLoop);
|
||||
};
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_EXTERNAL_DECODER_TEST_H_
|
||||
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_EXTERNAL_DECODER_TEST_H_
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
|
||||
#include "webrtc/modules/interface/module_common_types.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -52,7 +52,7 @@ class NetEqExternalDecoderTest {
|
||||
AudioDecoder* decoder_;
|
||||
int sample_rate_hz_;
|
||||
int channels_;
|
||||
scoped_ptr<NetEq> neteq_;
|
||||
rtc::scoped_ptr<NetEq> neteq_;
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
|
||||
@ -14,10 +14,10 @@
|
||||
#include <gflags/gflags.h>
|
||||
#include <string>
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
using google::RegisterFlagValidator;
|
||||
@ -57,7 +57,7 @@ class GilbertElliotLoss : public LossModel {
|
||||
// Prob. of losing current packet, when previous packet is not lost.
|
||||
double prob_trans_01_;
|
||||
bool lost_last_;
|
||||
scoped_ptr<UniformLoss> uniform_loss_model_;
|
||||
rtc::scoped_ptr<UniformLoss> uniform_loss_model_;
|
||||
};
|
||||
|
||||
class NetEqQualityTest : public ::testing::Test {
|
||||
@ -121,17 +121,17 @@ class NetEqQualityTest : public ::testing::Test {
|
||||
size_t payload_size_bytes_;
|
||||
int max_payload_bytes_;
|
||||
|
||||
scoped_ptr<InputAudioFile> in_file_;
|
||||
rtc::scoped_ptr<InputAudioFile> in_file_;
|
||||
FILE* out_file_;
|
||||
FILE* log_file_;
|
||||
|
||||
scoped_ptr<RtpGenerator> rtp_generator_;
|
||||
scoped_ptr<NetEq> neteq_;
|
||||
scoped_ptr<LossModel> loss_model_;
|
||||
rtc::scoped_ptr<RtpGenerator> rtp_generator_;
|
||||
rtc::scoped_ptr<NetEq> neteq_;
|
||||
rtc::scoped_ptr<LossModel> loss_model_;
|
||||
|
||||
scoped_ptr<int16_t[]> in_data_;
|
||||
scoped_ptr<uint8_t[]> payload_;
|
||||
scoped_ptr<int16_t[]> out_data_;
|
||||
rtc::scoped_ptr<int16_t[]> in_data_;
|
||||
rtc::scoped_ptr<uint8_t[]> payload_;
|
||||
rtc::scoped_ptr<int16_t[]> out_data_;
|
||||
WebRtcRTPHeader rtp_header_;
|
||||
|
||||
size_t total_payload_size_bytes_;
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
#include "google/gflags.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/pcm16b/include/pcm16b.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
|
||||
@ -31,7 +32,6 @@
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
|
||||
#include "webrtc/modules/interface/module_common_types.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/system_wrappers/interface/trace.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
@ -270,8 +270,8 @@ int CodecTimestampRate(uint8_t payload_type) {
|
||||
}
|
||||
|
||||
size_t ReplacePayload(webrtc::test::InputAudioFile* replacement_audio_file,
|
||||
webrtc::scoped_ptr<int16_t[]>* replacement_audio,
|
||||
webrtc::scoped_ptr<uint8_t[]>* payload,
|
||||
rtc::scoped_ptr<int16_t[]>* replacement_audio,
|
||||
rtc::scoped_ptr<uint8_t[]>* payload,
|
||||
size_t* payload_mem_size_bytes,
|
||||
size_t* frame_size_samples,
|
||||
WebRtcRTPHeader* rtp_header,
|
||||
@ -384,7 +384,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
printf("Input file: %s\n", argv[1]);
|
||||
webrtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
|
||||
rtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
|
||||
webrtc::test::RtpFileSource::Create(argv[1]));
|
||||
assert(file_source.get());
|
||||
|
||||
@ -397,7 +397,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
// Check if a replacement audio file was provided, and if so, open it.
|
||||
bool replace_payload = false;
|
||||
webrtc::scoped_ptr<webrtc::test::InputAudioFile> replacement_audio_file;
|
||||
rtc::scoped_ptr<webrtc::test::InputAudioFile> replacement_audio_file;
|
||||
if (!FLAGS_replacement_audio_file.empty()) {
|
||||
replacement_audio_file.reset(
|
||||
new webrtc::test::InputAudioFile(FLAGS_replacement_audio_file));
|
||||
@ -405,7 +405,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
// Read first packet.
|
||||
webrtc::scoped_ptr<webrtc::test::Packet> packet(file_source->NextPacket());
|
||||
rtc::scoped_ptr<webrtc::test::Packet> packet(file_source->NextPacket());
|
||||
if (!packet) {
|
||||
printf(
|
||||
"Warning: input file is empty, or the filters did not match any "
|
||||
@ -427,7 +427,7 @@ int main(int argc, char* argv[]) {
|
||||
// for wav files.)
|
||||
// Check output file type.
|
||||
std::string output_file_name = argv[2];
|
||||
webrtc::scoped_ptr<webrtc::test::AudioSink> output;
|
||||
rtc::scoped_ptr<webrtc::test::AudioSink> output;
|
||||
if (output_file_name.size() >= 4 &&
|
||||
output_file_name.substr(output_file_name.size() - 4) == ".wav") {
|
||||
// Open a wav file.
|
||||
@ -454,11 +454,11 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
|
||||
// Set up variables for audio replacement if needed.
|
||||
webrtc::scoped_ptr<webrtc::test::Packet> next_packet;
|
||||
rtc::scoped_ptr<webrtc::test::Packet> next_packet;
|
||||
bool next_packet_available = false;
|
||||
size_t input_frame_size_timestamps = 0;
|
||||
webrtc::scoped_ptr<int16_t[]> replacement_audio;
|
||||
webrtc::scoped_ptr<uint8_t[]> payload;
|
||||
rtc::scoped_ptr<int16_t[]> replacement_audio;
|
||||
rtc::scoped_ptr<uint8_t[]> payload;
|
||||
size_t payload_mem_size_bytes = 0;
|
||||
if (replace_payload) {
|
||||
// Initially assume that the frame size is 30 ms at the initial sample rate.
|
||||
|
||||
@ -55,7 +55,7 @@ Packet::Packet(uint8_t* packet_memory, size_t allocated_bytes, double time_ms)
|
||||
virtual_packet_length_bytes_(allocated_bytes),
|
||||
virtual_payload_length_bytes_(0),
|
||||
time_ms_(time_ms) {
|
||||
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
|
||||
rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
|
||||
valid_header_ = ParseHeader(*parser);
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ Packet::Packet(uint8_t* packet_memory,
|
||||
virtual_packet_length_bytes_(virtual_packet_length_bytes),
|
||||
virtual_payload_length_bytes_(0),
|
||||
time_ms_(time_ms) {
|
||||
scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
|
||||
rtc::scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
|
||||
valid_header_ = ParseHeader(*parser);
|
||||
}
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
#include <list>
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_types.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -103,7 +103,7 @@ class Packet {
|
||||
void CopyToHeader(RTPHeader* destination) const;
|
||||
|
||||
RTPHeader header_;
|
||||
scoped_ptr<uint8_t[]> payload_memory_;
|
||||
rtc::scoped_ptr<uint8_t[]> payload_memory_;
|
||||
const uint8_t* payload_; // First byte after header.
|
||||
const size_t packet_length_bytes_; // Total length of packet.
|
||||
size_t payload_length_bytes_; // Length of the payload, after RTP header.
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -22,7 +22,7 @@ bool ResampleInputAudioFile::Read(size_t samples,
|
||||
const size_t samples_to_read = samples * file_rate_hz_ / output_rate_hz;
|
||||
CHECK_EQ(samples_to_read * output_rate_hz, samples * file_rate_hz_)
|
||||
<< "Frame size and sample rates don't add up to an integer.";
|
||||
scoped_ptr<int16_t[]> temp_destination(new int16_t[samples_to_read]);
|
||||
rtc::scoped_ptr<int16_t[]> temp_destination(new int16_t[samples_to_read]);
|
||||
if (!InputAudioFile::Read(samples_to_read, temp_destination.get()))
|
||||
return false;
|
||||
resampler_.ResetIfNeeded(
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
#include <vector>
|
||||
|
||||
#include "google/gflags.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
// Flag validator.
|
||||
static bool ValidatePayloadType(const char* flagname, int32_t value) {
|
||||
@ -60,7 +60,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
printf("Input file: %s\n", argv[1]);
|
||||
webrtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
|
||||
rtc::scoped_ptr<webrtc::test::RtpFileSource> file_source(
|
||||
webrtc::test::RtpFileSource::Create(argv[1]));
|
||||
assert(file_source.get());
|
||||
// Set RTP extension ID.
|
||||
@ -90,7 +90,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
fprintf(out_file, "\n");
|
||||
|
||||
webrtc::scoped_ptr<webrtc::test::Packet> packet;
|
||||
rtc::scoped_ptr<webrtc::test::Packet> packet;
|
||||
while (true) {
|
||||
packet.reset(file_source->NextPacket());
|
||||
if (!packet.get()) {
|
||||
|
||||
@ -52,13 +52,11 @@ Packet* RtpFileSource::NextPacket() {
|
||||
// Read the next one.
|
||||
continue;
|
||||
}
|
||||
scoped_ptr<uint8_t[]> packet_memory(new uint8_t[temp_packet.length]);
|
||||
rtc::scoped_ptr<uint8_t[]> packet_memory(new uint8_t[temp_packet.length]);
|
||||
memcpy(packet_memory.get(), temp_packet.data, temp_packet.length);
|
||||
scoped_ptr<Packet> packet(new Packet(packet_memory.release(),
|
||||
temp_packet.length,
|
||||
temp_packet.original_length,
|
||||
temp_packet.time_ms,
|
||||
*parser_.get()));
|
||||
rtc::scoped_ptr<Packet> packet(new Packet(
|
||||
packet_memory.release(), temp_packet.length,
|
||||
temp_packet.original_length, temp_packet.time_ms, *parser_.get()));
|
||||
if (!packet->valid_header()) {
|
||||
assert(false);
|
||||
return NULL;
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_types.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -52,8 +52,8 @@ class RtpFileSource : public PacketSource {
|
||||
|
||||
bool OpenFile(const std::string& file_name);
|
||||
|
||||
scoped_ptr<RtpFileReader> rtp_reader_;
|
||||
scoped_ptr<RtpHeaderParser> parser_;
|
||||
rtc::scoped_ptr<RtpFileReader> rtp_reader_;
|
||||
rtc::scoped_ptr<RtpHeaderParser> parser_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RtpFileSource);
|
||||
};
|
||||
|
||||
@ -11,11 +11,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/test/rtp_file_reader.h"
|
||||
#include "webrtc/test/rtp_file_writer.h"
|
||||
|
||||
using webrtc::scoped_ptr;
|
||||
using rtc::scoped_ptr;
|
||||
using webrtc::test::RtpFileReader;
|
||||
using webrtc::test::RtpFileWriter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user