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

Unified Diff: media/filters/ffmpeg_video_decoder_unittest.cc

Issue 9632024: Create video and audio decoder threads on demand. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switched to base::Bind() and reverted gyp change+new files Created 8 years, 9 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: media/filters/ffmpeg_video_decoder_unittest.cc
diff --git a/media/filters/ffmpeg_video_decoder_unittest.cc b/media/filters/ffmpeg_video_decoder_unittest.cc
index ec583abebd1cd9dd432627cf668830369f85117b..50b74bec93e12b7d259d69d653cc9176a0adc471 100644
--- a/media/filters/ffmpeg_video_decoder_unittest.cc
+++ b/media/filters/ffmpeg_video_decoder_unittest.cc
@@ -29,6 +29,11 @@ using ::testing::ReturnRef;
using ::testing::SaveArg;
using ::testing::StrictMock;
+namespace {
Ami GONE FROM CHROMIUM 2012/03/09 16:15:06 media code eschews anonymous namespaces in favor o
tommi (sloooow) - chröme 2012/03/11 18:49:36 Done.
+// Used to inject our message loop into the FFmpegVideoDecoder.
+template<class T> T Identity(T t) { return t; }
+} // end namespace
+
namespace media {
static const VideoFrame::Format kVideoFormat = VideoFrame::YV12;
@@ -48,7 +53,8 @@ ACTION_P(ReturnBuffer, buffer) {
class FFmpegVideoDecoderTest : public testing::Test {
public:
FFmpegVideoDecoderTest()
- : decoder_(new FFmpegVideoDecoder(&message_loop_)),
+ : decoder_(new FFmpegVideoDecoder(base::Bind(&Identity<MessageLoop*>,
Ami GONE FROM CHROMIUM 2012/03/09 16:15:06 I'm surprised the <MessageLoop*> part is necessary
+ &message_loop_))),
demuxer_(new StrictMock<MockDemuxerStream>()),
read_cb_(base::Bind(&FFmpegVideoDecoderTest::FrameReady,
base::Unretained(this))) {

Powered by Google App Engine
This is Rietveld 408576698