Replace scoped_ptr with unique_ptr in webrtc/api/
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1930463002
Cr-Commit-Position: refs/heads/master@{#12530}
diff --git a/webrtc/api/java/jni/androidmediaencoder_jni.cc b/webrtc/api/java/jni/androidmediaencoder_jni.cc
index e88a94c..b7f2da4 100644
--- a/webrtc/api/java/jni/androidmediaencoder_jni.cc
+++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc
@@ -13,6 +13,7 @@
#include "webrtc/api/java/jni/androidmediaencoder_jni.h"
#include <algorithm>
+#include <memory>
#include <list>
#include "third_party/libyuv/include/libyuv/convert.h"
@@ -37,7 +38,6 @@
using rtc::Bind;
using rtc::Thread;
using rtc::ThreadManager;
-using rtc::scoped_ptr;
using webrtc::CodecSpecificInfo;
using webrtc::EncodedImage;
@@ -182,7 +182,8 @@
// State that is constant for the lifetime of this object once the ctor
// returns.
- scoped_ptr<Thread> codec_thread_; // Thread on which to operate MediaCodec.
+ std::unique_ptr<Thread>
+ codec_thread_; // Thread on which to operate MediaCodec.
rtc::ThreadChecker codec_thread_checker_;
ScopedGlobalRef<jclass> j_media_codec_video_encoder_class_;
ScopedGlobalRef<jobject> j_media_codec_video_encoder_;
@@ -973,7 +974,7 @@
// Callback - return encoded frame.
int32_t callback_status = 0;
if (callback_) {
- scoped_ptr<webrtc::EncodedImage> image(
+ std::unique_ptr<webrtc::EncodedImage> image(
new webrtc::EncodedImage(payload, payload_size, payload_size));
image->_encodedWidth = width_;
image->_encodedHeight = height_;