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"
14 namespace chromecast
{
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
);
29 } // namespace chromecast
31 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_DECRYPT_UTIL_H_