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

Side by Side Diff: media/cast/video_receiver/video_decoder_unittest.cc

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
8 #include "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
9 #include "media/cast/cast_config.h" 9 #include "media/cast/cast_config.h"
10 #include "media/cast/cast_defines.h" 10 #include "media/cast/cast_defines.h"
(...skipping 25 matching lines...) Expand all
36 private: 36 private:
37 friend class base::RefCountedThreadSafe<DecodeTestFrameCallback>; 37 friend class base::RefCountedThreadSafe<DecodeTestFrameCallback>;
38 }; 38 };
39 } // namespace 39 } // namespace
40 40
41 class VideoDecoderTest : public ::testing::Test { 41 class VideoDecoderTest : public ::testing::Test {
42 protected: 42 protected:
43 VideoDecoderTest() 43 VideoDecoderTest()
44 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), 44 : task_runner_(new test::FakeTaskRunner(&testing_clock_)),
45 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, 45 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_,
46 task_runner_, task_runner_, task_runner_, task_runner_)), 46 task_runner_, task_runner_, task_runner_, task_runner_,
47 GetDefaultCastLoggingConfig())),
47 test_callback_(new DecodeTestFrameCallback()) { 48 test_callback_(new DecodeTestFrameCallback()) {
48 // Configure to vp8. 49 // Configure to vp8.
49 config_.codec = kVp8; 50 config_.codec = kVp8;
50 config_.use_external_decoder = false; 51 config_.use_external_decoder = false;
51 decoder_.reset(new VideoDecoder(config_, cast_environment_)); 52 decoder_.reset(new VideoDecoder(config_, cast_environment_));
52 testing_clock_.Advance( 53 testing_clock_.Advance(
53 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 54 base::TimeDelta::FromMilliseconds(kStartMillisecond));
54 } 55 }
55 56
56 virtual ~VideoDecoderTest() {} 57 virtual ~VideoDecoderTest() {}
(...skipping 27 matching lines...) Expand all
84 EXPECT_DEATH( 85 EXPECT_DEATH(
85 decoder_->DecodeVideoFrame(&encoded_frame, render_time, base::Bind( 86 decoder_->DecodeVideoFrame(&encoded_frame, render_time, base::Bind(
86 &DecodeTestFrameCallback::DecodeComplete, test_callback_)), 87 &DecodeTestFrameCallback::DecodeComplete, test_callback_)),
87 "Invalid codec"); 88 "Invalid codec");
88 } 89 }
89 90
90 // TODO(pwestin): Test decoding a real frame. 91 // TODO(pwestin): Test decoding a real frame.
91 92
92 } // namespace cast 93 } // namespace cast
93 } // namespace media 94 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/video_receiver/codecs/vp8/vp8_decoder.cc ('k') | media/cast/video_receiver/video_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698