cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chromecast / media / base / decrypt_context_impl.h
blobc2a5b96213256fd323aa16dcee2f04cca7e885df
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
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_
6 #define CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "chromecast/media/base/key_systems_common.h"
11 #include "chromecast/public/media/decrypt_context.h"
13 namespace crypto {
14 class SymmetricKey;
17 namespace chromecast {
18 namespace media {
20 // Base class of a decryption context: a decryption context gathers all the
21 // information needed to decrypt frames with a given key id.
22 // Each CDM should implement this and add fields needed to fully describe a
23 // decryption context.
25 class DecryptContextImpl : public DecryptContext {
26 public:
27 explicit DecryptContextImpl(CastKeySystem key_system);
28 ~DecryptContextImpl() override;
30 // DecryptContext implementation:
31 CastKeySystem GetKeySystem() override;
32 bool Decrypt(CastDecoderBuffer* buffer,
33 std::vector<uint8_t>* output) override;
35 // Returns the clear key if available, NULL otherwise.
36 virtual crypto::SymmetricKey* GetKey() const;
38 private:
39 CastKeySystem key_system_;
41 DISALLOW_COPY_AND_ASSIGN(DecryptContextImpl);
44 } // namespace media
45 } // namespace chromecast
47 #endif // CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_