| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 const std::vector<uint8>& init_data) { | 178 const std::vector<uint8>& init_data) { |
| 179 app_->OnEncryptedMediaInitData(init_data_type, init_data, &decryptor_); | 179 app_->OnEncryptedMediaInitData(init_data_type, init_data, &decryptor_); |
| 180 } | 180 } |
| 181 | 181 |
| 182 private: | 182 private: |
| 183 class TestCdmContext : public CdmContext { | 183 class TestCdmContext : public CdmContext { |
| 184 public: | 184 public: |
| 185 TestCdmContext(Decryptor* decryptor) : decryptor_(decryptor) {} | 185 TestCdmContext(Decryptor* decryptor) : decryptor_(decryptor) {} |
| 186 | 186 |
| 187 Decryptor* GetDecryptor() final { return decryptor_; } | 187 Decryptor* GetDecryptor() final { return decryptor_; } |
| 188 | |
| 189 #if defined(ENABLE_BROWSER_CDMS) | |
| 190 int GetCdmId() const final { return kInvalidCdmId; } | 188 int GetCdmId() const final { return kInvalidCdmId; } |
| 191 #endif | |
| 192 | 189 |
| 193 private: | 190 private: |
| 194 Decryptor* decryptor_; | 191 Decryptor* decryptor_; |
| 195 }; | 192 }; |
| 196 | 193 |
| 197 AesDecryptor decryptor_; | 194 AesDecryptor decryptor_; |
| 198 TestCdmContext cdm_context_; | 195 TestCdmContext cdm_context_; |
| 199 scoped_ptr<AppBase> app_; | 196 scoped_ptr<AppBase> app_; |
| 200 }; | 197 }; |
| 201 | 198 |
| (...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 | 1607 |
| 1611 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1608 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 1612 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 1609 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 1613 Play(); | 1610 Play(); |
| 1614 ASSERT_TRUE(WaitUntilOnEnded()); | 1611 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1615 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1612 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 1616 demuxer_->GetStartTime()); | 1613 demuxer_->GetStartTime()); |
| 1617 } | 1614 } |
| 1618 | 1615 |
| 1619 } // namespace media | 1616 } // namespace media |
| OLD | NEW |