| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "media/base/cdm_callback_promise.h" | 10 #include "media/base/cdm_callback_promise.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 const std::vector<uint8>& init_data) { | 212 const std::vector<uint8>& init_data) { |
| 213 app_->OnEncryptedMediaInitData(init_data_type, init_data, &decryptor_); | 213 app_->OnEncryptedMediaInitData(init_data_type, init_data, &decryptor_); |
| 214 } | 214 } |
| 215 | 215 |
| 216 private: | 216 private: |
| 217 class TestCdmContext : public CdmContext { | 217 class TestCdmContext : public CdmContext { |
| 218 public: | 218 public: |
| 219 TestCdmContext(Decryptor* decryptor) : decryptor_(decryptor) {} | 219 TestCdmContext(Decryptor* decryptor) : decryptor_(decryptor) {} |
| 220 | 220 |
| 221 Decryptor* GetDecryptor() final { return decryptor_; } | 221 Decryptor* GetDecryptor() final { return decryptor_; } |
| 222 | |
| 223 #if defined(ENABLE_BROWSER_CDMS) | |
| 224 int GetCdmId() const final { return kInvalidCdmId; } | 222 int GetCdmId() const final { return kInvalidCdmId; } |
| 225 #endif | |
| 226 | 223 |
| 227 private: | 224 private: |
| 228 Decryptor* decryptor_; | 225 Decryptor* decryptor_; |
| 229 }; | 226 }; |
| 230 | 227 |
| 231 AesDecryptor decryptor_; | 228 AesDecryptor decryptor_; |
| 232 TestCdmContext cdm_context_; | 229 TestCdmContext cdm_context_; |
| 233 scoped_ptr<AppBase> app_; | 230 scoped_ptr<AppBase> app_; |
| 234 }; | 231 }; |
| 235 | 232 |
| (...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1742 | 1739 |
| 1743 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1740 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 1744 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 1741 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 1745 Play(); | 1742 Play(); |
| 1746 ASSERT_TRUE(WaitUntilOnEnded()); | 1743 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1747 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1744 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 1748 demuxer_->GetStartTime()); | 1745 demuxer_->GetStartTime()); |
| 1749 } | 1746 } |
| 1750 | 1747 |
| 1751 } // namespace media | 1748 } // namespace media |
| OLD | NEW |