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:
@ -13,11 +13,11 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
||||
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
|
||||
#include "webrtc/modules/video_coding/main/source/generic_decoder.h"
|
||||
#include "webrtc/modules/video_coding/main/source/generic_encoder.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -28,7 +28,7 @@ struct VCMDecoderMapItem {
|
||||
int number_of_cores,
|
||||
bool require_key_frame);
|
||||
|
||||
scoped_ptr<VideoCodec> settings;
|
||||
rtc::scoped_ptr<VideoCodec> settings;
|
||||
int number_of_cores;
|
||||
bool require_key_frame;
|
||||
};
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
class CriticalSectionWrapper;
|
||||
|
||||
@ -293,7 +293,7 @@ class VCMJitterBuffer {
|
||||
bool running_;
|
||||
CriticalSectionWrapper* crit_sect_;
|
||||
// Event to signal when we have a frame ready for decoder.
|
||||
scoped_ptr<EventWrapper> frame_event_;
|
||||
rtc::scoped_ptr<EventWrapper> frame_event_;
|
||||
// Number of allocated frames.
|
||||
int max_number_of_frames_;
|
||||
UnorderedFrameList free_frames_ GUARDED_BY(crit_sect_);
|
||||
|
||||
@ -111,10 +111,10 @@ class TestBasicJitterBuffer : public ::testing::Test {
|
||||
uint32_t timestamp_;
|
||||
int size_;
|
||||
uint8_t data_[1500];
|
||||
scoped_ptr<VCMPacket> packet_;
|
||||
scoped_ptr<SimulatedClock> clock_;
|
||||
rtc::scoped_ptr<VCMPacket> packet_;
|
||||
rtc::scoped_ptr<SimulatedClock> clock_;
|
||||
NullEventFactory event_factory_;
|
||||
scoped_ptr<VCMJitterBuffer> jitter_buffer_;
|
||||
rtc::scoped_ptr<VCMJitterBuffer> jitter_buffer_;
|
||||
};
|
||||
|
||||
|
||||
@ -218,7 +218,7 @@ class TestRunningJitterBuffer : public ::testing::Test {
|
||||
|
||||
VCMJitterBuffer* jitter_buffer_;
|
||||
StreamGenerator* stream_generator_;
|
||||
scoped_ptr<SimulatedClock> clock_;
|
||||
rtc::scoped_ptr<SimulatedClock> clock_;
|
||||
NullEventFactory event_factory_;
|
||||
size_t max_nack_list_size_;
|
||||
int oldest_packet_to_nack_;
|
||||
|
||||
@ -13,12 +13,12 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/interface/module_common_types.h"
|
||||
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
|
||||
#include "webrtc/modules/video_coding/main/source/media_opt_util.h"
|
||||
#include "webrtc/modules/video_coding/main/source/qm_select.h"
|
||||
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -140,7 +140,7 @@ class MediaOptimization {
|
||||
uint32_t SentFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||
|
||||
// Protect all members.
|
||||
scoped_ptr<CriticalSectionWrapper> crit_sect_;
|
||||
rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
|
||||
|
||||
Clock* clock_ GUARDED_BY(crit_sect_);
|
||||
int32_t max_bit_rate_ GUARDED_BY(crit_sect_);
|
||||
@ -148,8 +148,9 @@ class MediaOptimization {
|
||||
uint16_t codec_width_ GUARDED_BY(crit_sect_);
|
||||
uint16_t codec_height_ GUARDED_BY(crit_sect_);
|
||||
float user_frame_rate_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_
|
||||
GUARDED_BY(crit_sect_);
|
||||
uint8_t fraction_lost_ GUARDED_BY(crit_sect_);
|
||||
uint32_t send_statistics_[4] GUARDED_BY(crit_sect_);
|
||||
uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_);
|
||||
@ -163,8 +164,8 @@ class MediaOptimization {
|
||||
uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_);
|
||||
uint32_t key_frame_cnt_ GUARDED_BY(crit_sect_);
|
||||
uint32_t delta_frame_cnt_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_);
|
||||
scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_);
|
||||
rtc::scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_);
|
||||
int64_t last_qm_update_time_ GUARDED_BY(crit_sect_);
|
||||
int64_t last_change_time_ GUARDED_BY(crit_sect_); // Content/user triggered.
|
||||
int num_layers_ GUARDED_BY(crit_sect_);
|
||||
|
||||
@ -90,7 +90,7 @@ class VCMReceiver {
|
||||
Clock* const clock_;
|
||||
VCMJitterBuffer jitter_buffer_;
|
||||
VCMTiming* timing_;
|
||||
scoped_ptr<EventWrapper> render_wait_event_;
|
||||
rtc::scoped_ptr<EventWrapper> render_wait_event_;
|
||||
VCMReceiverState state_;
|
||||
int max_video_delay_ms_;
|
||||
|
||||
|
||||
@ -89,11 +89,11 @@ class TestVCMReceiver : public ::testing::Test {
|
||||
return true;
|
||||
}
|
||||
|
||||
scoped_ptr<SimulatedClock> clock_;
|
||||
rtc::scoped_ptr<SimulatedClock> clock_;
|
||||
VCMTiming timing_;
|
||||
NullEventFactory event_factory_;
|
||||
VCMReceiver receiver_;
|
||||
scoped_ptr<StreamGenerator> stream_generator_;
|
||||
rtc::scoped_ptr<StreamGenerator> stream_generator_;
|
||||
uint8_t data_buffer_[kDataBufferSize];
|
||||
};
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ class EncodedImageCallbackWrapper : public EncodedImageCallback {
|
||||
}
|
||||
|
||||
private:
|
||||
scoped_ptr<CriticalSectionWrapper> cs_;
|
||||
rtc::scoped_ptr<CriticalSectionWrapper> cs_;
|
||||
EncodedImageCallback* callback_ GUARDED_BY(cs_);
|
||||
};
|
||||
|
||||
@ -362,9 +362,9 @@ class VideoCodingModuleImpl : public VideoCodingModule {
|
||||
EncodedImageCallbackWrapper post_encode_callback_;
|
||||
// TODO(tommi): Change sender_ and receiver_ to be non pointers
|
||||
// (construction is 1 alloc instead of 3).
|
||||
scoped_ptr<vcm::VideoSender> sender_;
|
||||
scoped_ptr<vcm::VideoReceiver> receiver_;
|
||||
scoped_ptr<EventFactory> own_event_factory_;
|
||||
rtc::scoped_ptr<vcm::VideoSender> sender_;
|
||||
rtc::scoped_ptr<vcm::VideoReceiver> receiver_;
|
||||
rtc::scoped_ptr<EventFactory> own_event_factory_;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
@ -127,9 +127,9 @@ class VideoSender {
|
||||
private:
|
||||
Clock* clock_;
|
||||
|
||||
scoped_ptr<DebugRecorder> recorder_;
|
||||
rtc::scoped_ptr<DebugRecorder> recorder_;
|
||||
|
||||
scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
|
||||
rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
|
||||
CriticalSectionWrapper* _sendCritSect;
|
||||
VCMGenericEncoder* _encoder;
|
||||
VCMEncodedFrameCallback _encodedFrameCallback;
|
||||
@ -221,7 +221,7 @@ class VideoReceiver {
|
||||
};
|
||||
|
||||
Clock* const clock_;
|
||||
scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
|
||||
rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
|
||||
CriticalSectionWrapper* _receiveCritSect;
|
||||
bool _receiverInited GUARDED_BY(_receiveCritSect);
|
||||
VCMTiming _timing;
|
||||
|
||||
@ -80,7 +80,7 @@ class VCMRobustnessTest : public ::testing::Test {
|
||||
MockPacketRequestCallback request_callback_;
|
||||
NiceMock<MockVideoDecoder> decoder_;
|
||||
NiceMock<MockVideoDecoder> decoderCopy_;
|
||||
scoped_ptr<SimulatedClock> clock_;
|
||||
rtc::scoped_ptr<SimulatedClock> clock_;
|
||||
NullEventFactory event_factory_;
|
||||
};
|
||||
|
||||
|
||||
@ -11,13 +11,13 @@
|
||||
#include <vector>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
|
||||
#include "webrtc/modules/video_coding/main/interface/mock/mock_vcm_callbacks.h"
|
||||
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
|
||||
#include "webrtc/modules/video_coding/main/source/video_coding_impl.h"
|
||||
#include "webrtc/modules/video_coding/main/test/test_util.h"
|
||||
#include "webrtc/system_wrappers/interface/clock.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::NiceMock;
|
||||
@ -79,7 +79,7 @@ class TestVideoReceiver : public ::testing::Test {
|
||||
NiceMock<MockVideoDecoder> decoder_;
|
||||
NiceMock<MockPacketRequestCallback> packet_request_callback_;
|
||||
|
||||
scoped_ptr<VideoReceiver> receiver_;
|
||||
rtc::scoped_ptr<VideoReceiver> receiver_;
|
||||
};
|
||||
|
||||
TEST_F(TestVideoReceiver, PaddingOnlyFrames) {
|
||||
|
||||
@ -55,7 +55,7 @@ class DebugRecorder {
|
||||
}
|
||||
|
||||
private:
|
||||
scoped_ptr<CriticalSectionWrapper> cs_;
|
||||
rtc::scoped_ptr<CriticalSectionWrapper> cs_;
|
||||
FILE* file_ GUARDED_BY(cs_);
|
||||
};
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common.h"
|
||||
#include "webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
|
||||
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
|
||||
@ -20,7 +21,6 @@
|
||||
#include "webrtc/modules/video_coding/main/source/video_coding_impl.h"
|
||||
#include "webrtc/modules/video_coding/main/test/test_util.h"
|
||||
#include "webrtc/system_wrappers/interface/clock.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/test/frame_generator.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
#include "webrtc/test/testsupport/gtest_disable.h"
|
||||
@ -76,7 +76,7 @@ class EmptyFrameGenerator : public FrameGenerator {
|
||||
}
|
||||
|
||||
private:
|
||||
scoped_ptr<I420VideoFrame> frame_;
|
||||
rtc::scoped_ptr<I420VideoFrame> frame_;
|
||||
};
|
||||
|
||||
class PacketizationCallback : public VCMPacketizationCallback {
|
||||
@ -185,8 +185,8 @@ class TestVideoSender : public ::testing::Test {
|
||||
SimulatedClock clock_;
|
||||
PacketizationCallback packetization_callback_;
|
||||
MockEncodedImageCallback post_encode_callback_;
|
||||
scoped_ptr<VideoSender> sender_;
|
||||
scoped_ptr<FrameGenerator> generator_;
|
||||
rtc::scoped_ptr<VideoSender> sender_;
|
||||
rtc::scoped_ptr<FrameGenerator> generator_;
|
||||
};
|
||||
|
||||
class TestVideoSenderWithMockEncoder : public TestVideoSender {
|
||||
|
||||
Reference in New Issue
Block a user