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_
12 namespace chromecast
{
15 enum class InitDataMessageType
{
18 ENABLE_SECURE_STOP
= 0x2,
22 // Structured data for EME initialization as parsed from an initData blob.
23 struct 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
);
39 } // namespace chromecast
41 #endif // CHROMECAST_MEDIA_CDM_INIT_DATA_H_