Camera devices may support multiple stream sources so we want to clarify that
this is meant to decide which stream source is used in the frontend only.
Will set stream_type temporarily to allow rollout without breaking nightly,
and this will be removed after frontend is updated.
* Add WebSocket API for intiting a WebRTC stream
See https://github.com/home-assistant/architecture/discussions/640
* Increase test coverage for webrtc camera stream
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This was accidentally dropped in a previous PR that refactored the interaction
between stream and camera. This is difficult to test from the existing
preload stream tests, so leaving untested for now.
Separate the HLS stream view logic out of StreamOutput since the hls
stream view is about to get more complex to track discontinuities. This
makes the idle timeout, shutdown, and coupling between hls and record
more explicit.
* Change the API boundary between stream and camera
Shift more of the stream lifecycle management to the camera. The motivation is to support stream urls that expire
giving the camera the ability to change the stream once it is created.
* Document stream lifecycle and simplify stream/camera interaction
* Reorder create_stream function to reduce diffs
* Increase test coverage for camera_sdm.py
* Fix ffmpeg typo.
* Add a stream identifier for each stream, managed by camera
* Remove stream record service
* Update homeassistant/components/stream/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Unroll changes to Stream interface back into camera component
* Fix preload stream to actually start the background worker
* Reduce unncessary diffs for readability
* Remove redundant camera stream start code
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Remove unnecessary exception re-wraps
* Preserve exception chains on re-raise
We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.
The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.
Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.
* Fix mistaken re-wrap in homematicip_cloud/hap.py
Missed the difference between HmipConnectionError and
HmipcConnectionError.
* Do not hide original error on plex new cert validation error
Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.