| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "media/base/gmock_callback_support.h" | 9 #include "media/base/gmock_callback_support.h" |
| 10 #include "media/base/mock_filters.h" | 10 #include "media/base/mock_filters.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 decoder_selector_.reset(new VideoDecoderSelector( | 125 decoder_selector_.reset(new VideoDecoderSelector( |
| 126 message_loop_.message_loop_proxy(), | 126 message_loop_.message_loop_proxy(), |
| 127 all_decoders_.Pass(), | 127 all_decoders_.Pass(), |
| 128 set_decryptor_ready_cb)); | 128 set_decryptor_ready_cb)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void SelectDecoder() { | 131 void SelectDecoder() { |
| 132 decoder_selector_->SelectDecoder( | 132 decoder_selector_->SelectDecoder( |
| 133 demuxer_stream_.get(), | 133 demuxer_stream_.get(), |
| 134 false, | |
| 135 base::Bind(&VideoDecoderSelectorTest::MockOnDecoderSelected, | 134 base::Bind(&VideoDecoderSelectorTest::MockOnDecoderSelected, |
| 136 base::Unretained(this)), | 135 base::Unretained(this)), |
| 137 base::Bind(&VideoDecoderSelectorTest::FrameReady, | 136 base::Bind(&VideoDecoderSelectorTest::FrameReady, |
| 138 base::Unretained(this))); | 137 base::Unretained(this))); |
| 139 message_loop_.RunUntilIdle(); | 138 message_loop_.RunUntilIdle(); |
| 140 } | 139 } |
| 141 | 140 |
| 142 void SelectDecoderAndDestroy() { | 141 void SelectDecoderAndDestroy() { |
| 143 SelectDecoder(); | 142 SelectDecoder(); |
| 144 | 143 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 } | 350 } |
| 352 | 351 |
| 353 TEST_F(VideoDecoderSelectorTest, Destroy_EncryptedStream_DecryptAndDecode) { | 352 TEST_F(VideoDecoderSelectorTest, Destroy_EncryptedStream_DecryptAndDecode) { |
| 354 UseEncryptedStream(); | 353 UseEncryptedStream(); |
| 355 InitializeDecoderSelector(kHoldSetDecryptor, 1); | 354 InitializeDecoderSelector(kHoldSetDecryptor, 1); |
| 356 | 355 |
| 357 SelectDecoderAndDestroy(); | 356 SelectDecoderAndDestroy(); |
| 358 } | 357 } |
| 359 | 358 |
| 360 } // namespace media | 359 } // namespace media |
| OLD | NEW |