From e065fcf9a9bc1cdbe73e8ef01b3dad7c15585e93 Mon Sep 17 00:00:00 2001 From: kwiberg Date: Wed, 2 Mar 2016 01:01:11 -0800 Subject: [PATCH] Replace scoped_ptr with unique_ptr in webrtc/modules/video_*/ BUG=webrtc:5520 Review URL: https://codereview.webrtc.org/1738863002 Cr-Commit-Position: refs/heads/master@{#11836} --- .../video_capture/linux/video_capture_linux.h | 6 +++-- .../test/video_capture_unittest.cc | 22 +++++++++---------- .../video_processing/frame_preprocessor.h | 5 +++-- .../test/brightness_detection_test.cc | 4 +++- .../test/content_metrics_test.cc | 4 +++- .../test/deflickering_test.cc | 4 +++- .../video_processing/test/denoiser_test.cc | 16 ++++++++------ .../test/video_processing_unittest.cc | 9 ++++---- .../video_processing/util/denoiser_filter.cc | 4 ++-- .../video_processing/util/denoiser_filter.h | 5 +++-- .../modules/video_processing/video_denoiser.h | 6 +++-- .../android/video_render_android_impl.h | 5 +++-- .../ios/video_render_ios_gles20.h | 8 +++---- .../video_render/ios/video_render_ios_impl.h | 3 ++- .../video_render/ios/video_render_ios_view.mm | 4 +++- .../video_render/mac/video_render_agl.h | 5 +++-- .../video_render/mac/video_render_nsopengl.h | 5 +++-- .../windows/video_render_direct3d9.h | 6 +++-- 18 files changed, 72 insertions(+), 49 deletions(-) diff --git a/webrtc/modules/video_capture/linux/video_capture_linux.h b/webrtc/modules/video_capture/linux/video_capture_linux.h index 8172eb8d2a..72266643c6 100644 --- a/webrtc/modules/video_capture/linux/video_capture_linux.h +++ b/webrtc/modules/video_capture/linux/video_capture_linux.h @@ -11,6 +11,8 @@ #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_VIDEO_CAPTURE_LINUX_H_ #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_VIDEO_CAPTURE_LINUX_H_ +#include + #include "webrtc/base/platform_thread.h" #include "webrtc/common_types.h" #include "webrtc/modules/video_capture/video_capture_impl.h" @@ -39,8 +41,8 @@ private: bool AllocateVideoBuffers(); bool DeAllocateVideoBuffers(); - // TODO(pbos): Stop using scoped_ptr and resetting the thread. - rtc::scoped_ptr _captureThread; + // TODO(pbos): Stop using unique_ptr and resetting the thread. + std::unique_ptr _captureThread; CriticalSectionWrapper* _captureCritSect; int32_t _deviceId; diff --git a/webrtc/modules/video_capture/test/video_capture_unittest.cc b/webrtc/modules/video_capture/test/video_capture_unittest.cc index 45d2d2f241..600b618f5c 100644 --- a/webrtc/modules/video_capture/test/video_capture_unittest.cc +++ b/webrtc/modules/video_capture/test/video_capture_unittest.cc @@ -11,10 +11,10 @@ #include #include +#include #include #include "testing/gtest/include/gtest/gtest.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/base/scoped_ref_ptr.h" #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/utility/include/process_thread.h" @@ -25,7 +25,6 @@ #include "webrtc/system_wrappers/include/tick_util.h" #include "webrtc/video_frame.h" -using rtc::scoped_ptr; using webrtc::CriticalSectionWrapper; using webrtc::CriticalSectionScoped; using webrtc::SleepMs; @@ -183,7 +182,7 @@ class TestVideoCaptureCallback : public VideoCaptureDataCallback { } private: - scoped_ptr capture_cs_; + std::unique_ptr capture_cs_; VideoCaptureCapability capability_; int capture_delay_; int64_t last_render_time_ms_; @@ -223,7 +222,7 @@ class TestVideoCaptureFeedBack : public VideoCaptureFeedBack { } private: - scoped_ptr capture_cs_; + std::unique_ptr capture_cs_; unsigned int frame_rate_; VideoCaptureAlarm alarm_; }; @@ -270,7 +269,7 @@ class VideoCaptureTest : public testing::Test { EXPECT_EQ(capability.height, resulting_capability.height); } - scoped_ptr device_info_; + std::unique_ptr device_info_; unsigned int number_of_devices_; }; @@ -440,7 +439,8 @@ class VideoCaptureExternalTest : public testing::Test { public: void SetUp() { capture_module_ = VideoCaptureFactory::Create(0, capture_input_interface_); - process_module_ = webrtc::ProcessThread::Create("ProcessThread"); + process_module_ = + rtc::ScopedToUnique(webrtc::ProcessThread::Create("ProcessThread")); process_module_->Start(); process_module_->RegisterModule(capture_module_); @@ -472,7 +472,7 @@ class VideoCaptureExternalTest : public testing::Test { webrtc::VideoCaptureExternal* capture_input_interface_; rtc::scoped_refptr capture_module_; - rtc::scoped_ptr process_module_; + std::unique_ptr process_module_; webrtc::VideoFrame test_frame_; TestVideoCaptureCallback capture_callback_; TestVideoCaptureFeedBack capture_feedback_; @@ -483,7 +483,7 @@ TEST_F(VideoCaptureExternalTest, TestExternalCapture) { size_t length = webrtc::CalcBufferSize(webrtc::kI420, test_frame_.width(), test_frame_.height()); - scoped_ptr test_buffer(new uint8_t[length]); + std::unique_ptr test_buffer(new uint8_t[length]); webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), length, capture_callback_.capability(), 0)); @@ -505,7 +505,7 @@ TEST_F(VideoCaptureExternalTest, MAYBE_FrameRate) { size_t length = webrtc::CalcBufferSize(webrtc::kI420, test_frame_.width(), test_frame_.height()); - scoped_ptr test_buffer(new uint8_t[length]); + std::unique_ptr test_buffer(new uint8_t[length]); webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), length, capture_callback_.capability(), 0)); @@ -521,7 +521,7 @@ TEST_F(VideoCaptureExternalTest, MAYBE_FrameRate) { size_t length = webrtc::CalcBufferSize(webrtc::kI420, test_frame_.width(), test_frame_.height()); - scoped_ptr test_buffer(new uint8_t[length]); + std::unique_ptr test_buffer(new uint8_t[length]); webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), length, capture_callback_.capability(), 0)); @@ -539,7 +539,7 @@ TEST_F(VideoCaptureExternalTest, Rotation) { size_t length = webrtc::CalcBufferSize(webrtc::kI420, test_frame_.width(), test_frame_.height()); - scoped_ptr test_buffer(new uint8_t[length]); + std::unique_ptr test_buffer(new uint8_t[length]); webrtc::ExtractBuffer(test_frame_, length, test_buffer.get()); EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), length, capture_callback_.capability(), 0)); diff --git a/webrtc/modules/video_processing/frame_preprocessor.h b/webrtc/modules/video_processing/frame_preprocessor.h index 5bdc576f37..6dd3693dbf 100644 --- a/webrtc/modules/video_processing/frame_preprocessor.h +++ b/webrtc/modules/video_processing/frame_preprocessor.h @@ -11,7 +11,8 @@ #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ #define WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ -#include "webrtc/base/scoped_ptr.h" +#include + #include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/modules/video_processing/content_analysis.h" #include "webrtc/modules/video_processing/spatial_resampler.h" @@ -74,7 +75,7 @@ class VPMFramePreprocessor { VPMSpatialResampler* spatial_resampler_; VPMContentAnalysis* ca_; VPMVideoDecimator* vd_; - rtc::scoped_ptr denoiser_; + std::unique_ptr denoiser_; bool enable_ca_; uint32_t frame_cnt_; }; diff --git a/webrtc/modules/video_processing/test/brightness_detection_test.cc b/webrtc/modules/video_processing/test/brightness_detection_test.cc index 669bb183e5..abce518e58 100644 --- a/webrtc/modules/video_processing/test/brightness_detection_test.cc +++ b/webrtc/modules/video_processing/test/brightness_detection_test.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/modules/video_processing/test/video_processing_unittest.h" @@ -23,7 +25,7 @@ TEST_F(VideoProcessingTest, MAYBE_BrightnessDetection) { uint32_t frameNum = 0; int32_t brightnessWarning = 0; uint32_t warningCount = 0; - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); while (fread(video_buffer.get(), 1, frame_length_, source_file_) == frame_length_) { EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0, width_, height_, diff --git a/webrtc/modules/video_processing/test/content_metrics_test.cc b/webrtc/modules/video_processing/test/content_metrics_test.cc index 782f9cff59..80bb56489b 100644 --- a/webrtc/modules/video_processing/test/content_metrics_test.cc +++ b/webrtc/modules/video_processing/test/content_metrics_test.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include + #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/modules/video_processing/content_analysis.h" @@ -28,7 +30,7 @@ TEST_F(VideoProcessingTest, ContentAnalysis) { ca__c.Initialize(width_, height_); ca__sse.Initialize(width_, height_); - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); while (fread(video_buffer.get(), 1, frame_length_, source_file_) == frame_length_) { // Using ConvertToI420 to add stride to the image. diff --git a/webrtc/modules/video_processing/test/deflickering_test.cc b/webrtc/modules/video_processing/test/deflickering_test.cc index 5410015b06..5ff5692cce 100644 --- a/webrtc/modules/video_processing/test/deflickering_test.cc +++ b/webrtc/modules/video_processing/test/deflickering_test.cc @@ -11,6 +11,8 @@ #include #include +#include + #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/modules/video_processing/test/video_processing_unittest.h" @@ -46,7 +48,7 @@ TEST_F(VideoProcessingTest, Deflickering) { << "Could not open output file: " << output_file << "\n"; printf("\nRun time [us / frame]:\n"); - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); for (uint32_t run_idx = 0; run_idx < NumRuns; run_idx++) { TickTime t0; TickTime t1; diff --git a/webrtc/modules/video_processing/test/denoiser_test.cc b/webrtc/modules/video_processing/test/denoiser_test.cc index 3d2411915a..c71097ac26 100644 --- a/webrtc/modules/video_processing/test/denoiser_test.cc +++ b/webrtc/modules/video_processing/test/denoiser_test.cc @@ -10,6 +10,8 @@ #include +#include + #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/modules/video_processing/test/video_processing_unittest.h" @@ -19,8 +21,8 @@ namespace webrtc { TEST_F(VideoProcessingTest, CopyMem) { - rtc::scoped_ptr df_c(DenoiserFilter::Create(false)); - rtc::scoped_ptr df_sse_neon(DenoiserFilter::Create(true)); + std::unique_ptr df_c(DenoiserFilter::Create(false)); + std::unique_ptr df_sse_neon(DenoiserFilter::Create(true)); uint8_t src[16 * 16], dst[16 * 16]; for (int i = 0; i < 16; ++i) { for (int j = 0; j < 16; ++j) { @@ -46,8 +48,8 @@ TEST_F(VideoProcessingTest, CopyMem) { } TEST_F(VideoProcessingTest, Variance) { - rtc::scoped_ptr df_c(DenoiserFilter::Create(false)); - rtc::scoped_ptr df_sse_neon(DenoiserFilter::Create(true)); + std::unique_ptr df_c(DenoiserFilter::Create(false)); + std::unique_ptr df_sse_neon(DenoiserFilter::Create(true)); uint8_t src[16 * 16], dst[16 * 16]; uint32_t sum = 0, sse = 0, var; for (int i = 0; i < 16; ++i) { @@ -69,8 +71,8 @@ TEST_F(VideoProcessingTest, Variance) { } TEST_F(VideoProcessingTest, MbDenoise) { - rtc::scoped_ptr df_c(DenoiserFilter::Create(false)); - rtc::scoped_ptr df_sse_neon(DenoiserFilter::Create(true)); + std::unique_ptr df_c(DenoiserFilter::Create(false)); + std::unique_ptr df_sse_neon(DenoiserFilter::Create(true)); uint8_t running_src[16 * 16], src[16 * 16], dst[16 * 16], dst_ref[16 * 16]; // Test case: |diff| <= |3 + shift_inc1| @@ -138,7 +140,7 @@ TEST_F(VideoProcessingTest, Denoiser) { VideoFrame denoised_frame_c; VideoFrame denoised_frame_sse_neon; - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); while (fread(video_buffer.get(), 1, frame_length_, source_file_) == frame_length_) { // Using ConvertToI420 to add stride to the image. diff --git a/webrtc/modules/video_processing/test/video_processing_unittest.cc b/webrtc/modules/video_processing/test/video_processing_unittest.cc index b9a22d885b..0d18d0a4c8 100644 --- a/webrtc/modules/video_processing/test/video_processing_unittest.cc +++ b/webrtc/modules/video_processing/test/video_processing_unittest.cc @@ -12,6 +12,7 @@ #include +#include #include #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" @@ -116,7 +117,7 @@ TEST_F(VideoProcessingTest, HandleBadStats) { #endif VideoProcessing::FrameStats stats; vp_->ClearFrameStats(&stats); - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_, source_file_)); EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0, width_, height_, @@ -135,7 +136,7 @@ TEST_F(VideoProcessingTest, IdenticalResultsAfterReset) { VideoFrame video_frame2; VideoProcessing::FrameStats stats; // Only testing non-static functions here. - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_, source_file_)); EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0, width_, height_, @@ -171,7 +172,7 @@ TEST_F(VideoProcessingTest, FrameStats) { #endif VideoProcessing::FrameStats stats; vp_->ClearFrameStats(&stats); - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_, source_file_)); EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0, width_, height_, @@ -235,7 +236,7 @@ TEST_F(VideoProcessingTest, Resampler) { vp_->EnableTemporalDecimation(false); // Reading test frame - rtc::scoped_ptr video_buffer(new uint8_t[frame_length_]); + std::unique_ptr video_buffer(new uint8_t[frame_length_]); ASSERT_EQ(frame_length_, fread(video_buffer.get(), 1, frame_length_, source_file_)); // Using ConvertToI420 to add stride to the image. diff --git a/webrtc/modules/video_processing/util/denoiser_filter.cc b/webrtc/modules/video_processing/util/denoiser_filter.cc index fbc2435cb5..120f8f89fa 100644 --- a/webrtc/modules/video_processing/util/denoiser_filter.cc +++ b/webrtc/modules/video_processing/util/denoiser_filter.cc @@ -21,9 +21,9 @@ const int kMotionMagnitudeThreshold = 8 * 3; const int kSumDiffThreshold = 16 * 16 * 2; const int kSumDiffThresholdHigh = 600; -rtc::scoped_ptr DenoiserFilter::Create( +std::unique_ptr DenoiserFilter::Create( bool runtime_cpu_detection) { - rtc::scoped_ptr filter; + std::unique_ptr filter; if (runtime_cpu_detection) { // If we know the minimum architecture at compile time, avoid CPU detection. diff --git a/webrtc/modules/video_processing/util/denoiser_filter.h b/webrtc/modules/video_processing/util/denoiser_filter.h index 5d5a61c59c..40745853de 100644 --- a/webrtc/modules/video_processing/util/denoiser_filter.h +++ b/webrtc/modules/video_processing/util/denoiser_filter.h @@ -11,7 +11,8 @@ #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_DENOISER_FILTER_H_ #define WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_DENOISER_FILTER_H_ -#include "webrtc/base/scoped_ptr.h" +#include + #include "webrtc/modules/include/module_common_types.h" #include "webrtc/modules/video_processing/include/video_processing_defines.h" @@ -31,7 +32,7 @@ struct DenoiseMetrics { class DenoiserFilter { public: - static rtc::scoped_ptr Create(bool runtime_cpu_detection); + static std::unique_ptr Create(bool runtime_cpu_detection); virtual ~DenoiserFilter() {} diff --git a/webrtc/modules/video_processing/video_denoiser.h b/webrtc/modules/video_processing/video_denoiser.h index 107a15ca07..0fe2053639 100644 --- a/webrtc/modules/video_processing/video_denoiser.h +++ b/webrtc/modules/video_processing/video_denoiser.h @@ -11,6 +11,8 @@ #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ #define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ +#include + #include "webrtc/modules/video_processing/util/denoiser_filter.h" #include "webrtc/modules/video_processing/util/skin_detection.h" @@ -29,8 +31,8 @@ class VideoDenoiser { uint8_t* y_dst); int width_; int height_; - rtc::scoped_ptr metrics_; - rtc::scoped_ptr filter_; + std::unique_ptr metrics_; + std::unique_ptr filter_; }; } // namespace webrtc diff --git a/webrtc/modules/video_render/android/video_render_android_impl.h b/webrtc/modules/video_render/android/video_render_android_impl.h index e5b7de4643..06fd7a1c7c 100644 --- a/webrtc/modules/video_render/android/video_render_android_impl.h +++ b/webrtc/modules/video_render/android/video_render_android_impl.h @@ -14,6 +14,7 @@ #include #include +#include #include "webrtc/base/platform_thread.h" #include "webrtc/modules/video_render/i_video_render.h" @@ -144,8 +145,8 @@ class VideoRenderAndroid: IVideoRender { EventWrapper& _javaRenderEvent; int64_t _lastJavaRenderEvent; JNIEnv* _javaRenderJniEnv; // JNIEnv for the java render thread. - // TODO(pbos): Remove scoped_ptr and use the member directly. - rtc::scoped_ptr _javaRenderThread; + // TODO(pbos): Remove unique_ptr and use the member directly. + std::unique_ptr _javaRenderThread; }; } // namespace webrtc diff --git a/webrtc/modules/video_render/ios/video_render_ios_gles20.h b/webrtc/modules/video_render/ios/video_render_ios_gles20.h index d703630d92..d4e04e79d7 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_gles20.h +++ b/webrtc/modules/video_render/ios/video_render_ios_gles20.h @@ -13,9 +13,9 @@ #include #include +#include #include "webrtc/base/platform_thread.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/modules/video_render/ios/video_render_ios_channel.h" #include "webrtc/modules/video_render/ios/video_render_ios_view.h" @@ -62,10 +62,10 @@ class VideoRenderIosGles20 { int SwapAndDisplayBuffers(); private: - rtc::scoped_ptr gles_crit_sec_; + std::unique_ptr gles_crit_sec_; EventTimerWrapper* screen_update_event_; - // TODO(pbos): Remove scoped_ptr and use member directly. - rtc::scoped_ptr screen_update_thread_; + // TODO(pbos): Remove unique_ptr and use member directly. + std::unique_ptr screen_update_thread_; VideoRenderIosView* view_; Rect window_rect_; diff --git a/webrtc/modules/video_render/ios/video_render_ios_impl.h b/webrtc/modules/video_render/ios/video_render_ios_impl.h index 7fb46bf2ec..04a7493300 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_impl.h +++ b/webrtc/modules/video_render/ios/video_render_ios_impl.h @@ -13,6 +13,7 @@ #include #include +#include #include "webrtc/modules/video_render/i_video_render.h" @@ -98,7 +99,7 @@ class VideoRenderIosImpl : IVideoRender { bool full_screen_; CriticalSectionWrapper* crit_sec_; - rtc::scoped_ptr ptr_ios_render_; + std::unique_ptr ptr_ios_render_; }; } // namespace webrtc #endif // WEBRTC_MODULES_VIDEO_RENDER_IOS_VIDEO_RENDER_IOS_IMPL_H_ diff --git a/webrtc/modules/video_render/ios/video_render_ios_view.mm b/webrtc/modules/video_render/ios/video_render_ios_view.mm index 6ffe976c99..b106ffa5c4 100644 --- a/webrtc/modules/video_render/ios/video_render_ios_view.mm +++ b/webrtc/modules/video_render/ios/video_render_ios_view.mm @@ -12,6 +12,8 @@ #error "This file requires ARC support." #endif +#include + #include "webrtc/modules/video_render/ios/video_render_ios_view.h" #include "webrtc/system_wrappers/include/trace.h" @@ -19,7 +21,7 @@ using namespace webrtc; @implementation VideoRenderIosView { EAGLContext* _context; - rtc::scoped_ptr _gles_renderer20; + std::unique_ptr _gles_renderer20; int _frameBufferWidth; int _frameBufferHeight; unsigned int _defaultFrameBuffer; diff --git a/webrtc/modules/video_render/mac/video_render_agl.h b/webrtc/modules/video_render/mac/video_render_agl.h index e1da8faf83..c0a60597e9 100644 --- a/webrtc/modules/video_render/mac/video_render_agl.h +++ b/webrtc/modules/video_render/mac/video_render_agl.h @@ -29,6 +29,7 @@ #include #include #include +#include class VideoRenderAGL; @@ -142,8 +143,8 @@ class VideoRenderAGL { bool _fullScreen; int _id; webrtc::CriticalSectionWrapper& _renderCritSec; - // TODO(pbos): Remove scoped_ptr and use PlatformThread directly. - rtc::scoped_ptr _screenUpdateThread; + // TODO(pbos): Remove unique_ptr and use PlatformThread directly. + std::unique_ptr _screenUpdateThread; webrtc::EventWrapper* _screenUpdateEvent; bool _isHIViewRef; AGLContext _aglContext; diff --git a/webrtc/modules/video_render/mac/video_render_nsopengl.h b/webrtc/modules/video_render/mac/video_render_nsopengl.h index a888b68a97..457557dad6 100644 --- a/webrtc/modules/video_render/mac/video_render_nsopengl.h +++ b/webrtc/modules/video_render/mac/video_render_nsopengl.h @@ -21,6 +21,7 @@ #include #include #include +#include #include "webrtc/base/thread_annotations.h" #include "webrtc/modules/video_render/video_render_defines.h" @@ -169,8 +170,8 @@ private: // variables bool _fullScreen; int _id; CriticalSectionWrapper& _nsglContextCritSec; - // TODO(pbos): Remove scoped_ptr and use PlatformThread directly. - rtc::scoped_ptr _screenUpdateThread; + // TODO(pbos): Remove unique_ptr and use PlatformThread directly. + std::unique_ptr _screenUpdateThread; EventTimerWrapper* _screenUpdateEvent; NSOpenGLContext* _nsglContext; NSOpenGLContext* _nsglFullScreenContext; diff --git a/webrtc/modules/video_render/windows/video_render_direct3d9.h b/webrtc/modules/video_render/windows/video_render_direct3d9.h index 5a1f207934..eaa8c147e2 100644 --- a/webrtc/modules/video_render/windows/video_render_direct3d9.h +++ b/webrtc/modules/video_render/windows/video_render_direct3d9.h @@ -11,6 +11,8 @@ #ifndef WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_WINDOWS_VIDEO_RENDER_DIRECT3D9_H_ #define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_WINDOWS_VIDEO_RENDER_DIRECT3D9_H_ +#include + #include "webrtc/modules/video_render/windows/i_video_render_win.h" #include @@ -203,8 +205,8 @@ private: CriticalSectionWrapper& _refD3DCritsect; Trace* _trace; - // TODO(pbos): Remove scoped_ptr and use PlatformThread directly. - rtc::scoped_ptr _screenUpdateThread; + // TODO(pbos): Remove unique_ptr and use PlatformThread directly. + std::unique_ptr _screenUpdateThread; EventTimerWrapper* _screenUpdateEvent; HWND _hWnd;