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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 65803002: Replace MessageLoopProxy with SingleThreadTaskRunner for media/filters/ + associated code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index e270335504a523131f55f0f05325f98eeb79806d..0feaa0938cb44280a6bf5c75a70ceed81998811a 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -12,7 +12,7 @@
#include "base/command_line.h"
#include "base/location.h"
#include "base/logging.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/sys_byteorder.h"
#include "media/base/bind_to_loop.h"
@@ -68,8 +68,8 @@ static int GetThreadCount(const VideoDecoderConfig& config) {
}
VpxVideoDecoder::VpxVideoDecoder(
- const scoped_refptr<base::MessageLoopProxy>& message_loop)
- : message_loop_(message_loop),
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
+ : task_runner_(task_runner),
weak_factory_(this),
state_(kUninitialized),
vpx_codec_(NULL),
@@ -83,7 +83,7 @@ VpxVideoDecoder::~VpxVideoDecoder() {
void VpxVideoDecoder::Initialize(const VideoDecoderConfig& config,
const PipelineStatusCB& status_cb) {
- DCHECK(message_loop_->BelongsToCurrentThread());
+ DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(config.IsValidConfig());
DCHECK(!config.is_encrypted());
DCHECK(decode_cb_.is_null());
@@ -166,7 +166,7 @@ void VpxVideoDecoder::CloseDecoder() {
void VpxVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
const DecodeCB& decode_cb) {
- DCHECK(message_loop_->BelongsToCurrentThread());
+ DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(!decode_cb.is_null());
CHECK_NE(state_, kUninitialized);
CHECK(decode_cb_.is_null()) << "Overlapping decodes are not supported.";
@@ -188,7 +188,7 @@ void VpxVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
}
void VpxVideoDecoder::Reset(const base::Closure& closure) {
- DCHECK(message_loop_->BelongsToCurrentThread());
+ DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(reset_cb_.is_null());
reset_cb_ = BindToCurrentLoop(closure);
@@ -200,7 +200,7 @@ void VpxVideoDecoder::Reset(const base::Closure& closure) {
}
void VpxVideoDecoder::Stop(const base::Closure& closure) {
- DCHECK(message_loop_->BelongsToCurrentThread());
+ DCHECK(task_runner_->BelongsToCurrentThread());
base::ScopedClosureRunner runner(BindToCurrentLoop(closure));
if (state_ == kUninitialized)
@@ -221,7 +221,7 @@ bool VpxVideoDecoder::HasAlpha() const {
}
void VpxVideoDecoder::DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer) {
- DCHECK(message_loop_->BelongsToCurrentThread());
+ DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK_NE(state_, kUninitialized);
DCHECK_NE(state_, kDecodeFinished);
DCHECK_NE(state_, kError);
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698