blob: 12e45275b9aeeae705c91c2928a1e2621f32194a [file] [log] [blame]
// 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.
module media.mojom;
import "media/mojo/mojom/content_decryption_module.mojom";
import "media/mojo/mojom/media_types.mojom";
// TODO(xhwang): Use "set" instead of "array" if supported by mojom.
struct CdmCapability {
// List of audio codecs supported by the CDM (e.g. opus). This does not
// include codec profiles, as in general Chromium doesn't handle audio
// codec profiles separately. The list of supported codecs should be unique.
array<AudioCodec> audio_codecs;
// Map of video codecs and associated profiles supported by the CDM
// (e.g. vp8). If no profiles for a particular codec are specified, then
// it is assumed that all profiles are supported by the CDM. The list of
// profiles for each codec should be unique.
map<VideoCodec, array<VideoCodecProfile>> video_codecs;
array<EncryptionScheme> encryption_schemes;
array<CdmSessionType> session_types;
};
struct KeySystemCapability {
CdmCapability? sw_secure_capability;
CdmCapability? hw_secure_capability;
};
// Used to query the browser to see if a specific key system is supported.
interface KeySystemSupport {
// Query to determine if the browser supports the |key_system|. If supported,
// |key_system_capability| is non-null indicating supported capability.
// KeySystemSupport implementation is in the browser process, as it maintains
// the list of registered CDMs, and hardware secure support check also needs
// to run in the browser process because the render process is sandboxed.
// KeySystemSupport clients run in the renderer process.
// TODO(crbug.com/853264): Make this an async call.
[Sync]
IsKeySystemSupported(string key_system)
=> (bool is_supported, KeySystemCapability? key_system_capability);
};