Index: media/cdm/ppapi/cdm_paths.gni |
diff --git a/media/cdm/ppapi/cdm_paths.gni b/media/cdm/ppapi/cdm_paths.gni |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cf00c9cb28d7f5e099d392968c7596c1d54a2942 |
--- /dev/null |
+++ b/media/cdm/ppapi/cdm_paths.gni |
@@ -0,0 +1,39 @@ |
+# Copyright 2016 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 file defines output paths for the CDM adapters and CDMs. |
+ |
+# Naming and folder structure below are following the recommendation for chrome |
+# components. Component-updated CDMs must following the same recommendation. |
+ |
+# Note: This file must be in sync with cdm_paths.cc |
+# TODO(xhwang): Auto generate paths in C++ from build variables so we don't |
+# need this note. |
+ |
+# OS name for components is close to "target_os" but has some differences. |
+# Explicitly define what we use to avoid confusion. |
+if (is_chromeos) { |
+ component_os = "cros" |
+} else if (is_linux) { |
+ component_os = "linux" |
+} else if (is_win) { |
+ component_os = "win" |
+} else if (is_mac) { |
+ component_os = "mac" |
+} else { |
+ component_os = "$target_os" |
+} |
+ |
+if (is_win || is_mac) { |
+ # Architecture name for components is the same as "<(target_cpu)". |
+ _platform_specific_path = |
+ "_platform_specific/$component_os" + "_" + "$target_cpu" |
+ |
+ # Path of Clear Key and Widevine CDMs relative to the output dir. |
+ clearkey_cdm_path = "ClearKeyCdm/$_platform_specific_path" |
+ widevine_cdm_path = "WidevineCdm/$_platform_specific_path" |
+} else { |
+ clearkey_cdm_path = "." |
+ widevine_cdm_path = "." |
+} |