-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathencoded_frame.js
More file actions
15 lines (15 loc) · 826 Bytes
/
Copy pathencoded_frame.js
File metadata and controls
15 lines (15 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
* Represents an encoded video frame and its associated metadata.
* This class bundles an EncodedVideoChunk with information necessary
* for transport, reordering, and decoding, especially in scenarios
* involving out-of-order delivery and Long-Term Reference (LTR) frames.
*/
class EncodedFrame {
constructor(encodedChunk, frameId, dependencies, timestamp, isLtr = false) {
this.encodedChunk = encodedChunk; // The EncodedVideoChunk data
this.frameId = frameId; // A unique, monotonically increasing ID for this frame
this.dependencies = dependencies; // Array of frameIds this frame depends on
this.timestamp = timestamp; // Original capture timestamp of the frame
this.isLtr = isLtr; // Boolean flag indicating if this is an LTR frame
}
}