blob: 00b1409f8d152e236dca7c953cf59d24b9c7542a [file] [log] [blame]
// Copyright 2019 The Chromium Authors
// 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;
};