Move protection system Ids to protection_system_ids.h

Change-Id: Ia22b89c38b3b1ff7ead05f8484e15edef6218953
This commit is contained in:
KongQun Yang 2018-09-17 15:23:38 -07:00
parent cb77b65117
commit 5a912815c1
16 changed files with 49 additions and 36 deletions

View File

@ -16,14 +16,10 @@
#include "packager/base/strings/string_number_conversions.h" #include "packager/base/strings/string_number_conversions.h"
#include "packager/base/strings/stringprintf.h" #include "packager/base/strings/stringprintf.h"
#include "packager/hls/base/media_playlist.h" #include "packager/hls/base/media_playlist.h"
#include "packager/media/base/common_pssh_generator.h" #include "packager/media/base/protection_system_ids.h"
#include "packager/media/base/fairplay_pssh_generator.h"
#include "packager/media/base/protection_system_specific_info.h" #include "packager/media/base/protection_system_specific_info.h"
#include "packager/media/base/proto_json_util.h" #include "packager/media/base/proto_json_util.h"
#include "packager/media/base/raw_key_source.h"
#include "packager/media/base/widevine_key_source.h"
#include "packager/media/base/widevine_pssh_data.pb.h" #include "packager/media/base/widevine_pssh_data.pb.h"
#include "packager/media/base/widevine_pssh_generator.h"
DEFINE_bool(enable_legacy_widevine_hls_signaling, DEFINE_bool(enable_legacy_widevine_hls_signaling,
false, false,

View File

@ -14,13 +14,9 @@
#include "packager/base/files/file_path.h" #include "packager/base/files/file_path.h"
#include "packager/hls/base/mock_media_playlist.h" #include "packager/hls/base/mock_media_playlist.h"
#include "packager/hls/base/simple_hls_notifier.h" #include "packager/hls/base/simple_hls_notifier.h"
#include "packager/media/base/common_pssh_generator.h" #include "packager/media/base/protection_system_ids.h"
#include "packager/media/base/fairplay_pssh_generator.h"
#include "packager/media/base/protection_system_specific_info.h" #include "packager/media/base/protection_system_specific_info.h"
#include "packager/media/base/raw_key_source.h"
#include "packager/media/base/widevine_key_source.h"
#include "packager/media/base/widevine_pssh_data.pb.h" #include "packager/media/base/widevine_pssh_data.pb.h"
#include "packager/media/base/widevine_pssh_generator.h"
DECLARE_bool(enable_legacy_widevine_hls_signaling); DECLARE_bool(enable_legacy_widevine_hls_signaling);

View File

@ -6,6 +6,8 @@
#include "packager/media/base/common_pssh_generator.h" #include "packager/media/base/common_pssh_generator.h"
#include "packager/media/base/protection_system_ids.h"
namespace shaka { namespace shaka {
namespace media { namespace media {
namespace { namespace {

View File

@ -12,13 +12,6 @@
namespace shaka { namespace shaka {
namespace media { namespace media {
// Common SystemID defined by EME, which requires Key System implementations
// supporting ISO Common Encryption to support this SystemID and format.
// https://goo.gl/kUv2Xd
const uint8_t kCommonSystemId[] = {0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2,
0x4d, 0x02, 0xac, 0xe3, 0x3c, 0x1e,
0x52, 0xe2, 0xfb, 0x4b};
class CommonPsshGenerator : public PsshGenerator { class CommonPsshGenerator : public PsshGenerator {
public: public:
CommonPsshGenerator(); CommonPsshGenerator();

View File

@ -6,6 +6,8 @@
#include "packager/media/base/fairplay_pssh_generator.h" #include "packager/media/base/fairplay_pssh_generator.h"
#include "packager/media/base/protection_system_ids.h"
namespace shaka { namespace shaka {
namespace media { namespace media {
namespace { namespace {

View File

@ -12,12 +12,6 @@
namespace shaka { namespace shaka {
namespace media { namespace media {
// Unofficial FairPlay system id extracted from
// https://forums.developer.apple.com/thread/6185.
const uint8_t kFairPlaySystemId[] = {0x29, 0x70, 0x1F, 0xE4, 0x3C, 0xC7,
0x4A, 0x34, 0x8C, 0x5B, 0xAE, 0x90,
0xC7, 0x43, 0x9A, 0x47};
class FairPlayPsshGenerator : public PsshGenerator { class FairPlayPsshGenerator : public PsshGenerator {
public: public:
FairPlayPsshGenerator(); FairPlayPsshGenerator();

View File

@ -81,6 +81,7 @@
'playready_pssh_generator.cc', 'playready_pssh_generator.cc',
'playready_pssh_generator.h', 'playready_pssh_generator.h',
'producer_consumer_queue.h', 'producer_consumer_queue.h',
'protection_system_ids.h',
'protection_system_specific_info.cc', 'protection_system_specific_info.cc',
'protection_system_specific_info.h', 'protection_system_specific_info.h',
'proto_json_util.cc', 'proto_json_util.cc',

View File

@ -15,7 +15,7 @@
#include "packager/media/base/buffer_writer.h" #include "packager/media/base/buffer_writer.h"
#include "packager/media/base/http_key_fetcher.h" #include "packager/media/base/http_key_fetcher.h"
#include "packager/media/base/key_source.h" #include "packager/media/base/key_source.h"
#include "packager/media/base/playready_pssh_generator.h" #include "packager/media/base/protection_system_ids.h"
#include "packager/status_macros.h" #include "packager/status_macros.h"
namespace shaka { namespace shaka {

View File

@ -17,6 +17,7 @@
#include "packager/base/strings/string_number_conversions.h" #include "packager/base/strings/string_number_conversions.h"
#include "packager/base/strings/string_util.h" #include "packager/base/strings/string_util.h"
#include "packager/media/base/buffer_writer.h" #include "packager/media/base/buffer_writer.h"
#include "packager/media/base/protection_system_ids.h"
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -12,11 +12,6 @@
namespace shaka { namespace shaka {
namespace media { namespace media {
// SystemID defined for PlayReady Drm.
const uint8_t kPlayReadySystemId[] = {0x9a, 0x04, 0xf0, 0x79, 0x98, 0x40,
0x42, 0x86, 0xab, 0x92, 0xe6, 0x5b,
0xe0, 0x88, 0x5f, 0x95};
class PlayReadyPsshGenerator : public PsshGenerator { class PlayReadyPsshGenerator : public PsshGenerator {
public: public:
PlayReadyPsshGenerator(); PlayReadyPsshGenerator();

View File

@ -0,0 +1,37 @@
// Copyright 2018 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#ifndef PACKAGER_MEDIA_BASE_PROTECTION_SYSTEM_IDS_H_
#define PACKAGER_MEDIA_BASE_PROTECTION_SYSTEM_IDS_H_
namespace shaka {
namespace media {
// Common SystemID defined by EME, which requires Key System implementations
// supporting ISO Common Encryption to support this SystemID and format.
// https://goo.gl/kUv2Xd
const uint8_t kCommonSystemId[] = {0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2,
0x4d, 0x02, 0xac, 0xe3, 0x3c, 0x1e,
0x52, 0xe2, 0xfb, 0x4b};
// Unofficial FairPlay system id extracted from
// https://forums.developer.apple.com/thread/6185.
const uint8_t kFairPlaySystemId[] = {0x29, 0x70, 0x1F, 0xE4, 0x3C, 0xC7,
0x4A, 0x34, 0x8C, 0x5B, 0xAE, 0x90,
0xC7, 0x43, 0x9A, 0x47};
const uint8_t kPlayReadySystemId[] = {0x9a, 0x04, 0xf0, 0x79, 0x98, 0x40,
0x42, 0x86, 0xab, 0x92, 0xe6, 0x5b,
0xe0, 0x88, 0x5f, 0x95};
const uint8_t kWidevineSystemId[] = {0xed, 0xef, 0x8b, 0xa9, 0x79, 0xd6,
0x4a, 0xce, 0xa3, 0xc8, 0x27, 0xdc,
0xd5, 0x1d, 0x21, 0xed};
} // namespace media
} // namespace shaka
#endif // PACKAGER_MEDIA_BASE_PROTECTION_SYSTEM_IDS_H_

View File

@ -9,7 +9,6 @@
#include <algorithm> #include <algorithm>
#include "packager/base/logging.h" #include "packager/base/logging.h"
#include "packager/base/strings/string_number_conversions.h" #include "packager/base/strings/string_number_conversions.h"
#include "packager/media/base/common_pssh_generator.h"
#include "packager/media/base/key_source.h" #include "packager/media/base/key_source.h"
#include "packager/status_macros.h" #include "packager/status_macros.h"

View File

@ -12,13 +12,13 @@
#include "packager/media/base/http_key_fetcher.h" #include "packager/media/base/http_key_fetcher.h"
#include "packager/media/base/network_util.h" #include "packager/media/base/network_util.h"
#include "packager/media/base/producer_consumer_queue.h" #include "packager/media/base/producer_consumer_queue.h"
#include "packager/media/base/protection_system_ids.h"
#include "packager/media/base/protection_system_specific_info.h" #include "packager/media/base/protection_system_specific_info.h"
#include "packager/media/base/proto_json_util.h" #include "packager/media/base/proto_json_util.h"
#include "packager/media/base/pssh_generator_util.h" #include "packager/media/base/pssh_generator_util.h"
#include "packager/media/base/rcheck.h" #include "packager/media/base/rcheck.h"
#include "packager/media/base/request_signer.h" #include "packager/media/base/request_signer.h"
#include "packager/media/base/widevine_common_encryption.pb.h" #include "packager/media/base/widevine_common_encryption.pb.h"
#include "packager/media/base/widevine_pssh_generator.h"
namespace shaka { namespace shaka {
namespace media { namespace media {

View File

@ -12,8 +12,8 @@
#include "packager/base/base64.h" #include "packager/base/base64.h"
#include "packager/base/strings/string_number_conversions.h" #include "packager/base/strings/string_number_conversions.h"
#include "packager/base/strings/stringprintf.h" #include "packager/base/strings/stringprintf.h"
#include "packager/media/base/common_pssh_generator.h"
#include "packager/media/base/key_fetcher.h" #include "packager/media/base/key_fetcher.h"
#include "packager/media/base/protection_system_ids.h"
#include "packager/media/base/request_signer.h" #include "packager/media/base/request_signer.h"
#include "packager/media/base/widevine_key_source.h" #include "packager/media/base/widevine_key_source.h"
#include "packager/media/base/widevine_pssh_generator.h" #include "packager/media/base/widevine_pssh_generator.h"

View File

@ -6,6 +6,7 @@
#include "packager/media/base/widevine_pssh_generator.h" #include "packager/media/base/widevine_pssh_generator.h"
#include "packager/media/base/protection_system_ids.h"
#include "packager/media/base/widevine_pssh_data.pb.h" #include "packager/media/base/widevine_pssh_data.pb.h"
namespace shaka { namespace shaka {

View File

@ -13,10 +13,6 @@
namespace shaka { namespace shaka {
namespace media { namespace media {
const uint8_t kWidevineSystemId[] = {0xed, 0xef, 0x8b, 0xa9, 0x79, 0xd6,
0x4a, 0xce, 0xa3, 0xc8, 0x27, 0xdc,
0xd5, 0x1d, 0x21, 0xed};
class WidevinePsshGenerator : public PsshGenerator { class WidevinePsshGenerator : public PsshGenerator {
public: public:
explicit WidevinePsshGenerator(FourCC protection_scheme); explicit WidevinePsshGenerator(FourCC protection_scheme);