Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: media/formats/webm/webm_crypto_helpers.h

Issue 2174533002: Implement WebM subsample support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_ 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_
6 #define MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_ 6 #define MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "media/base/decoder_buffer.h" 12 #include "media/base/decoder_buffer.h"
13 #include "media/base/media_export.h"
13 14
14 namespace media { 15 namespace media {
15 16
16 // Fills an initialized DecryptConfig, which can be sent to the Decryptor if 17 // Fills an initialized DecryptConfig, which can be sent to the Decryptor if
17 // the stream has potentially encrypted frames. Also sets |data_offset| which 18 // the stream has potentially encrypted frames. Also sets |data_offset| which
18 // indicates where the encrypted data starts. Leaving the IV empty will tell 19 // indicates where the encrypted data starts. Leaving the IV empty will tell
19 // the decryptor that the frame is unencrypted. Returns true if |data| is valid, 20 // the decryptor that the frame is unencrypted. Returns true if |data| is valid,
20 // false otherwise, in which case |decrypt_config| and |data_offset| will not be 21 // false otherwise, in which case |decrypt_config| and |data_offset| will not be
21 // changed. Current encrypted WebM request for comments specification is here 22 // changed. Current encrypted WebM request for comments specification is here
22 // http://wiki.webmproject.org/encryption/webm-encryption-rfc 23 // http://wiki.webmproject.org/encryption/webm-encryption-rfc
23 bool WebMCreateDecryptConfig(const uint8_t* data, 24 bool MEDIA_EXPORT
24 int data_size, 25 WebMCreateDecryptConfig(const uint8_t* data,
25 const uint8_t* key_id, 26 int data_size,
26 int key_id_size, 27 const uint8_t* key_id,
27 std::unique_ptr<DecryptConfig>* decrypt_config, 28 int key_id_size,
28 int* data_offset); 29 std::unique_ptr<DecryptConfig>* decrypt_config,
30 int* data_offset);
29 31
30 } // namespace media 32 } // namespace media
31 33
32 #endif // MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_ 34 #endif // MEDIA_FORMATS_WEBM_WEBM_CRYPTO_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698