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 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/synchronization/condition_variable.h" | 10 #include "base/synchronization/condition_variable.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // Signal the main test thread that more video was decoded. | 146 // Signal the main test thread that more video was decoded. |
147 base::AutoLock auto_lock(lock_); | 147 base::AutoLock auto_lock(lock_); |
148 ++total_video_frames_decoded_; | 148 ++total_video_frames_decoded_; |
149 cond_.Signal(); | 149 cond_.Signal(); |
150 } | 150 } |
151 | 151 |
152 const scoped_refptr<StandaloneCastEnvironment> cast_environment_; | 152 const scoped_refptr<StandaloneCastEnvironment> cast_environment_; |
153 scoped_ptr<VideoDecoder> video_decoder_; | 153 scoped_ptr<VideoDecoder> video_decoder_; |
154 gfx::Size next_frame_size_; | 154 gfx::Size next_frame_size_; |
155 base::TimeDelta next_frame_timestamp_; | 155 base::TimeDelta next_frame_timestamp_; |
156 uint32 last_frame_id_; | 156 uint32_t last_frame_id_; |
157 bool seen_a_decoded_frame_; | 157 bool seen_a_decoded_frame_; |
158 | 158 |
159 Vp8Encoder vp8_encoder_; | 159 Vp8Encoder vp8_encoder_; |
160 | 160 |
161 base::Lock lock_; | 161 base::Lock lock_; |
162 base::ConditionVariable cond_; | 162 base::ConditionVariable cond_; |
163 int total_video_frames_feed_in_; | 163 int total_video_frames_feed_in_; |
164 int total_video_frames_decoded_; | 164 int total_video_frames_decoded_; |
165 | 165 |
166 DISALLOW_COPY_AND_ASSIGN(VideoDecoderTest); | 166 DISALLOW_COPY_AND_ASSIGN(VideoDecoderTest); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 WaitForAllVideoToBeDecoded(); | 221 WaitForAllVideoToBeDecoded(); |
222 } | 222 } |
223 | 223 |
224 INSTANTIATE_TEST_CASE_P(, | 224 INSTANTIATE_TEST_CASE_P(, |
225 VideoDecoderTest, | 225 VideoDecoderTest, |
226 ::testing::Values(CODEC_VIDEO_VP8)); | 226 ::testing::Values(CODEC_VIDEO_VP8)); |
227 | 227 |
228 } // namespace cast | 228 } // namespace cast |
229 } // namespace media | 229 } // namespace media |
OLD | NEW |