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

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

Issue 306783002: [Cast] Clean-up: Merge AudioReceiverConfig+VideoReceiverConfig-->FrameReceiverConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 6 years, 6 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 | 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 <cstdlib> 5 #include <cstdlib>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/synchronization/condition_variable.h" 9 #include "base/synchronization/condition_variable.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "media/cast/cast_config.h" 12 #include "media/cast/cast_config.h"
13 #include "media/cast/test/utility/default_config.h"
13 #include "media/cast/test/utility/standalone_cast_environment.h" 14 #include "media/cast/test/utility/standalone_cast_environment.h"
14 #include "media/cast/test/utility/video_utility.h" 15 #include "media/cast/test/utility/video_utility.h"
15 #include "media/cast/video_receiver/video_decoder.h" 16 #include "media/cast/video_receiver/video_decoder.h"
16 #include "media/cast/video_sender/codecs/vp8/vp8_encoder.h" 17 #include "media/cast/video_sender/codecs/vp8/vp8_encoder.h"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 19
19 namespace media { 20 namespace media {
20 namespace cast { 21 namespace cast {
21 22
22 namespace { 23 namespace {
(...skipping 17 matching lines...) Expand all
40 public: 41 public:
41 VideoDecoderTest() 42 VideoDecoderTest()
42 : cast_environment_(new StandaloneCastEnvironment()), 43 : cast_environment_(new StandaloneCastEnvironment()),
43 vp8_encoder_(GetVideoSenderConfigForTest(), 0), 44 vp8_encoder_(GetVideoSenderConfigForTest(), 0),
44 cond_(&lock_) { 45 cond_(&lock_) {
45 vp8_encoder_.Initialize(); 46 vp8_encoder_.Initialize();
46 } 47 }
47 48
48 protected: 49 protected:
49 virtual void SetUp() OVERRIDE { 50 virtual void SetUp() OVERRIDE {
50 VideoReceiverConfig decoder_config; 51 FrameReceiverConfig decoder_config = GetDefaultVideoReceiverConfig();
51 decoder_config.use_external_decoder = false; 52 decoder_config.codec.video = GetParam();
52 decoder_config.codec = GetParam();
53 video_decoder_.reset(new VideoDecoder(cast_environment_, decoder_config)); 53 video_decoder_.reset(new VideoDecoder(cast_environment_, decoder_config));
54 CHECK_EQ(STATUS_VIDEO_INITIALIZED, video_decoder_->InitializationResult()); 54 CHECK_EQ(STATUS_VIDEO_INITIALIZED, video_decoder_->InitializationResult());
55 55
56 next_frame_timestamp_ = base::TimeDelta(); 56 next_frame_timestamp_ = base::TimeDelta();
57 last_frame_id_ = 0; 57 last_frame_id_ = 0;
58 seen_a_decoded_frame_ = false; 58 seen_a_decoded_frame_ = false;
59 59
60 total_video_frames_feed_in_ = 0; 60 total_video_frames_feed_in_ = 0;
61 total_video_frames_decoded_ = 0; 61 total_video_frames_decoded_ = 0;
62 } 62 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 WaitForAllVideoToBeDecoded(); 178 WaitForAllVideoToBeDecoded();
179 } 179 }
180 180
181 INSTANTIATE_TEST_CASE_P(VideoDecoderTestScenarios, 181 INSTANTIATE_TEST_CASE_P(VideoDecoderTestScenarios,
182 VideoDecoderTest, 182 VideoDecoderTest,
183 ::testing::Values(transport::kVp8)); 183 ::testing::Values(transport::kVp8));
184 184
185 } // namespace cast 185 } // namespace cast
186 } // namespace media 186 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698