OLD | NEW |
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/macros.h" | 6 #include "base/macros.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "media/base/decoder_buffer.h" | 8 #include "media/base/decoder_buffer.h" |
9 #include "media/base/mock_filters.h" | 9 #include "media/base/mock_filters.h" |
10 #include "media/base/test_helpers.h" | 10 #include "media/base/test_helpers.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 message_loop_.RunUntilIdle(); | 213 message_loop_.RunUntilIdle(); |
214 | 214 |
215 // All pending callbacks must have been fired. | 215 // All pending callbacks must have been fired. |
216 DCHECK_EQ(pending_decode_requests_, 0); | 216 DCHECK_EQ(pending_decode_requests_, 0); |
217 DCHECK(!is_reset_pending_); | 217 DCHECK(!is_reset_pending_); |
218 } | 218 } |
219 | 219 |
220 base::MessageLoop message_loop_; | 220 base::MessageLoop message_loop_; |
221 VideoDecoderConfig current_config_; | 221 VideoDecoderConfig current_config_; |
222 | 222 |
223 scoped_ptr<FakeVideoDecoder> decoder_; | 223 std::unique_ptr<FakeVideoDecoder> decoder_; |
224 | 224 |
225 int num_input_buffers_; | 225 int num_input_buffers_; |
226 int num_decoded_frames_; | 226 int num_decoded_frames_; |
227 int num_bytes_decoded_; | 227 int num_bytes_decoded_; |
228 int total_bytes_in_buffers_; | 228 int total_bytes_in_buffers_; |
229 | 229 |
230 // Callback result/status. | 230 // Callback result/status. |
231 DecodeStatus last_decode_status_; | 231 DecodeStatus last_decode_status_; |
232 scoped_refptr<VideoFrame> last_decoded_frame_; | 232 scoped_refptr<VideoFrame> last_decoded_frame_; |
233 int pending_decode_requests_; | 233 int pending_decode_requests_; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 } | 422 } |
423 | 423 |
424 TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingReadAndPendingReset) { | 424 TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingReadAndPendingReset) { |
425 Initialize(); | 425 Initialize(); |
426 EnterPendingReadState(); | 426 EnterPendingReadState(); |
427 EnterPendingResetState(); | 427 EnterPendingResetState(); |
428 Destroy(); | 428 Destroy(); |
429 } | 429 } |
430 | 430 |
431 } // namespace media | 431 } // namespace media |
OLD | NEW |