1// Copyright (c) 2012 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. 4 5#ifndef WIDEVINE_CDM_WIDEVINE_CDM_COMMON_H_ 6#define WIDEVINE_CDM_WIDEVINE_CDM_COMMON_H_ 7 8#include "base/files/file_path.h" 9 10// This file defines constants common to all Widevine CDM versions. 11 12// Widevine CDM version contains 4 components, e.g. 1.4.0.195. 13const int kWidevineCdmVersionNumComponents = 4; 14 15// "alpha" is a temporary name until a convention is defined. 16const char kWidevineKeySystem[] = "com.widevine.alpha"; 17 18const char kWidevineCdmDisplayName[] = "Widevine Content Decryption Module"; 19// Will be parsed as HTML. 20const char kWidevineCdmDescription[] = 21 "Enables Widevine licenses for playback of HTML audio/video content."; 22 23#if defined(ENABLE_PEPPER_CDMS) 24const char kWidevineCdmPluginMimeType[] = "application/x-ppapi-widevine-cdm"; 25const char kWidevineCdmPluginMimeTypeDescription[] = 26 "Widevine Content Decryption Module"; 27 28// File name of the CDM on different platforms. 29const char kWidevineCdmFileName[] = 30#if defined(OS_MACOSX) 31 "libwidevinecdm.dylib"; 32#elif defined(OS_WIN) 33 "widevinecdm.dll"; 34#else // OS_LINUX, etc. 35 "libwidevinecdm.so"; 36#endif 37 38// File name of the adapter on different platforms. 39const char kWidevineCdmAdapterFileName[] = 40#if defined(OS_MACOSX) 41 "widevinecdmadapter.plugin"; 42#elif defined(OS_WIN) 43 "widevinecdmadapter.dll"; 44#else // OS_LINUX, etc. 45 "libwidevinecdmadapter.so"; 46#endif 47 48// The following strings are used to communicate supported codecs (from the 49// component manifest) via WebPluginInfo::WebPluginMimeType's additional params. 50const char kCdmSupportedCodecsParamName[] = "codecs"; 51const char kCdmSupportedCodecsValueDelimiter = ','; 52const char kCdmSupportedCodecVorbis[] = "vorbis"; 53const char kCdmSupportedCodecVp8[] = "vp8"; 54const char kCdmSupportedCodecVp9[] = "vp9.0"; 55#if defined(USE_PROPRIETARY_CODECS) 56const char kCdmSupportedCodecAac[] = "aac"; 57const char kCdmSupportedCodecAvc1[] = "avc1"; 58#endif // defined(USE_PROPRIETARY_CODECS) 59 60#if defined(OS_MACOSX) || defined(OS_WIN) 61// CDM is installed by the component installer instead of the Chrome installer. 62#define WIDEVINE_CDM_IS_COMPONENT 63#endif // defined(OS_MACOSX) || defined(OS_WIN) 64#endif // defined(ENABLE_PEPPER_CDMS) 65 66#endif // WIDEVINE_CDM_WIDEVINE_CDM_COMMON_H_ 67