tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

KeySystemNames.h (2345B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef DOM_MEDIA_EME_KEY_SYSTEM_NAMES_H_
      8 #define DOM_MEDIA_EME_KEY_SYSTEM_NAMES_H_
      9 
     10 // Header for key system names. Keep these separate from some of our other
     11 // EME utils because want to use these strings in contexts where other utils
     12 // may not build correctly. Specifically at time of writing:
     13 // - The GMP doesn't have prefs available, so we want to avoid utils that
     14 //   touch the pref service.
     15 // - The clear key CDM links a limited subset of what normal Fx does, so we
     16 //   need to avoid any utils that touch things like XUL.
     17 
     18 namespace mozilla {
     19 // EME Key System Strings.
     20 inline constexpr char kClearKeyKeySystemName[] = "org.w3.clearkey";
     21 inline constexpr char kClearKeyWithProtectionQueryKeySystemName[] =
     22    "org.mozilla.clearkey_with_protection_query";
     23 inline constexpr char kWidevineKeySystemName[] = "com.widevine.alpha";
     24 #ifdef MOZ_WMF_CDM
     25 // A sub key system of `kWidevineKeySystem` only used in experiments.
     26 inline constexpr char kWidevineExperimentKeySystemName[] =
     27    "com.widevine.alpha.experiment";
     28 // A sub key system of `kWidevineKeySystem` only used in experiments to support
     29 // hardware decryption with codecs that support clear lead.
     30 inline constexpr char kWidevineExperiment2KeySystemName[] =
     31    "com.widevine.alpha.experiment2";
     32 // API name used for searching GMP Wideivine L1 plugin.
     33 inline constexpr char kWidevineExperimentAPIName[] = "windows-mf-cdm";
     34 
     35 // https://learn.microsoft.com/en-us/playready/overview/key-system-strings
     36 inline constexpr char kPlayReadyKeySystemName[] =
     37    "com.microsoft.playready.recommendation";
     38 inline constexpr char kPlayReadyKeySystemHardware[] =
     39    "com.microsoft.playready.recommendation.3000";
     40 
     41 // A sub key system of `kPlayReadyKeySystemName` only used in experiments to
     42 // support hardware decryption with codecs that support clear lead.
     43 inline constexpr char kPlayReadyHardwareClearLeadKeySystemName[] =
     44    "com.microsoft.playready.recommendation.3000.clearlead";
     45 #endif
     46 }  // namespace mozilla
     47 
     48 #endif  // DOM_MEDIA_EME_KEY_SYSTEM_NAMES_H_