Change the API boundary between camera and stream with initial improvement for nest expiring stream urls (#45431)

* 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>
This commit is contained in:
Allen Porter 2021-02-08 19:53:28 -08:00 committed by GitHub
parent 889baef456
commit 2bcf87b980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 254 additions and 356 deletions

View file

@ -4,3 +4,8 @@ DOMAIN = "camera"
DATA_CAMERA_PREFS = "camera_prefs"
PREF_PRELOAD_STREAM = "preload_stream"
SERVICE_RECORD = "record"
CONF_LOOKBACK = "lookback"
CONF_DURATION = "duration"