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

Unified Diff: chromecast/media/cma/test/media_component_device_feeder_for_test.cc

Issue 1267563003: [Chromecast] Add explicit task_runner in CMA test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove spurious changes Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/test/media_component_device_feeder_for_test.cc
diff --git a/chromecast/media/cma/test/media_component_device_feeder_for_test.cc b/chromecast/media/cma/test/media_component_device_feeder_for_test.cc
index 84cc3da2b0762928ae1d54d5c052ea709b00deed..313bd8c0e5a97d2d9d41dfcf3949bc563de3a908 100644
--- a/chromecast/media/cma/test/media_component_device_feeder_for_test.cc
+++ b/chromecast/media/cma/test/media_component_device_feeder_for_test.cc
@@ -13,7 +13,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
-#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chromecast/media/base/decrypt_context.h"
@@ -25,6 +24,7 @@
#include "chromecast/media/cma/base/decoder_buffer_base.h"
#include "chromecast/media/cma/test/frame_segmenter_for_test.h"
#include "media/base/audio_decoder_config.h"
+#include "media/base/bind_to_current_loop.h"
#include "media/base/buffers.h"
#include "media/base/decoder_buffer.h"
#include "media/base/video_decoder_config.h"
@@ -78,12 +78,11 @@ void MediaComponentDeviceFeederForTest::Feed() {
DCHECK(!frames_.empty());
scoped_refptr<DecoderBufferBase> buffer = frames_.front();
- MediaComponentDevice::FrameStatus status =
- media_component_device_->PushFrame(
- scoped_refptr<DecryptContext>(),
- buffer,
+ MediaComponentDevice::FrameStatus status = media_component_device_->PushFrame(
+ scoped_refptr<DecryptContext>(), buffer,
+ ::media::BindToCurrentLoop(
base::Bind(&MediaComponentDeviceFeederForTest::OnFramePushed,
- base::Unretained(this)));
+ base::Unretained(this))));
EXPECT_NE(status, MediaComponentDevice::kFrameFailed);
frames_.pop_front();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698