summaryrefslogtreecommitdiffstats
path: root/chromecast
diff options
context:
space:
mode:
authorcleichner <cleichner@chromium.org>2015-07-30 11:45:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-30 18:46:08 +0000
commit89ada2766db569000953e02db42d07eb59b05550 (patch)
tree8a80ad567df4c23250b4a6616d10f609e8897f3f /chromecast
parent9e900fd4f70e6477ae428d998233575870512ef4 (diff)
downloadchromium_src-89ada2766db569000953e02db42d07eb59b05550.zip
chromium_src-89ada2766db569000953e02db42d07eb59b05550.tar.gz
chromium_src-89ada2766db569000953e02db42d07eb59b05550.tar.bz2
Revert of [Chromecast] Add explicit task_runner in CMA test (patchset #4 id:60001 of https://codereview.chromium.org/1267563003/)
Reason for revert: This was actually necessary because of a bug in which I incorrectly used weak_ptr in the internal change. That problem was caught in code review so this is no longer necessary. Original issue's description: > [Chromecast] Use BindToCurrentLoop in CMA test > > Without this the callback posts tasks on whatever thread it's callback > was originally called on, which can cause it to not respect the CMA > pipeline's threading assumptions. > > Committed: https://crrev.com/9104732746ce7dd18dee6308581e8e7327bb99f1 > Cr-Commit-Position: refs/heads/master@{#341043} TBR=erickung@google.com,kmackay@chromium.org,lcwu@google.com,halliwell@chromium.org,lcwu@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1254223003 Cr-Commit-Position: refs/heads/master@{#341164}
Diffstat (limited to 'chromecast')
-rw-r--r--chromecast/media/cma/test/media_component_device_feeder_for_test.cc11
1 files changed, 6 insertions, 5 deletions
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 313bd8c..84cc3da 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,6 +13,7 @@
#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"
@@ -24,7 +25,6 @@
#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,11 +78,12 @@ void MediaComponentDeviceFeederForTest::Feed() {
DCHECK(!frames_.empty());
scoped_refptr<DecoderBufferBase> buffer = frames_.front();
- MediaComponentDevice::FrameStatus status = media_component_device_->PushFrame(
- scoped_refptr<DecryptContext>(), buffer,
- ::media::BindToCurrentLoop(
+ MediaComponentDevice::FrameStatus status =
+ media_component_device_->PushFrame(
+ scoped_refptr<DecryptContext>(),
+ buffer,
base::Bind(&MediaComponentDeviceFeederForTest::OnFramePushed,
- base::Unretained(this))));
+ base::Unretained(this)));
EXPECT_NE(status, MediaComponentDevice::kFrameFailed);
frames_.pop_front();