| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BLINK_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_ | 5 #ifndef MEDIA_BLINK_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_ |
| 6 #define MEDIA_BLINK_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_ | 6 #define MEDIA_BLINK_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_ |
| 7 | 7 |
| 8 #include "media/base/decryptor.h" | 8 #include "media/base/decryptor.h" |
| 9 #include "media/base/demuxer.h" | 9 #include "media/base/demuxer.h" |
| 10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 const unsigned char* init_data, | 39 const unsigned char* init_data, |
| 40 unsigned init_data_length, | 40 unsigned init_data_length, |
| 41 const blink::WebString& session_id) = 0; | 41 const blink::WebString& session_id) = 0; |
| 42 | 42 |
| 43 virtual blink::WebMediaPlayer::MediaKeyException CancelKeyRequest( | 43 virtual blink::WebMediaPlayer::MediaKeyException CancelKeyRequest( |
| 44 const blink::WebString& key_system, | 44 const blink::WebString& key_system, |
| 45 const blink::WebString& session_id) = 0; | 45 const blink::WebString& session_id) = 0; |
| 46 | 46 |
| 47 | 47 |
| 48 // Unprefixed API methods. | 48 // Unprefixed API methods. |
| 49 virtual void SetInitialContentDecryptionModule( |
| 50 blink::WebContentDecryptionModule* cdm) = 0; |
| 51 |
| 49 virtual void SetContentDecryptionModule( | 52 virtual void SetContentDecryptionModule( |
| 50 blink::WebContentDecryptionModule* cdm) = 0; | 53 blink::WebContentDecryptionModule* cdm) = 0; |
| 51 virtual void SetContentDecryptionModule( | 54 virtual void SetContentDecryptionModule( |
| 52 blink::WebContentDecryptionModule* cdm, | 55 blink::WebContentDecryptionModule* cdm, |
| 53 blink::WebContentDecryptionModuleResult result) = 0; | 56 blink::WebContentDecryptionModuleResult result) = 0; |
| 54 virtual void SetContentDecryptionModuleSync( | |
| 55 blink::WebContentDecryptionModule* cdm) = 0; | |
| 56 | 57 |
| 57 | 58 |
| 58 // Callback factory and notification methods used by WebMediaPlayerImpl. | 59 // Callback factory and notification methods used by WebMediaPlayerImpl. |
| 59 | 60 |
| 60 // Creates a callback that Demuxers can use to signal that the content | 61 // Creates a callback that Demuxers can use to signal that the content |
| 61 // requires a key. This method make sure the callback returned can be safely | 62 // requires a key. This method make sure the callback returned can be safely |
| 62 // invoked from any thread. | 63 // invoked from any thread. |
| 63 virtual Demuxer::NeedKeyCB CreateNeedKeyCB() = 0; | 64 virtual Demuxer::NeedKeyCB CreateNeedKeyCB() = 0; |
| 64 | 65 |
| 65 // Creates a callback that renderers can use to set decryptor | 66 // Creates a callback that renderers can use to set decryptor |
| 66 // ready callback. This method make sure the callback returned can be safely | 67 // ready callback. This method make sure the callback returned can be safely |
| 67 // invoked from any thread. | 68 // invoked from any thread. |
| 68 virtual SetDecryptorReadyCB CreateSetDecryptorReadyCB() = 0; | 69 virtual SetDecryptorReadyCB CreateSetDecryptorReadyCB() = 0; |
| 69 | 70 |
| 70 // Called to inform this object that the media pipeline encountered | 71 // Called to inform this object that the media pipeline encountered |
| 71 // and handled a decryption error. | 72 // and handled a decryption error. |
| 72 virtual void OnPipelineDecryptError() = 0; | 73 virtual void OnPipelineDecryptError() = 0; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 DISALLOW_COPY_AND_ASSIGN(EncryptedMediaPlayerSupport); | 76 DISALLOW_COPY_AND_ASSIGN(EncryptedMediaPlayerSupport); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace media | 79 } // namespace media |
| 79 | 80 |
| 80 #endif // MEDIA_BLINK_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_ | 81 #endif // MEDIA_BLINK_ENCRYPTED_MEDIA_PLAYER_SUPPORT_H_ |
| OLD | NEW |