Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chromecast / public / media / decrypt_context.h
blob05e5a1a02a07b8c3f37b49ec4c5486815d6eafba
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_
8 #include <stdint.h>
9 #include <vector>
11 #include "cast_key_system.h"
13 namespace chromecast {
14 namespace media {
15 class CastDecoderBuffer;
17 // Provides the information needed to decrypt frames.
18 class DecryptContext {
19 public:
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;
31 } // namespace media
32 } // namespace chromecast
34 #endif // CHROMECAST_PUBLIC_MEDIA_DECRYPT_CONTEXT_H_