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

Unified Diff: content/common/gpu/media/v4l2_image_processor.cc

Issue 1135943005: Revert of content/common: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/common/gpu/media/v4l2_image_processor.cc
diff --git a/content/common/gpu/media/v4l2_image_processor.cc b/content/common/gpu/media/v4l2_image_processor.cc
index 4063e4c402aef3584271ae5f50bf62d74ec6cd0f..88946615877fff817e72e85e3b67f34f336b1146 100644
--- a/content/common/gpu/media/v4l2_image_processor.cc
+++ b/content/common/gpu/media/v4l2_image_processor.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
+#include "base/message_loop/message_loop_proxy.h"
#include "base/numerics/safe_conversions.h"
#include "content/common/gpu/media/v4l2_image_processor.h"
#include "media/base/bind_to_current_loop.h"
@@ -70,7 +71,7 @@
output_format_fourcc_(0),
input_planes_count_(0),
output_planes_count_(0),
- child_task_runner_(base::ThreadTaskRunnerHandle::Get()),
+ child_message_loop_proxy_(base::MessageLoopProxy::current()),
device_(device),
device_thread_("V4L2ImageProcessorThread"),
device_poll_thread_("V4L2ImageProcessorDevicePollThread"),
@@ -82,7 +83,7 @@
}
V4L2ImageProcessor::~V4L2ImageProcessor() {
- DCHECK(child_task_runner_->BelongsToCurrentThread());
+ DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
DCHECK(!device_thread_.IsRunning());
DCHECK(!device_poll_thread_.IsRunning());
@@ -91,8 +92,8 @@
}
void V4L2ImageProcessor::NotifyError() {
- if (!child_task_runner_->BelongsToCurrentThread())
- child_task_runner_->PostTask(FROM_HERE, error_cb_);
+ if (!child_message_loop_proxy_->BelongsToCurrentThread())
+ child_message_loop_proxy_->PostTask(FROM_HERE, error_cb_);
else
error_cb_.Run();
}
@@ -194,7 +195,7 @@
void V4L2ImageProcessor::Destroy() {
DVLOG(3) << __func__;
- DCHECK(child_task_runner_->BelongsToCurrentThread());
+ DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
// If the device thread is running, destroy using posted task.
if (device_thread_.IsRunning()) {
@@ -223,7 +224,7 @@
bool V4L2ImageProcessor::CreateInputBuffers() {
DVLOG(3) << __func__;
- DCHECK(child_task_runner_->BelongsToCurrentThread());
+ DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
DCHECK(!input_streamon_);
struct v4l2_control control;
@@ -294,7 +295,7 @@
bool V4L2ImageProcessor::CreateOutputBuffers() {
DVLOG(3) << __func__;
- DCHECK(child_task_runner_->BelongsToCurrentThread());
+ DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
DCHECK(!output_streamon_);
struct v4l2_format format;
@@ -357,7 +358,7 @@
}
void V4L2ImageProcessor::DestroyInputBuffers() {
- DCHECK(child_task_runner_->BelongsToCurrentThread());
+ DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
DCHECK(!input_streamon_);
struct v4l2_requestbuffers reqbufs;
@@ -372,7 +373,7 @@
}
void V4L2ImageProcessor::DestroyOutputBuffers() {
- DCHECK(child_task_runner_->BelongsToCurrentThread());
+ DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
DCHECK(!output_streamon_);
for (size_t buf = 0; buf < output_buffer_map_.size(); ++buf) {
@@ -569,7 +570,7 @@
DVLOG(3) << "Processing finished, returning frame, ts="
<< output_frame->timestamp().InMilliseconds();
- child_task_runner_->PostTask(
+ child_message_loop_proxy_->PostTask(
FROM_HERE, base::Bind(job_record->ready_cb, output_frame));
}
}
« no previous file with comments | « content/common/gpu/media/v4l2_image_processor.h ('k') | content/common/gpu/media/v4l2_slice_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698