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

Unified Diff: media/cast/sender/external_video_encoder.cc

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: media/cast/sender/external_video_encoder.cc
diff --git a/media/cast/sender/external_video_encoder.cc b/media/cast/sender/external_video_encoder.cc
index 0bfbe71f2fb1a05fd86eeedca83ce131b1ba87f4..1a3c3e79cdc022d6069e06a4da8d1c8a7e63dd60 100644
--- a/media/cast/sender/external_video_encoder.cc
+++ b/media/cast/sender/external_video_encoder.cc
@@ -5,6 +5,7 @@
#include "media/cast/sender/external_video_encoder.h"
#include <cmath>
+#include <utility>
#include "base/bind.h"
#include "base/debug/crash_logging.h"
@@ -88,7 +89,7 @@ class ExternalVideoEncoder::VEAClientImpl
max_frame_rate_(max_frame_rate),
status_change_cb_(status_change_cb),
create_video_encode_memory_cb_(create_video_encode_memory_cb),
- video_encode_accelerator_(vea.Pass()),
+ video_encode_accelerator_(std::move(vea)),
encoder_active_(false),
next_frame_id_(0u),
key_frame_encountered_(false),
@@ -368,7 +369,7 @@ class ExternalVideoEncoder::VEAClientImpl
void OnReceivedSharedMemory(scoped_ptr<base::SharedMemory> memory) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
- output_buffers_.push_back(memory.Pass());
+ output_buffers_.push_back(std::move(memory));
// Wait until all requested buffers are received.
if (output_buffers_.size() < kOutputBufferCount)
@@ -598,12 +599,9 @@ void ExternalVideoEncoder::OnCreateVideoEncodeAccelerator(
}
DCHECK(!client_);
- client_ = new VEAClientImpl(cast_environment_,
- encoder_task_runner,
- vea.Pass(),
- video_config.max_frame_rate,
- status_change_cb,
- create_video_encode_memory_cb_);
+ client_ = new VEAClientImpl(cast_environment_, encoder_task_runner,
+ std::move(vea), video_config.max_frame_rate,
+ status_change_cb, create_video_encode_memory_cb_);
client_->task_runner()->PostTask(FROM_HERE,
base::Bind(&VEAClientImpl::Initialize,
client_,
« no previous file with comments | « media/cast/sender/audio_sender_unittest.cc ('k') | media/cast/sender/fake_video_encode_accelerator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698