Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.stream.worker.StreamState Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, Callable[[], Mapping[str, StreamOutput]] outputs_callback, Diagnostics diagnostics)
 
Diagnostics diagnostics (self)
 
None discontinuity (self)
 
int next_sequence (self)
 
list[StreamOutputoutputs (self)
 
int sequence (self)
 
int stream_id (self)
 

Public Attributes

 hass
 

Private Attributes

 _diagnostics
 
 _sequence
 

Detailed Description

Responsible for trakcing output and playback state for a stream.

Holds state used for playback to interpret a decoded stream. A source stream
may be reset (e.g. reconnecting to an rtsp stream) and this object tracks
the state to inform the player.

Definition at line 65 of file worker.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.stream.worker.StreamState.__init__ (   self,
HomeAssistant  hass,
Callable[[], Mapping[str, StreamOutput]]  outputs_callback,
Diagnostics  diagnostics 
)
Initialize StreamState.

Definition at line 73 of file worker.py.

Member Function Documentation

◆ diagnostics()

Diagnostics homeassistant.components.stream.worker.StreamState.diagnostics (   self)
Return diagnostics object.

Definition at line 121 of file worker.py.

◆ discontinuity()

None homeassistant.components.stream.worker.StreamState.discontinuity (   self)
Mark the stream as having been restarted.

Definition at line 105 of file worker.py.

◆ next_sequence()

int homeassistant.components.stream.worker.StreamState.next_sequence (   self)
Increment the sequence number.

Definition at line 95 of file worker.py.

◆ outputs()

list[StreamOutput] homeassistant.components.stream.worker.StreamState.outputs (   self)
Return the active stream outputs.

Definition at line 116 of file worker.py.

◆ sequence()

int homeassistant.components.stream.worker.StreamState.sequence (   self)
Return the current sequence for the latest segment.

Definition at line 91 of file worker.py.

◆ stream_id()

int homeassistant.components.stream.worker.StreamState.stream_id (   self)
Return the readonly stream_id attribute.

Definition at line 101 of file worker.py.

Member Data Documentation

◆ _diagnostics

homeassistant.components.stream.worker.StreamState._diagnostics
private

Definition at line 88 of file worker.py.

◆ _sequence

homeassistant.components.stream.worker.StreamState._sequence
private

Definition at line 87 of file worker.py.

◆ hass

homeassistant.components.stream.worker.StreamState.hass

Definition at line 81 of file worker.py.


The documentation for this class was generated from the following file: