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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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: |
54 virtual void SetUp() OVERRIDE { | 54 virtual void SetUp() override { |
55 video_decoder_.reset(new VideoDecoder(cast_environment_, GetParam())); | 55 video_decoder_.reset(new VideoDecoder(cast_environment_, GetParam())); |
56 CHECK_EQ(STATUS_VIDEO_INITIALIZED, video_decoder_->InitializationResult()); | 56 CHECK_EQ(STATUS_VIDEO_INITIALIZED, video_decoder_->InitializationResult()); |
57 | 57 |
58 next_frame_timestamp_ = base::TimeDelta(); | 58 next_frame_timestamp_ = base::TimeDelta(); |
59 last_frame_id_ = 0; | 59 last_frame_id_ = 0; |
60 seen_a_decoded_frame_ = false; | 60 seen_a_decoded_frame_ = false; |
61 | 61 |
62 total_video_frames_feed_in_ = 0; | 62 total_video_frames_feed_in_ = 0; |
63 total_video_frames_decoded_ = 0; | 63 total_video_frames_decoded_ = 0; |
64 } | 64 } |
(...skipping 120 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 |