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

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

Issue 210303003: Cast: Remove LoggingStats in favor of event subscribers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 8 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 unified diff | Download patch
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class VideoDecoderTest : public ::testing::Test { 44 class VideoDecoderTest : public ::testing::Test {
45 protected: 45 protected:
46 VideoDecoderTest() 46 VideoDecoderTest()
47 : testing_clock_(new base::SimpleTestTickClock()), 47 : testing_clock_(new base::SimpleTestTickClock()),
48 task_runner_(new test::FakeSingleThreadTaskRunner(testing_clock_)), 48 task_runner_(new test::FakeSingleThreadTaskRunner(testing_clock_)),
49 cast_environment_( 49 cast_environment_(
50 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_), 50 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_),
51 task_runner_, 51 task_runner_,
52 task_runner_, 52 task_runner_,
53 task_runner_, 53 task_runner_)),
54 GetDefaultCastReceiverLoggingConfig())),
55 test_callback_(new DecodeTestFrameCallback()) { 54 test_callback_(new DecodeTestFrameCallback()) {
56 // Configure to vp8. 55 // Configure to vp8.
57 config_.codec = transport::kVp8; 56 config_.codec = transport::kVp8;
58 config_.use_external_decoder = false; 57 config_.use_external_decoder = false;
59 decoder_.reset(new VideoDecoder(config_, cast_environment_)); 58 decoder_.reset(new VideoDecoder(config_, cast_environment_));
60 testing_clock_->Advance( 59 testing_clock_->Advance(
61 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 60 base::TimeDelta::FromMilliseconds(kStartMillisecond));
62 } 61 }
63 62
64 virtual ~VideoDecoderTest() {} 63 virtual ~VideoDecoderTest() {}
(...skipping 18 matching lines...) Expand all
83 &encoded_frame, 82 &encoded_frame,
84 render_time, 83 render_time,
85 base::Bind(&DecodeTestFrameCallback::DecodeComplete, test_callback_)), 84 base::Bind(&DecodeTestFrameCallback::DecodeComplete, test_callback_)),
86 "Empty frame"); 85 "Empty frame");
87 } 86 }
88 87
89 // TODO(pwestin): Test decoding a real frame. 88 // TODO(pwestin): Test decoding a real frame.
90 89
91 } // namespace cast 90 } // namespace cast
92 } // namespace media 91 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698