[M120 Migration][MM] Framerate calculation
[platform/framework/web/chromium-efl.git] / media / mojo / mojom / output_protection.mojom
1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module media.mojom;
6
7 // An interface to query output protection status and enable output protection
8 // on links that support it.
9
10 interface OutputProtection {
11   [Stable, Extensible]
12   enum ProtectionType {
13     [Default] NONE = 0,
14     HDCP = 1,
15   };
16
17   // Video output link types.
18   [Stable, Extensible]
19   enum LinkType {
20     [Default] NONE = 0,
21     UNKNOWN = 1,
22     INTERNAL = 2,
23     VGA = 4,
24     HDMI = 8,
25     DVI = 16,
26     DISPLAYPORT = 32,
27     NETWORK = 64,
28   };
29
30   // Queries link status and protection status.
31   // Clients need to query status periodically in order to detect changes.
32   //
33   // - success: Whether the query succeeded. If false, values of |link_mask| and
34   //   |protection_mask| should be ignored.
35   // - link_mask: The type of connected output links, which is a bit-mask of the
36   //   LinkType values.
37   // - protection_mask: The type of enabled protections, which is a bit-mask of
38   //   the ProtectionType values.
39   QueryStatus() => (bool success, uint32 link_mask, uint32 protection_mask);
40
41   // Sets desired protection methods.
42   //
43   // When the desired protection method(s) have been applied to all applicable
44   // output links, the relevant bit(s) of the |protection_mask| returned by
45   // QueryStatus() will be set. Otherwise, the relevant bit(s) of
46   // |protection_mask| will not be set; there is no separate error code or
47   // callback.
48   //
49   // Protections will be disabled if no longer desired by all instances.
50   //
51   // - desired_protection_mask: The desired protection methods, which
52   //   is a bit-mask of the ProtectionType values.
53   // - success: True when the protection request has been made. This may be
54   //   before the protection have actually been applied. Call QueryStatus() to
55   //   get protection status. False if it failed to make the protection request,
56   //   and in this case there is no need to call QueryStatus().
57   EnableProtection(uint32 desired_protection_mask) => (bool success);
58 };