Skip to main content
One inbound track’s frames. Reached as self.media.<track>, and read in process_input(). Each buffer holds the last 128 frames and drops the oldest when full, so a model that falls behind does not grow memory without bound.
list[InputFrame] | None
Return n frames, or None when fewer than n have arrived. Never waits, and consumes nothing when it returns None. This is the one to use inside process_input(): too few frames is a reason to skip the step.
list[InputFrame]
Wait until n frames are available, then return them. Raises TimeoutError if timeout elapses first. A wait inside process_input() holds the step, so keep this for a hand-written run().
int
How many frames are buffered right now.
int
How many frames have arrived on this track since the session started.
bool
Whether the track has closed.
None
Drop the buffered frames and leave the track open. The runtime does this for you when the last client leaves or the session ends.