Namespaces | |
| const | |
| core | |
| diagnostics | |
| fmp4utils | |
| hls | |
| recorder | |
| worker | |
Classes | |
| class | Stream |
Functions | |
| bool | _should_retry () |
| bool | async_setup (HomeAssistant hass, ConfigType config) |
| Stream | create_stream (HomeAssistant hass, str stream_source, Mapping[str, str|bool|float] options, DynamicStreamSettings dynamic_stream_settings, str|None stream_label=None) |
| str | redact_credentials (str url) |
| None | set_pyav_logging (bool enable) |
Variables | |
| list | __all__ |
| _LOGGER = logging.getLogger(__name__) | |
| CONFIG_SCHEMA | |
| DOMAIN_SCHEMA | |
Provide functionality to stream video source. Components use create_stream with a stream source (e.g. an rtsp url) to create a new Stream object. Stream manages: - Background work to fetch and decode a stream - Desired output formats - Home Assistant URLs for viewing a stream - Access tokens for URLs for viewing a stream A Stream consists of a background worker, and one or more output formats each with their own idle timeout managed by the stream component. When an output format is no longer in use, the stream component will expire it. When there are no active output formats, the background worker is shut down and access tokens are expired. Alternatively, a Stream can be configured with keepalive to always keep workers active.
|
private |
Return true if worker failures should be retried, for disabling during tests.
Definition at line 576 of file __init__.py.
| bool homeassistant.components.stream.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Set up stream.
Definition at line 201 of file __init__.py.
| Stream homeassistant.components.stream.create_stream | ( | HomeAssistant | hass, |
| str | stream_source, | ||
| Mapping[str, str | bool | float] | options, | ||
| DynamicStreamSettings | dynamic_stream_settings, | ||
| str | None | stream_label = None |
||
| ) |
Create a stream with the specified identifier based on the source url. The stream_source is typically an rtsp url (though any url accepted by ffmpeg is fine) and options (see STREAM_OPTIONS_SCHEMA) are converted and passed into pyav / ffmpeg. The stream_label is a string used as an additional message in logging.
Definition at line 111 of file __init__.py.
| str homeassistant.components.stream.redact_credentials | ( | str | url | ) |
Redact credentials from string data.
Definition at line 98 of file __init__.py.
| None homeassistant.components.stream.set_pyav_logging | ( | bool | enable | ) |
Turn PyAV logging on or off.
Definition at line 194 of file __init__.py.
|
private |
Definition at line 79 of file __init__.py.
|
private |
Definition at line 95 of file __init__.py.
| homeassistant.components.stream.CONFIG_SCHEMA |
Definition at line 186 of file __init__.py.
| homeassistant.components.stream.DOMAIN_SCHEMA |
Definition at line 174 of file __init__.py.