Live Streams Component (#21473)

* initial commit of streams

* refactor stream component

* refactor so stream formats are not considered a platform

* initial test and minor refactor

* fix linting

* update requirements

* need av in tests as well

* fix import in class def vs method

* fix travis and docker builds

* address code review comments

* fix logger, add stream start/stop logs, listen to HASS stop

* address additional code review comments

* beef up tests

* fix tests

* fix lint

* add stream_source to onvif camera

* address pr comments

* add keepalive to camera play_stream service

* remove keepalive and move import

* implement registry and have output provider remove itself from stream after idle, set libav log level to error
This commit is contained in:
Jason Hunter 2019-03-11 22:57:10 -04:00 committed by Paulus Schoutsen
parent 0a6ba14444
commit 7ccd0bba9a
18 changed files with 993 additions and 5 deletions

View file

@ -0,0 +1,14 @@
"""Constants for Stream component."""
DOMAIN = 'stream'
ATTR_ENDPOINTS = 'endpoints'
ATTR_STREAMS = 'streams'
ATTR_KEEPALIVE = 'keepalive'
OUTPUT_FORMATS = ['hls']
FORMAT_CONTENT_TYPE = {
'hls': 'application/vnd.apple.mpegurl'
}
AUDIO_SAMPLE_RATE = 44100