OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMECAST_PUBLIC_MEDIA_DECRYPT_CONTEXT_H_ |
| 6 #define CHROMECAST_PUBLIC_MEDIA_DECRYPT_CONTEXT_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 #include <vector> |
| 10 |
| 11 #include "cast_key_system.h" |
| 12 |
| 13 namespace chromecast { |
| 14 namespace media { |
| 15 class CastDecoderBuffer; |
| 16 |
| 17 // Provides the information needed to decrypt frames. |
| 18 class DecryptContext { |
| 19 public: |
| 20 virtual ~DecryptContext() {} |
| 21 |
| 22 // Get the key system to use for decryption. |
| 23 virtual CastKeySystem GetKeySystem() = 0; |
| 24 |
| 25 // Decrypts the given buffer. Returns true/false for success/failure, |
| 26 // and places the decrypted data in output if successful. |
| 27 virtual bool Decrypt(CastDecoderBuffer* buffer, |
| 28 std::vector<uint8_t>* output) = 0; |
| 29 }; |
| 30 |
| 31 } // namespace media |
| 32 } // namespace chromecast |
| 33 |
| 34 #endif // CHROMECAST_PUBLIC_MEDIA_DECRYPT_CONTEXT_H_ |
OLD | NEW |