blob: 87dc10d37bf3b74d5a47b8c7e96c1e75bee03351 [file] [log] [blame]
// 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.
module media.mojom;
// An interface to query output protection status and enable output protection
// on links that support it.
interface OutputProtection {
enum ProtectionType {
NONE = 0,
HDCP = 1,
};
// Video output link types.
enum LinkType {
NONE = 0,
UNKNOWN = 1,
INTERNAL = 2,
VGA = 4,
HDMI = 8,
DVI = 16,
DISPLAYPORT = 32,
NETWORK = 64,
};
// Queries link status and protection status.
// Clients need to query status periodically in order to detect changes.
//
// - success: Whether the query succeeded. If false, values of |link_mask| and
// |protection_mask| should be ignored.
// - link_mask: The type of connected output links, which is a bit-mask of the
// LinkType values.
// - protection_mask: The type of enabled protections, which is a bit-mask of
// the ProtectionType values.
QueryStatus() => (bool success, uint32 link_mask, uint32 protection_mask);
// Sets desired protection methods.
//
// When the desired protection method(s) have been applied to all applicable
// output links, the relevant bit(s) of the |protection_mask| returned by
// QueryStatus() will be set. Otherwise, the relevant bit(s) of
// |protection_mask| will not be set; there is no separate error code or
// callback.
//
// Protections will be disabled if no longer desired by all instances.
//
// - desired_protection_mask: The desired protection methods, which
// is a bit-mask of the ProtectionType values.
// - success: True when the protection request has been made. This may be
// before the protection have actually been applied. Call QueryStatus() to
// get protection status. False if it failed to make the protection request,
// and in this case there is no need to call QueryStatus().
EnableProtection(uint32 desired_protection_mask) => (bool success);
};