summaryrefslogtreecommitdiff
path: root/chromium/third_party/widevine
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
commit679147eead574d186ebf3069647b4c23e8ccace6 (patch)
treefc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/third_party/widevine
downloadqtwebengine-chromium-679147eead574d186ebf3069647b4c23e8ccace6.tar.gz
Initial import.
Diffstat (limited to 'chromium/third_party/widevine')
-rw-r--r--chromium/third_party/widevine/OWNERS5
-rw-r--r--chromium/third_party/widevine/cdm/README.chromium8
-rw-r--r--chromium/third_party/widevine/cdm/widevine_cdm.gyp130
-rw-r--r--chromium/third_party/widevine/cdm/widevine_cdm_common.h56
-rw-r--r--chromium/third_party/widevine/cdm/widevine_cdm_version.h17
5 files changed, 216 insertions, 0 deletions
diff --git a/chromium/third_party/widevine/OWNERS b/chromium/third_party/widevine/OWNERS
new file mode 100644
index 00000000000..e8ae738b17c
--- /dev/null
+++ b/chromium/third_party/widevine/OWNERS
@@ -0,0 +1,5 @@
+set noparent
+ddorwin@chromium.org
+scherkus@chromium.org
+xhwang@chromium.org
+
diff --git a/chromium/third_party/widevine/cdm/README.chromium b/chromium/third_party/widevine/cdm/README.chromium
new file mode 100644
index 00000000000..6fb6a05350e
--- /dev/null
+++ b/chromium/third_party/widevine/cdm/README.chromium
@@ -0,0 +1,8 @@
+Name: Widevine CDM
+Version: 0
+License: Chromium
+Security Critical: yes
+
+Description:
+This directory contains build files for integrating the Widevine CDM into
+Chrome. No third-party files are checked in here.
diff --git a/chromium/third_party/widevine/cdm/widevine_cdm.gyp b/chromium/third_party/widevine/cdm/widevine_cdm.gyp
new file mode 100644
index 00000000000..a4185e6f772
--- /dev/null
+++ b/chromium/third_party/widevine/cdm/widevine_cdm.gyp
@@ -0,0 +1,130 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'widevine_cdm_version_h_file%': 'widevine_cdm_version.h',
+ 'widevine_cdm_binary_files%': [],
+ 'conditions': [
+ [ 'branding == "Chrome"', {
+ 'conditions': [
+ [ 'chromeos == 1', {
+ 'widevine_cdm_version_h_file%':
+ 'symbols/chromeos/<(target_arch)/widevine_cdm_version.h',
+ 'widevine_cdm_binary_files%': [
+ 'binaries/chromeos/<(target_arch)/libwidevinecdm.so',
+ ],
+ }],
+ [ 'OS == "linux" and chromeos == 0', {
+ 'widevine_cdm_version_h_file%':
+ 'symbols/linux/<(target_arch)/widevine_cdm_version.h',
+ 'widevine_cdm_binary_files%': [
+ 'binaries/linux/<(target_arch)/libwidevinecdm.so',
+ ],
+ }],
+ [ 'OS == "mac"', {
+ 'widevine_cdm_version_h_file%':
+ 'symbols/mac/<(target_arch)/widevine_cdm_version.h',
+ 'widevine_cdm_binary_files%': [
+ 'binaries/mac/<(target_arch)/libwidevinecdm.dylib',
+ ],
+ }],
+ [ 'OS == "win"', {
+ 'widevine_cdm_version_h_file%':
+ 'symbols/win/<(target_arch)/widevine_cdm_version.h',
+ 'widevine_cdm_binary_files%': [
+ 'binaries/win/<(target_arch)/widevinecdm.dll',
+ 'binaries/win/<(target_arch)/widevinecdm.dll.lib',
+ ],
+ }],
+ ],
+ }],
+ ],
+ },
+ # Always provide a target, so we can put the logic about whether there's
+ # anything to be done in this file (instead of a higher-level .gyp file).
+ 'targets': [
+ {
+ 'target_name': 'widevinecdmadapter',
+ 'type': 'none',
+ 'conditions': [
+ [ 'branding == "Chrome" and enable_pepper_cdms==1', {
+ 'dependencies': [
+ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
+ 'widevine_cdm_version_h',
+ 'widevine_cdm_binaries',
+ ],
+ 'sources': [
+ '<(DEPTH)/media/cdm/ppapi/api/content_decryption_module.h',
+ '<(DEPTH)/media/cdm/ppapi/cdm_wrapper.cc',
+ '<(DEPTH)/media/cdm/ppapi/linked_ptr.h',
+ ],
+ 'conditions': [
+ [ 'os_posix == 1 and OS != "mac"', {
+ 'cflags': ['-fvisibility=hidden'],
+ 'type': 'loadable_module',
+ # Allow the plugin wrapper to find the CDM in the same directory.
+ 'ldflags': ['-Wl,-rpath=\$$ORIGIN'],
+ 'libraries': [
+ # Copied by widevine_cdm_binaries.
+ '<(PRODUCT_DIR)/libwidevinecdm.so',
+ ],
+ }],
+ [ 'OS == "win"', {
+ 'type': 'shared_library',
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ 'msvs_disabled_warnings': [ 4267, ],
+ 'libraries': [
+ # Copied by widevine_cdm_binaries.
+ '<(PRODUCT_DIR)/widevinecdm.dll.lib',
+ ],
+ }],
+ [ 'OS == "mac"', {
+ 'type': 'loadable_module',
+ 'product_extension': 'plugin',
+ 'libraries': [
+ # Copied by widevine_cdm_binaries.
+ '<(PRODUCT_DIR)/libwidevinecdm.dylib',
+ ],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # Not to strip important symbols by -Wl,-dead_strip.
+ '-Wl,-exported_symbol,_PPP_GetInterface',
+ '-Wl,-exported_symbol,_PPP_InitializeModule',
+ '-Wl,-exported_symbol,_PPP_ShutdownModule',
+ ],
+ 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
+ },
+ }],
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'widevine_cdm_version_h',
+ 'type': 'none',
+ 'copies': [{
+ 'destination': '<(SHARED_INTERMEDIATE_DIR)',
+ 'files': [ '<(widevine_cdm_version_h_file)' ],
+ }],
+ },
+ {
+ 'target_name': 'widevine_cdm_binaries',
+ 'type': 'none',
+ 'conditions': [
+ [ 'OS=="mac"', {
+ 'xcode_settings': {
+ 'COPY_PHASE_STRIP': 'NO',
+ }
+ }],
+ ],
+ 'copies': [{
+ # TODO(ddorwin): Do we need a sub-directory? We either need a
+ # sub-directory or to rename manifest.json before we can copy it.
+ 'destination': '<(PRODUCT_DIR)',
+ 'files': [ '<@(widevine_cdm_binary_files)' ],
+ }],
+ },
+ ],
+}
diff --git a/chromium/third_party/widevine/cdm/widevine_cdm_common.h b/chromium/third_party/widevine/cdm/widevine_cdm_common.h
new file mode 100644
index 00000000000..7ea705cea3d
--- /dev/null
+++ b/chromium/third_party/widevine/cdm/widevine_cdm_common.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WIDEVINE_CDM_WIDEVINE_CDM_COMMON_H_
+#define WIDEVINE_CDM_WIDEVINE_CDM_COMMON_H_
+
+#include "base/files/file_path.h"
+
+// This file defines constants common to all Widevine CDM versions.
+
+// Widevine CDM version contains 4 components, e.g. 1.4.0.195.
+const int kWidevineCdmVersionNumComponents = 4;
+
+// "alpha" is a temporary name until a convention is defined.
+const char kWidevineKeySystem[] = "com.widevine.alpha";
+
+const char kWidevineCdmDisplayName[] = "Widevine Content Decryption Module";
+// Will be parsed as HTML.
+const char kWidevineCdmDescription[] =
+ "Enables Widevine licenses for playback of HTML audio/video content.";
+#if defined(ENABLE_PEPPER_CDMS)
+const char kWidevineCdmPluginMimeType[] = "application/x-ppapi-widevine-cdm";
+const char kWidevineCdmPluginMimeTypeDescription[] =
+ "Widevine Content Decryption Module";
+#endif
+
+// File name of the CDM on different platforms.
+const char kWidevineCdmFileName[] =
+#if defined(OS_MACOSX)
+ "libwidevinecdm.dylib";
+#elif defined(OS_WIN)
+ "widevinecdm.dll";
+#else // OS_LINUX, etc.
+ "libwidevinecdm.so";
+#endif
+
+#if defined(ENABLE_PEPPER_CDMS)
+// File name of the adapter on different platforms.
+const char kWidevineCdmAdapterFileName[] =
+#if defined(OS_MACOSX)
+ "widevinecdmadapter.plugin";
+#elif defined(OS_WIN)
+ "widevinecdmadapter.dll";
+#else // OS_LINUX, etc.
+ "libwidevinecdmadapter.so";
+#endif
+#endif // defined(ENABLE_PEPPER_CDMS)
+
+
+#if defined(ENABLE_PEPPER_CDMS) && (defined(OS_MACOSX) || defined(OS_WIN))
+// CDM is installed by the component installer instead of the Chrome installer.
+#define WIDEVINE_CDM_IS_COMPONENT
+#endif
+
+#endif // WIDEVINE_CDM_WIDEVINE_CDM_COMMON_H_
diff --git a/chromium/third_party/widevine/cdm/widevine_cdm_version.h b/chromium/third_party/widevine/cdm/widevine_cdm_version.h
new file mode 100644
index 00000000000..08aa5b9e940
--- /dev/null
+++ b/chromium/third_party/widevine/cdm/widevine_cdm_version.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This is a stand-in for a generated file that is available when the
+// Widevine CDM is available.
+
+#ifndef WIDEVINE_CDM_VERSION_H_
+#define WIDEVINE_CDM_VERSION_H_
+
+// If the Widevine CDM were available, we would include
+// third_party/widevine/cdm/widevine_cdm_common.h and define two things:
+// - WIDEVINE_CDM_AVAILABLE (to indicate availability), and
+// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
+// as a string, e.g., "1.0.123.456").
+
+#endif // WIDEVINE_CDM_VERSION_H_