Delete unused downloads page asset.
[chromium-blink-merge.git] / chromecast / media / cdm / chromecast_init_data.h
blobd7de627e64fd508a87031b679022ef22c411d246
1 // Copyright 2015 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_CDM_INIT_DATA_H_
6 #define CHROMECAST_MEDIA_CDM_INIT_DATA_H_
8 #include <stdint.h>
10 #include <vector>
12 namespace chromecast {
13 namespace media {
15 enum class InitDataMessageType {
16 UNKNOWN = 0x0,
17 CUSTOM_DATA = 0x1,
18 ENABLE_SECURE_STOP = 0x2,
19 END
22 // Structured data for EME initialization as parsed from an initData blob.
23 struct ChromecastInitData {
24 ChromecastInitData();
25 ~ChromecastInitData();
27 InitDataMessageType type;
28 std::vector<uint8_t> data;
31 // Searches for a ChromecastInitData blob inside a CENC |init_data| message of
32 // type |type|. If such a blob is found, returns true and fills
33 // |chromecast_init_data_out|. If not found, returns false.
34 bool FindChromecastInitData(const std::vector<uint8_t>& init_data,
35 InitDataMessageType type,
36 ChromecastInitData* chromecast_init_data_out);
38 } // namespace media
39 } // namespace chromecast
41 #endif // CHROMECAST_MEDIA_CDM_INIT_DATA_H_