| 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 "media/cdm/ppapi/external_clear_key/clear_key_cdm.h" | 5 #include "media/cdm/ppapi/external_clear_key/clear_key_cdm.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 | 585 |
| 586 host_->OnSessionReady(session_id); | 586 host_->OnSessionReady(session_id); |
| 587 } | 587 } |
| 588 | 588 |
| 589 void ClearKeyCdm::OnSessionClosed(uint32 session_id) { | 589 void ClearKeyCdm::OnSessionClosed(uint32 session_id) { |
| 590 host_->OnSessionClosed(session_id); | 590 host_->OnSessionClosed(session_id); |
| 591 } | 591 } |
| 592 | 592 |
| 593 void ClearKeyCdm::OnSessionError(uint32 session_id, | 593 void ClearKeyCdm::OnSessionError(uint32 session_id, |
| 594 media::MediaKeys::KeyError error_code, | 594 media::MediaKeys::KeyError error_code, |
| 595 int system_code) { | 595 uint32 system_code) { |
| 596 host_->OnSessionError( | 596 host_->OnSessionError( |
| 597 session_id, static_cast<cdm::MediaKeyError>(error_code), system_code); | 597 session_id, static_cast<cdm::MediaKeyError>(error_code), system_code); |
| 598 } | 598 } |
| 599 | 599 |
| 600 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) | 600 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) |
| 601 int64 ClearKeyCdm::CurrentTimeStampInMicroseconds() const { | 601 int64 ClearKeyCdm::CurrentTimeStampInMicroseconds() const { |
| 602 return output_timestamp_base_in_microseconds_ + | 602 return output_timestamp_base_in_microseconds_ + |
| 603 base::Time::kMicrosecondsPerSecond * | 603 base::Time::kMicrosecondsPerSecond * |
| 604 total_samples_generated_ / samples_per_second_; | 604 total_samples_generated_ / samples_per_second_; |
| 605 } | 605 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 | 665 |
| 666 void ClearKeyCdm::OnFileIOTestComplete(bool success) { | 666 void ClearKeyCdm::OnFileIOTestComplete(bool success) { |
| 667 DVLOG(1) << __FUNCTION__ << ": " << success; | 667 DVLOG(1) << __FUNCTION__ << ": " << success; |
| 668 std::string message = GetFileIOTestResultMessage(success); | 668 std::string message = GetFileIOTestResultMessage(success); |
| 669 host_->OnSessionMessage( | 669 host_->OnSessionMessage( |
| 670 last_session_id_, message.data(), message.size(), NULL, 0); | 670 last_session_id_, message.data(), message.size(), NULL, 0); |
| 671 file_io_test_runner_.reset(); | 671 file_io_test_runner_.reset(); |
| 672 } | 672 } |
| 673 | 673 |
| 674 } // namespace media | 674 } // namespace media |
| OLD | NEW |