| 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/location.h" | 6 #include "base/location.h" |
| 7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 supported_profile.profile = media::VP8PROFILE_ANY; | 46 supported_profile.profile = media::VP8PROFILE_ANY; |
| 47 supported_profiles_.push_back(supported_profile); | 47 supported_profiles_.push_back(supported_profile); |
| 48 | 48 |
| 49 EXPECT_CALL(*mock_gpu_factories_.get(), GetTaskRunner()) | 49 EXPECT_CALL(*mock_gpu_factories_.get(), GetTaskRunner()) |
| 50 .WillRepeatedly(Return(vda_task_runner_)); | 50 .WillRepeatedly(Return(vda_task_runner_)); |
| 51 EXPECT_CALL(*mock_gpu_factories_.get(), | 51 EXPECT_CALL(*mock_gpu_factories_.get(), |
| 52 GetVideoDecodeAcceleratorSupportedProfiles()) | 52 GetVideoDecodeAcceleratorSupportedProfiles()) |
| 53 .WillRepeatedly(Return(supported_profiles_)); | 53 .WillRepeatedly(Return(supported_profiles_)); |
| 54 EXPECT_CALL(*mock_gpu_factories_.get(), DoCreateVideoDecodeAccelerator()) | 54 EXPECT_CALL(*mock_gpu_factories_.get(), DoCreateVideoDecodeAccelerator()) |
| 55 .WillRepeatedly(Return(mock_vda_)); | 55 .WillRepeatedly(Return(mock_vda_)); |
| 56 EXPECT_CALL(*mock_vda_, Initialize(_, _)) | 56 EXPECT_CALL(*mock_vda_, Initialize(_, _, _)) |
| 57 .Times(1) | 57 .Times(1) |
| 58 .WillRepeatedly(Return(true)); | 58 .WillRepeatedly(Return(true)); |
| 59 EXPECT_CALL(*mock_vda_, Destroy()).Times(1); | 59 EXPECT_CALL(*mock_vda_, Destroy()).Times(1); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void TearDown() override { | 62 void TearDown() override { |
| 63 DVLOG(2) << "TearDown"; | 63 DVLOG(2) << "TearDown"; |
| 64 EXPECT_TRUE(vda_thread_.IsRunning()); | 64 EXPECT_TRUE(vda_thread_.IsRunning()); |
| 65 RunUntilIdle(); // Wait until all callbascks complete. | 65 RunUntilIdle(); // Wait until all callbascks complete. |
| 66 vda_task_runner_->DeleteSoon(FROM_HERE, rtc_decoder_.release()); | 66 vda_task_runner_->DeleteSoon(FROM_HERE, rtc_decoder_.release()); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 EXPECT_FALSE(rtc_decoder_->IsFirstBufferAfterReset(RTCVideoDecoder::ID_LAST, | 236 EXPECT_FALSE(rtc_decoder_->IsFirstBufferAfterReset(RTCVideoDecoder::ID_LAST, |
| 237 RTCVideoDecoder::ID_LAST)); | 237 RTCVideoDecoder::ID_LAST)); |
| 238 EXPECT_TRUE( | 238 EXPECT_TRUE( |
| 239 rtc_decoder_->IsFirstBufferAfterReset(0, RTCVideoDecoder::ID_LAST)); | 239 rtc_decoder_->IsFirstBufferAfterReset(0, RTCVideoDecoder::ID_LAST)); |
| 240 EXPECT_FALSE( | 240 EXPECT_FALSE( |
| 241 rtc_decoder_->IsFirstBufferAfterReset(1, RTCVideoDecoder::ID_LAST)); | 241 rtc_decoder_->IsFirstBufferAfterReset(1, RTCVideoDecoder::ID_LAST)); |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // content | 244 } // content |
| OLD | NEW |