Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(954)

Unified Diff: webrtc/media/base/videocapturer.cc

Issue 1728503002: Replace scoped_ptr with unique_ptr in webrtc/media/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up1
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/base/videocapturer.h ('k') | webrtc/media/base/videoengine_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videocapturer.cc
diff --git a/webrtc/media/base/videocapturer.cc b/webrtc/media/base/videocapturer.cc
index 2d6a15e544046e3ee768ae7b39e4c8a18251cca0..f2933240f9ca6483d6b1f30292ea92807ff7757a 100644
--- a/webrtc/media/base/videocapturer.cc
+++ b/webrtc/media/base/videocapturer.cc
@@ -168,7 +168,7 @@ bool VideoCapturer::Pause(bool pause) {
return false;
}
LOG(LS_INFO) << "Pausing a camera.";
- rtc::scoped_ptr<VideoFormat> capture_format_when_paused(
+ std::unique_ptr<VideoFormat> capture_format_when_paused(
capture_format_ ? new VideoFormat(*capture_format_) : NULL);
Stop();
SetCaptureState(CS_PAUSED);
@@ -351,7 +351,7 @@ void VideoCapturer::OnFrameCaptured(VideoCapturer*,
}
// Use a temporary buffer to scale
- rtc::scoped_ptr<uint8_t[]> scale_buffer;
+ std::unique_ptr<uint8_t[]> scale_buffer;
if (IsScreencast()) {
int scaled_width, scaled_height;
@@ -400,7 +400,7 @@ void VideoCapturer::OnFrameCaptured(VideoCapturer*,
// TODO(fbarchard): Avoid scale and convert if muted.
// Temporary buffer is scoped here so it will persist until i420_frame.Init()
// makes a copy of the frame, converting to I420.
- rtc::scoped_ptr<uint8_t[]> temp_buffer;
+ std::unique_ptr<uint8_t[]> temp_buffer;
// YUY2 can be scaled vertically using an ARGB scaler. Aspect ratio is only
// a problem on OSX. OSX always converts webcams to YUY2 or UYVY.
bool can_scale =
@@ -512,7 +512,7 @@ void VideoCapturer::OnFrameCaptured(VideoCapturer*,
return;
}
- rtc::scoped_ptr<VideoFrame> adapted_frame(
+ std::unique_ptr<VideoFrame> adapted_frame(
frame_factory_->CreateAliasedFrame(captured_frame,
cropped_width, cropped_height,
adapted_width, adapted_height));
@@ -550,7 +550,7 @@ void VideoCapturer::SetCaptureState(CaptureState state) {
void VideoCapturer::OnMessage(rtc::Message* message) {
switch (message->message_id) {
case MSG_STATE_CHANGE: {
- rtc::scoped_ptr<StateChangeParams> p(
+ std::unique_ptr<StateChangeParams> p(
static_cast<StateChangeParams*>(message->pdata));
SignalStateChange(this, p->data());
break;
« no previous file with comments | « webrtc/media/base/videocapturer.h ('k') | webrtc/media/base/videoengine_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698