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

Unified Diff: chromecast/media/cma/pipeline/av_pipeline_impl.cc

Issue 1142513004: Chromecast: MessageLoopProxy cleanup --> SingleThreadTaskRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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
Index: chromecast/media/cma/pipeline/av_pipeline_impl.cc
diff --git a/chromecast/media/cma/pipeline/av_pipeline_impl.cc b/chromecast/media/cma/pipeline/av_pipeline_impl.cc
index 9ff88e992256dbfb2dc9c178aac5358dcc4adb10..b8730b894bba07a8e93310b9365ca38e3864818f 100644
--- a/chromecast/media/cma/pipeline/av_pipeline_impl.cc
+++ b/chromecast/media/cma/pipeline/av_pipeline_impl.cc
@@ -6,8 +6,9 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "chromecast/media/base/decrypt_context.h"
#include "chromecast/media/cdm/browser_cdm_cast.h"
#include "chromecast/media/cma/backend/media_clock_device.h"
@@ -124,9 +125,8 @@ bool AvPipelineImpl::StartPlayingFrom(
// Start feeding the pipeline.
enable_feeding_ = true;
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(&AvPipelineImpl::FetchBufferIfNeeded, weak_this_));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&AvPipelineImpl::FetchBufferIfNeeded, weak_this_));
return true;
}
@@ -226,9 +226,8 @@ void AvPipelineImpl::OnNewFrame(
pending_buffer_ = buffer;
ProcessPendingBuffer();
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(&AvPipelineImpl::FetchBufferIfNeeded, weak_this_));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&AvPipelineImpl::FetchBufferIfNeeded, weak_this_));
}
void AvPipelineImpl::ProcessPendingBuffer() {
@@ -237,7 +236,7 @@ void AvPipelineImpl::ProcessPendingBuffer() {
// Initiate a read if there isn't already one.
if (!pending_buffer_.get() && !pending_read_) {
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&AvPipelineImpl::FetchBufferIfNeeded, weak_this_));
return;
@@ -307,9 +306,8 @@ void AvPipelineImpl::OnFramePushed(MediaComponentDevice::FrameStatus status) {
state_ = kError;
return;
}
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(&AvPipelineImpl::ProcessPendingBuffer, weak_this_));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&AvPipelineImpl::ProcessPendingBuffer, weak_this_));
}
void AvPipelineImpl::OnCdmStateChanged() {

Powered by Google App Engine
This is Rietveld 408576698