[MediaRouter] Update MR-2-Extension's PostMessage to return boolean.
[chromium-blink-merge.git] / chromecast / media / cma / pipeline / decrypt_util.h
blob5a59afc86486897b693cce2fee2a2c1e4569ae92
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_CMA_PIPELINE_DECRYPT_UTIL_H_
6 #define CHROMECAST_MEDIA_CMA_PIPELINE_DECRYPT_UTIL_H_
8 #include "base/memory/ref_counted.h"
10 namespace crypto {
11 class SymmetricKey;
14 namespace chromecast {
15 namespace media {
17 class DecoderBufferBase;
19 // Create a new buffer which corresponds to the clear version of |buffer|.
20 // Note: the memory area corresponding to the ES data of the new buffer
21 // is the same as the ES data of |buffer| (for efficiency).
22 // After the function is called, |buffer| is left in a inconsistent state
23 // in the sense it has some decryption info but the ES data is now in clear.
24 scoped_refptr<DecoderBufferBase> DecryptDecoderBuffer(
25 const scoped_refptr<DecoderBufferBase>& buffer,
26 crypto::SymmetricKey* key);
28 } // namespace media
29 } // namespace chromecast
31 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_DECRYPT_UTIL_H_