Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / webidl / VideoColorSpace.webidl
blobc2ff8e81ad61fde71fe3d84dc018cde3fc46e6b0
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://w3c.github.io/webcodecs/#videocolorspace
8  */
10 [Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"]
11 interface VideoColorSpace {
12   [Throws]
13   constructor(optional VideoColorSpaceInit init = {});
15   readonly attribute VideoColorPrimaries? primaries;
16   readonly attribute VideoTransferCharacteristics? transfer;
17   readonly attribute VideoMatrixCoefficients? matrix;
18   readonly attribute boolean? fullRange;
20   // https://github.com/w3c/webcodecs/issues/486
21   [Default] object toJSON();
24 dictionary VideoColorSpaceInit {
25   VideoColorPrimaries? primaries = null;
26   VideoTransferCharacteristics? transfer = null;
27   VideoMatrixCoefficients? matrix = null;
28   boolean? fullRange = null;
31 enum VideoColorPrimaries {
32   "bt709",      // BT.709, sRGB
33   "bt470bg",    // BT.601 PAL
34   "smpte170m",  // BT.601 NTSC
35   "bt2020",     // BT.2020, BT.2100
36   "smpte432",   // P3 D65
39 enum VideoTransferCharacteristics {
40   "bt709",         // BT.709
41   "smpte170m",     // BT.601 (functionally the same as bt709)
42   "iec61966-2-1",  // sRGB
43   "linear",        // linear RGB
44   "pq",            // BT.2100 PQ
45   "hlg",           // BT.2100 HLG
48 enum VideoMatrixCoefficients {
49   "rgb",        // sRGB
50   "bt709",      // BT.709
51   "bt470bg",    // BT.601 PAL
52   "smpte170m",  // BT.601 NTSC (functionally the same as bt470bg)
53   "bt2020-ncl", // BT.2020 NCL