From 7ac0214d64e8fc738d5ffbc864004b666d6c3845 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 30 Aug 2023 19:37:44 -0400 Subject: [PATCH] set max video width and height in codec profiles --- source/utils/deviceCapabilities.brs | 68 +++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 4 deletions(-) diff --git a/source/utils/deviceCapabilities.brs b/source/utils/deviceCapabilities.brs index a4a414e5..27314260 100644 --- a/source/utils/deviceCapabilities.brs +++ b/source/utils/deviceCapabilities.brs @@ -472,6 +472,18 @@ function getDeviceProfile() as object "Value": h264VideoRangeTypes, "IsRequired": false }, + { + "Condition": "LessThanEqual", + "Property": "Width", + "Value": m.global.device.videoWidth, + "IsRequired": true + }, + { + "Condition": "LessThanEqual", + "Property": "Height", + "Value": m.global.device.videoHeight, + "IsRequired": true + }, { "Condition": "LessThanEqual", "Property": "VideoLevel", @@ -507,7 +519,19 @@ function getDeviceProfile() as object "Property": "VideoLevel", "Value": mpeg2Levels.join("|"), "IsRequired": false - } + }, + { + "Condition": "LessThanEqual", + "Property": "Width", + "Value": m.global.device.videoWidth, + "IsRequired": true + }, + { + "Condition": "LessThanEqual", + "Property": "Height", + "Value": m.global.device.videoHeight, + "IsRequired": true + }, ] } bitRateArray = GetBitRateLimit("mpeg2") @@ -566,7 +590,19 @@ function getDeviceProfile() as object "Property": "VideoLevel", "Value": (120 * av1HighestLevel).ToStr(), "IsRequired": false - } + }, + { + "Condition": "LessThanEqual", + "Property": "Width", + "Value": m.global.device.videoWidth, + "IsRequired": true + }, + { + "Condition": "LessThanEqual", + "Property": "Height", + "Value": m.global.device.videoHeight, + "IsRequired": true + }, ] } bitRateArray = GetBitRateLimit("av1") @@ -636,7 +672,19 @@ function getDeviceProfile() as object "Property": "VideoLevel", "Value": hevcLevelString, "IsRequired": false - } + }, + { + "Condition": "LessThanEqual", + "Property": "Width", + "Value": m.global.device.videoWidth, + "IsRequired": true + }, + { + "Condition": "LessThanEqual", + "Property": "Height", + "Value": m.global.device.videoHeight, + "IsRequired": true + }, ] } @@ -672,7 +720,19 @@ function getDeviceProfile() as object "Property": "VideoRangeType", "Value": vp9VideoRangeTypes, "IsRequired": false - } + }, + { + "Condition": "LessThanEqual", + "Property": "Width", + "Value": m.global.device.videoWidth, + "IsRequired": true + }, + { + "Condition": "LessThanEqual", + "Property": "Height", + "Value": m.global.device.videoHeight, + "IsRequired": true + }, ] }