Generation

value class Generation(val value: Long) : Comparable<Generation>

The epoch a piece of state belongs to, within the timeline that produced it.

Packets, frames, queues and decoders carry a pipeline epoch. Seeking or rebuilding retires that epoch, so stale work can be discarded. An in-place audio selection keeps the video epoch valid; AudioTap and AudioClockSnapshot therefore share a separate audio generation that also changes at that selection. Compare generations only within the same producer and timeline.

The identifier complements the worker quiesce and flush handshake; it does not make mutable pipeline state safe to change while a worker still owns it.

Generation 0 is the initial one and is valid. "Not started" is expressed as a null Generation?, never as a reserved value.

Constructors

Link copied to clipboard
constructor(value: Long)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val value: Long

Functions

Link copied to clipboard
open operator override fun compareTo(other: Generation): Int
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String