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.
5 #ifndef CHROMECAST_PUBLIC_MEDIA_DECRYPT_CONTEXT_H_
6 #define CHROMECAST_PUBLIC_MEDIA_DECRYPT_CONTEXT_H_
11 #include "cast_key_system.h"
13 namespace chromecast
{
15 class CastDecoderBuffer
;
17 // Provides the information needed to decrypt frames.
18 class DecryptContext
{
20 virtual ~DecryptContext() {}
22 // Get the key system to use for decryption.
23 virtual CastKeySystem
GetKeySystem() = 0;
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;
32 } // namespace chromecast
34 #endif // CHROMECAST_PUBLIC_MEDIA_DECRYPT_CONTEXT_H_