summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/video_rvfc/video_frame_metadata.idl
blob: 3cb930db60eca65590c757533c6e41c0cc629186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright 2019 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.

// See https://wicg.github.io/video-rvfc/.

dictionary VideoFrameMetadata {
    // The time at which the user agent submitted the frame for composition.
    required DOMHighResTimeStamp presentationTime;

    // The time at which the user agent expects the frame to be visible.
    required DOMHighResTimeStamp expectedDisplayTime;

    // The visible width and height of the presented video frame.
    required unsigned long width;
    required unsigned long height;

    // The presentation timestamp in seconds of the frame presented. May not be
    // known to the compositor or exist in all cases.
    required double mediaTime;

    // The elapsed time in seconds from submission of the encoded packet with
    // the same presentationTimestamp as this frame to the decoder until the
    // decoded frame was ready for presentation.
    //
    // In addition to decoding time, may include processing time. E.g., YUV
    // conversion and/or staging into GPU backed memory.
    double processingDuration;

    // A count of the number of frames submitted for composition. Allows clients
    // to determine if frames were missed between VideoFrameRequestCallbacks.
    //
    // https://wiki.whatwg.org/wiki/Video_Metrics#presentedFrames
    required unsigned long presentedFrames;

    // For video frames coming from either a local or remote source, this is
    // the time at which the frame was captured by the camera. For a remote
    // source, the capture time is estimated using clock synchronization and
    // RTCP sender reports to convert RTP timestamps to capture time as
    // specified in RFC 3550 Section 6.4.1.
    DOMHighResTimeStamp captureTime;

    // For video frames coming from a remote source, this is the time the
    // encoded frame was received by the platform, i.e., the time at which the
    // last packet belonging to this frame was received over the network.
    DOMHighResTimeStamp receiveTime;

    // The RTP timestamp associated with this video frame.
    //
    // https://w3c.github.io/webrtc-pc/#dom-rtcrtpcontributingsource-rtptimestamp
    unsigned long rtpTimestamp;
};