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>
This commit is contained in:
uvjustinandJason Hunter authored and GitHub committed 2020-08-11 17:12:41 -04:00
1 parent d0a59e28ac
commit 5355fcaba8
11 files changed
+169 -51

No files matched your search

+2 -3
View File
@@ -31,12 +31,11 @@ async def test_record_stream(hass, hass_client):
recorder = stream.add_provider("recorder")
stream.start()
segments = 0
while True:
segment = await recorder.recv()
if not segment:
break
segments += 1
segments = segment.sequence
stream.stop()
@@ -76,7 +75,7 @@ async def test_recorder_save():
output.name = "test.mp4"
# Run
recorder_save_worker(output, [Segment(1, source, 4)])
recorder_save_worker(output, [Segment(1, source, 4, (360000, 176400))])
# Assert
assert output.getvalue()