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/.
6 * The origin of this IDL file is
7 * https://www.w3.org/TR/webrtc-encoded-transform
10 // New enum for video frame types. Will eventually re-use the equivalent defined
12 enum RTCEncodedVideoFrameType {
18 dictionary RTCEncodedVideoFrameMetadata {
19 unsigned long long frameId;
20 sequence<unsigned long long> dependencies;
22 unsigned short height;
23 unsigned long spatialIndex;
24 unsigned long temporalIndex;
25 unsigned long synchronizationSource;
27 sequence<unsigned long> contributingSources;
28 long long timestamp; // microseconds
31 // New interfaces to define encoded video and audio frames. Will eventually
32 // re-use or extend the equivalent defined in WebCodecs.
33 [Pref="media.peerconnection.enabled",
34 Pref="media.peerconnection.scripttransform.enabled",
35 Exposed=(Window,DedicatedWorker)]
36 interface RTCEncodedVideoFrame {
37 readonly attribute RTCEncodedVideoFrameType type;
38 readonly attribute unsigned long timestamp;
39 attribute ArrayBuffer data;
40 RTCEncodedVideoFrameMetadata getMetadata();