summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2019-02-08 13:48:02 -0600
committertrav90 <travawine@protonmail.ch>2019-02-08 13:48:02 -0600
commit8279f15d49dc14ec158c6457fd266adc1bfbb12e (patch)
tree8757450655d54b9eb4b1b70630b14aa6843f8d25 /dom
parent34bfc1f409b4cafa65dbc4f3087c349eb1a1dec4 (diff)
downloadUXP-8279f15d49dc14ec158c6457fd266adc1bfbb12e.tar
UXP-8279f15d49dc14ec158c6457fd266adc1bfbb12e.tar.gz
UXP-8279f15d49dc14ec158c6457fd266adc1bfbb12e.tar.lz
UXP-8279f15d49dc14ec158c6457fd266adc1bfbb12e.tar.xz
UXP-8279f15d49dc14ec158c6457fd266adc1bfbb12e.zip
[EME] Add content_decryption_module_ext.h
Diffstat (limited to 'dom')
-rw-r--r--dom/media/gmp/widevine-adapter/content_decryption_module_ext.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/dom/media/gmp/widevine-adapter/content_decryption_module_ext.h b/dom/media/gmp/widevine-adapter/content_decryption_module_ext.h
new file mode 100644
index 000000000..5df8344e6
--- /dev/null
+++ b/dom/media/gmp/widevine-adapter/content_decryption_module_ext.h
@@ -0,0 +1,64 @@
+// Copyright 2017 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 CDM_CONTENT_DECRYPTION_MODULE_EXT_H_
+#define CDM_CONTENT_DECRYPTION_MODULE_EXT_H_
+
+#if defined(_WIN32)
+#include <windows.h>
+#endif
+
+#include "content_decryption_module_export.h"
+
+#if defined(_MSC_VER)
+typedef unsigned int uint32_t;
+#else
+#include <stdint.h>
+#endif
+
+namespace cdm {
+
+#if defined(_WIN32)
+typedef wchar_t FilePathCharType;
+typedef HANDLE PlatformFile;
+const PlatformFile kInvalidPlatformFile = INVALID_HANDLE_VALUE;
+#else
+typedef char FilePathCharType;
+typedef int PlatformFile;
+const PlatformFile kInvalidPlatformFile = -1;
+#endif // defined(_WIN32)
+
+struct HostFile {
+ HostFile(const FilePathCharType* file_path,
+ PlatformFile file,
+ PlatformFile sig_file)
+ : file_path(file_path), file(file), sig_file(sig_file) {}
+
+ // File that is part of the host of the CDM.
+ const FilePathCharType* file_path = nullptr;
+ PlatformFile file = kInvalidPlatformFile;
+
+ // Signature file for |file|.
+ PlatformFile sig_file = kInvalidPlatformFile;
+};
+
+} // namespace cdm
+
+extern "C" {
+
+// Functions in this file are dynamically retrieved by their versioned function
+// names. Increment the version number for any backward incompatible API
+// changes.
+
+// Verifies CDM host. All files in |host_files| are opened in read-only mode.
+//
+// Returns false and closes all files if there is an immediate failure.
+// Otherwise returns true as soon as possible and processes the files
+// asynchronously. All files MUST be closed by the CDM after this one-time
+// processing is finished.
+CDM_API bool VerifyCdmHost_0(const cdm::HostFile* host_files,
+ uint32_t num_files);
+}
+
+#endif // CDM_CONTENT_DECRYPTION_MODULE_EXT_H_