Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.stream.core.StreamOutput Class Reference
Inheritance diagram for homeassistant.components.stream.core.StreamOutput:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, IdleTimer idle_timer, StreamSettings stream_settings, DynamicStreamSettings dynamic_stream_settings, int|None deque_maxlen=None)
 
None cleanup (self)
 
Segment|None get_segment (self, int sequence)
 
deque[Segmentget_segments (self)
 
bool idle (self)
 
Segment|None last_segment (self)
 
int last_sequence (self)
 
str|None name (self)
 
None part_put (self)
 
bool part_recv (self, float|None timeout=None)
 
None put (self, Segment segment)
 
bool recv (self)
 
list[int] sequences (self)
 

Public Attributes

 dynamic_stream_settings
 
 idle_timer
 
 stream_settings
 

Private Member Functions

None _async_put (self, Segment segment)
 

Private Attributes

 _event
 
 _hass
 
 _part_event
 

Detailed Description

Represents a stream output.

Definition at line 271 of file core.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.stream.core.StreamOutput.__init__ (   self,
HomeAssistant  hass,
IdleTimer  idle_timer,
StreamSettings  stream_settings,
DynamicStreamSettings  dynamic_stream_settings,
int | None   deque_maxlen = None 
)
Initialize a stream output.

Definition at line 274 of file core.py.

Member Function Documentation

◆ _async_put()

None homeassistant.components.stream.core.StreamOutput._async_put (   self,
Segment  segment 
)
private
Store output from event loop.

Reimplemented in homeassistant.components.stream.hls.HlsStreamOutput.

Definition at line 357 of file core.py.

◆ cleanup()

None homeassistant.components.stream.core.StreamOutput.cleanup (   self)

◆ get_segment()

Segment | None homeassistant.components.stream.core.StreamOutput.get_segment (   self,
int  sequence 
)
Retrieve a specific segment.

Definition at line 320 of file core.py.

◆ get_segments()

deque[Segment] homeassistant.components.stream.core.StreamOutput.get_segments (   self)
Retrieve all segments.

Definition at line 328 of file core.py.

◆ idle()

bool homeassistant.components.stream.core.StreamOutput.idle (   self)
Return True if the output is idle.

Definition at line 297 of file core.py.

◆ last_segment()

Segment | None homeassistant.components.stream.core.StreamOutput.last_segment (   self)
Return the last segment without iterating.

Definition at line 314 of file core.py.

◆ last_sequence()

int homeassistant.components.stream.core.StreamOutput.last_sequence (   self)
Return the last sequence number without iterating.

Definition at line 302 of file core.py.

◆ name()

str | None homeassistant.components.stream.core.StreamOutput.name (   self)
Return provider name.

Reimplemented in homeassistant.components.stream.recorder.RecorderOutput, and homeassistant.components.stream.hls.HlsStreamOutput.

Definition at line 292 of file core.py.

◆ part_put()

None homeassistant.components.stream.core.StreamOutput.part_put (   self)
Set event signalling the latest part segment.

Definition at line 341 of file core.py.

◆ part_recv()

bool homeassistant.components.stream.core.StreamOutput.part_recv (   self,
float | None   timeout = None 
)
Wait for an event signalling the latest part segment.

Definition at line 332 of file core.py.

◆ put()

None homeassistant.components.stream.core.StreamOutput.put (   self,
Segment  segment 
)
Store output.

Definition at line 352 of file core.py.

◆ recv()

bool homeassistant.components.stream.core.StreamOutput.recv (   self)
Wait for the latest segment.

Definition at line 347 of file core.py.

◆ sequences()

list[int] homeassistant.components.stream.core.StreamOutput.sequences (   self)
Return current sequence from segments.

Definition at line 309 of file core.py.

Member Data Documentation

◆ _event

homeassistant.components.stream.core.StreamOutput._event
private

Definition at line 287 of file core.py.

◆ _hass

homeassistant.components.stream.core.StreamOutput._hass
private

Definition at line 283 of file core.py.

◆ _part_event

homeassistant.components.stream.core.StreamOutput._part_event
private

Definition at line 288 of file core.py.

◆ dynamic_stream_settings

homeassistant.components.stream.core.StreamOutput.dynamic_stream_settings

Definition at line 286 of file core.py.

◆ idle_timer

homeassistant.components.stream.core.StreamOutput.idle_timer

Definition at line 284 of file core.py.

◆ stream_settings

homeassistant.components.stream.core.StreamOutput.stream_settings

Definition at line 285 of file core.py.


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