From b2f50d0a3ac7b10e57f658f1953d6c18ff7cd60d Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 15 Oct 2020 13:34:27 +0200 Subject: [PATCH 1/4] Fix machine release builds (#41879) --- azure-pipelines-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 6bca099d9ad..4668e62892a 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -118,7 +118,7 @@ stages: -v $(pwd):/data:ro \ homeassistant/amd64-builder:$(versionBuilder) \ --homeassistant-machine "$(homeassistantRelease)=$(buildMachine)" \ - -t /data --docker-hub homeassistant + -t /data/machine --docker-hub homeassistant displayName: 'Build Release' - stage: 'Publish' From 303b7efd4bae9ef6414cfcad6263ddfdea1ec452 Mon Sep 17 00:00:00 2001 From: Jason Hunter Date: Thu, 15 Oct 2020 16:24:33 -0400 Subject: [PATCH 2/4] Bump ONVIF and pin Zeep (#41907) --- homeassistant/components/onvif/manifest.json | 6 +++++- requirements_all.txt | 5 ++++- requirements_test_all.txt | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/onvif/manifest.json b/homeassistant/components/onvif/manifest.json index 182fe22d60c..5b12d1624b9 100644 --- a/homeassistant/components/onvif/manifest.json +++ b/homeassistant/components/onvif/manifest.json @@ -2,7 +2,11 @@ "domain": "onvif", "name": "ONVIF", "documentation": "https://www.home-assistant.io/integrations/onvif", - "requirements": ["onvif-zeep-async==0.5.0", "WSDiscovery==2.0.0"], + "requirements": [ + "onvif-zeep-async==0.6.0", + "WSDiscovery==2.0.0", + "zeep[async]==3.4.0" + ], "dependencies": ["ffmpeg"], "codeowners": ["@hunterjm"], "config_flow": true diff --git a/requirements_all.txt b/requirements_all.txt index 003e87213bc..d5c1cdff86d 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1022,7 +1022,7 @@ omnilogic==0.4.0 onkyo-eiscp==1.2.7 # homeassistant.components.onvif -onvif-zeep-async==0.5.0 +onvif-zeep-async==0.6.0 # homeassistant.components.opengarage open-garage==0.1.4 @@ -2303,6 +2303,9 @@ yeelightsunflower==0.0.10 # homeassistant.components.media_extractor youtube_dl==2020.09.20 +# homeassistant.components.onvif +zeep[async]==3.4.0 + # homeassistant.components.zengge zengge==0.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 3b1b13fa1a8..ba81a6c0a49 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -490,7 +490,7 @@ oauth2client==4.0.0 omnilogic==0.4.0 # homeassistant.components.onvif -onvif-zeep-async==0.5.0 +onvif-zeep-async==0.6.0 # homeassistant.components.openerz openerz-api==0.1.0 @@ -1066,6 +1066,9 @@ xmltodict==0.12.0 # homeassistant.components.yeelight yeelight==0.5.4 +# homeassistant.components.onvif +zeep[async]==3.4.0 + # homeassistant.components.zeroconf zeroconf==0.28.5 From 36a1fe5f54468d78628f3fdb1e0057ae2c8d3ff5 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 15 Oct 2020 20:30:57 +0000 Subject: [PATCH 3/4] Bumped version to 0.116.4 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index a3ed164ecba..ec54d017962 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -1,7 +1,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 116 -PATCH_VERSION = "3" +PATCH_VERSION = "4" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER = (3, 7, 1) From a72dd6b91723961818ec3b3321c226d3c4a1b308 Mon Sep 17 00:00:00 2001 From: uvjustin <46082645+uvjustin@users.noreply.github.com> Date: Fri, 16 Oct 2020 04:37:27 +0800 Subject: [PATCH 4/4] Cap AVC profile level at 4.1 in stream master playlist (#41592) * Cap AVC profile level at 4.1 * Use smaller multiplier in bandwidth calculation --- homeassistant/components/stream/fmp4utils.py | 3 ++- homeassistant/components/stream/hls.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/stream/fmp4utils.py b/homeassistant/components/stream/fmp4utils.py index dc929e531c1..1838b3fc88b 100644 --- a/homeassistant/components/stream/fmp4utils.py +++ b/homeassistant/components/stream/fmp4utils.py @@ -70,7 +70,8 @@ def get_codec_string(segment: io.BytesIO) -> str: ): profile = stsd_box[111:112].hex() compatibility = stsd_box[112:113].hex() - level = stsd_box[113:114].hex() + # Cap level at 4.1 for compatibility with some Google Cast devices + level = hex(min(stsd_box[113], 41))[2:] codec += "." + profile + compatibility + level # Handle H265 diff --git a/homeassistant/components/stream/hls.py b/homeassistant/components/stream/hls.py index 09729f79ada..92801c4807f 100644 --- a/homeassistant/components/stream/hls.py +++ b/homeassistant/components/stream/hls.py @@ -32,10 +32,11 @@ class HlsMasterPlaylistView(StreamView): def render(track): """Render M3U8 file.""" # Need to calculate max bandwidth as input_container.bit_rate doesn't seem to work - # Calculate file size / duration and use a multiplier to account for variation + # Calculate file size / duration and use a small multiplier to account for variation + # hls spec already allows for 25% variation segment = track.get_segment(track.segments[-1]) bandwidth = round( - segment.segment.seek(0, io.SEEK_END) * 8 / segment.duration * 3 + segment.segment.seek(0, io.SEEK_END) * 8 / segment.duration * 1.2 ) codecs = get_codec_string(segment.segment) lines = [