cc: Fix high/low res scale collisions
[chromium-blink-merge.git] / media / formats / webm / webm_crypto_helpers.h
blob41ad5b13edf3dbfa2c158422b8a7b817a53542b2
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 MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_
6 #define MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/decoder_buffer.h"
12 namespace media {
14 // Fills an initialized DecryptConfig, which can be sent to the Decryptor if
15 // the stream has potentially encrypted frames. Also sets |data_offset| which
16 // indicates where the encrypted data starts. Leaving the IV empty will tell
17 // the decryptor that the frame is unencrypted. Returns true if |data| is valid,
18 // false otherwise, in which case |decrypt_config| and |data_offset| will not be
19 // changed. Current encrypted WebM request for comments specification is here
20 // http://wiki.webmproject.org/encryption/webm-encryption-rfc
21 bool WebMCreateDecryptConfig(const uint8* data, int data_size,
22 const uint8* key_id, int key_id_size,
23 scoped_ptr<DecryptConfig>* decrypt_config,
24 int* data_offset);
26 } // namespace media
28 #endif // MEDIA_FORMATS_WEBM_WEBM_CRYPT_HELPERS_H_