OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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" |
(...skipping 22 matching lines...) Expand all Loading... |
33 config.max_frame_rate = kFrameRate; | 33 config.max_frame_rate = kFrameRate; |
34 return config; | 34 return config; |
35 } | 35 } |
36 | 36 |
37 } // namespace | 37 } // namespace |
38 | 38 |
39 class VideoDecoderTest : public ::testing::TestWithParam<Codec> { | 39 class VideoDecoderTest : public ::testing::TestWithParam<Codec> { |
40 public: | 40 public: |
41 VideoDecoderTest() | 41 VideoDecoderTest() |
42 : cast_environment_(new StandaloneCastEnvironment()), | 42 : cast_environment_(new StandaloneCastEnvironment()), |
43 vp8_encoder_(GetVideoSenderConfigForTest(), 0), | 43 vp8_encoder_(GetVideoSenderConfigForTest()), |
44 cond_(&lock_) { | 44 cond_(&lock_) { |
45 vp8_encoder_.Initialize(); | 45 vp8_encoder_.Initialize(); |
46 } | 46 } |
47 | 47 |
48 virtual ~VideoDecoderTest() { | 48 virtual ~VideoDecoderTest() { |
49 // Make sure all threads have stopped before the environment goes away. | 49 // Make sure all threads have stopped before the environment goes away. |
50 cast_environment_->Shutdown(); | 50 cast_environment_->Shutdown(); |
51 } | 51 } |
52 | 52 |
53 protected: | 53 protected: |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 185 } |
186 WaitForAllVideoToBeDecoded(); | 186 WaitForAllVideoToBeDecoded(); |
187 } | 187 } |
188 | 188 |
189 INSTANTIATE_TEST_CASE_P(VideoDecoderTestScenarios, | 189 INSTANTIATE_TEST_CASE_P(VideoDecoderTestScenarios, |
190 VideoDecoderTest, | 190 VideoDecoderTest, |
191 ::testing::Values(CODEC_VIDEO_VP8)); | 191 ::testing::Values(CODEC_VIDEO_VP8)); |
192 | 192 |
193 } // namespace cast | 193 } // namespace cast |
194 } // namespace media | 194 } // namespace media |
OLD | NEW |