hass-core/homeassistant/components/stream/const.py
uvjustin 5355fcaba8
Add H.265 support to stream component (#38125)
* Add H.265 support to stream component

* Change find_box to generator

* Move fmp4 utilities to fmp4utils.py

* Add minimum segments and segment durations

* Remove MIN_SEGMENTS

* Fix when container_options is None

* Fix missing num_segments and update tests

* Remove unnecessary mock attribute

* Fix Segment construction in test_recorder_save

* fix recorder with lookback

Co-authored-by: Jason Hunter <hunterjm@gmail.com>
2020-08-11 17:12:41 -04:00

21 lines
508 B
Python

"""Constants for Stream component."""
DOMAIN = "stream"
CONF_STREAM_SOURCE = "stream_source"
CONF_LOOKBACK = "lookback"
CONF_DURATION = "duration"
ATTR_ENDPOINTS = "endpoints"
ATTR_STREAMS = "streams"
ATTR_KEEPALIVE = "keepalive"
SERVICE_RECORD = "record"
OUTPUT_FORMATS = ["hls"]
FORMAT_CONTENT_TYPE = {"hls": "application/vnd.apple.mpegurl"}
AUDIO_SAMPLE_RATE = 44100
MAX_SEGMENTS = 3 # Max number of segments to keep around
MIN_SEGMENT_DURATION = 1.5 # Each segment is at least this many seconds