blob: 089eb513e968dea36cd79e3e648e0e092ced3818 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module media.mojom;
import "media/mojo/mojom/media_types.mojom";
// Mojo struct for
// `fidl::InterfaceRequest<fuchsia::media::drm::ContentDecryptionModule>`.
struct CdmRequest {
handle<platform> request;
};
// Mojo struct for `fidl::InterfaceRequest<fuchsia::media::StreamProcessor>`.
struct StreamProcessorRequest {
handle<platform> request;
};
enum VideoDecoderSecureMemoryMode {
// Input and output buffers are not protected.
CLEAR,
// Input and output buffers must be allocated in protected memory.
SECURE,
// Input buffers are not protected. Output buffers may be allocated in
// protected memory.
CLEAR_INPUT,
};
// Interface used by the renderer to connect to CDM and mediacodec resources.
// Instances are document-scoped.
interface FuchsiaMediaResourceProvider {
// Create connection to fuchsia::media::drm::ContentDecryptionModule for
// `key_system`. Implementation should make sure the persistent storage is
// isolated per web origin.
CreateCdm(string key_system, CdmRequest cdm_request);
// Create connection to fuchsia::media::StreamProcessor for the specified
// `codec`.
CreateVideoDecoder(VideoCodec codec, VideoDecoderSecureMemoryMode secure_mode,
StreamProcessorRequest stream_processor_request);
};
|