| 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 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 5 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
| 6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 cdm::AudioFrames* audio_frames) OVERRIDE; | 63 cdm::AudioFrames* audio_frames) OVERRIDE; |
| 64 virtual void Destroy() OVERRIDE; | 64 virtual void Destroy() OVERRIDE; |
| 65 virtual void OnPlatformChallengeResponse( | 65 virtual void OnPlatformChallengeResponse( |
| 66 const cdm::PlatformChallengeResponse& response) OVERRIDE; | 66 const cdm::PlatformChallengeResponse& response) OVERRIDE; |
| 67 virtual void OnQueryOutputProtectionStatus( | 67 virtual void OnQueryOutputProtectionStatus( |
| 68 uint32_t link_mask, uint32_t output_protection_mask) OVERRIDE; | 68 uint32_t link_mask, uint32_t output_protection_mask) OVERRIDE; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 // Emulates a session stored for |session_id_for_emulated_loadsession_|. This | 71 // Emulates a session stored for |session_id_for_emulated_loadsession_|. This |
| 72 // is necessary since aes_decryptor.cc does not support storing sessions. | 72 // is necessary since aes_decryptor.cc does not support storing sessions. |
| 73 void UpdateLoadableSession(); | 73 void LoadLoadableSession(); |
| 74 | 74 |
| 75 // ContentDecryptionModule callbacks. | 75 // ContentDecryptionModule callbacks. |
| 76 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); | 76 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); |
| 77 void OnSessionMessage(uint32 session_id, | 77 void OnSessionMessage(uint32 session_id, |
| 78 const std::vector<uint8>& message, | 78 const std::vector<uint8>& message, |
| 79 const std::string& destination_url); | 79 const std::string& destination_url); |
| 80 void OnSessionReady(uint32 session_id); | 80 void OnSessionReady(uint32 session_id); |
| 81 void OnSessionClosed(uint32 session_id); | 81 void OnSessionClosed(uint32 session_id); |
| 82 void OnSessionError(uint32 session_id, | 82 void OnSessionError(uint32 session_id, |
| 83 MediaKeys::KeyError error_code, | 83 MediaKeys::KeyError error_code, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 uint32 last_session_id_; | 126 uint32 last_session_id_; |
| 127 std::string next_heartbeat_message_; | 127 std::string next_heartbeat_message_; |
| 128 | 128 |
| 129 // TODO(xhwang): Extract testing code from main implementation. | 129 // TODO(xhwang): Extract testing code from main implementation. |
| 130 // See http://crbug.com/341751 | 130 // See http://crbug.com/341751 |
| 131 uint32 session_id_for_emulated_loadsession_; | 131 uint32 session_id_for_emulated_loadsession_; |
| 132 | 132 |
| 133 // Timer delay in milliseconds for the next host_->SetTimer() call. | 133 // Timer delay in milliseconds for the next host_->SetTimer() call. |
| 134 int64 timer_delay_ms_; | 134 int64 timer_delay_ms_; |
| 135 | 135 |
| 136 // Indicates whether a timer has been set to prevent multiple timers from | 136 // Indicates whether a heartbeat timer has been set to prevent multiple timers |
| 137 // running. | 137 // from running. |
| 138 bool timer_set_; | 138 bool heartbeat_timer_set_; |
| 139 | 139 |
| 140 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) | 140 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) |
| 141 int channel_count_; | 141 int channel_count_; |
| 142 int bits_per_channel_; | 142 int bits_per_channel_; |
| 143 int samples_per_second_; | 143 int samples_per_second_; |
| 144 int64 output_timestamp_base_in_microseconds_; | 144 int64 output_timestamp_base_in_microseconds_; |
| 145 int total_samples_generated_; | 145 int total_samples_generated_; |
| 146 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER | 146 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER |
| 147 | 147 |
| 148 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER) | 148 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER) |
| 149 scoped_ptr<FFmpegCdmAudioDecoder> audio_decoder_; | 149 scoped_ptr<FFmpegCdmAudioDecoder> audio_decoder_; |
| 150 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER | 150 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER |
| 151 | 151 |
| 152 scoped_ptr<CdmVideoDecoder> video_decoder_; | 152 scoped_ptr<CdmVideoDecoder> video_decoder_; |
| 153 | 153 |
| 154 scoped_ptr<FileIOTestRunner> file_io_test_runner_; | 154 scoped_ptr<FileIOTestRunner> file_io_test_runner_; |
| 155 | 155 |
| 156 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 156 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace media | 159 } // namespace media |
| 160 | 160 |
| 161 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 161 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
| OLD | NEW |