Skip to content

Commit fa87d08

Browse files
Gate videoCapture2 based on PushAvStreamTransport
The VIDEO feature of CameraAvStreamManagement can be enabled on live-view only cameras, so the videoCapture2 capability should also be gated based on the presence of the PushAvStreamTransport clusters (presence of which also implies the presence of TLS clusters).
1 parent aa630fa commit fa87d08

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ function CameraDeviceConfiguration.match_profile(device, status_light_enabled_pr
6262
return clusters.CameraAvStreamManagement.are_features_supported(feature_bitmap, ep_cluster.feature_map)
6363
end
6464
if clus_has_feature(clusters.CameraAvStreamManagement.types.Feature.VIDEO) then
65-
table.insert(main_component_capabilities, capabilities.videoCapture2.ID)
65+
if switch_utils.find_cluster_on_ep(camera_ep, clusters.PushAvStreamTransport.ID, "SERVER") then
66+
table.insert(main_component_capabilities, capabilities.videoCapture2.ID)
67+
end
6668
table.insert(main_component_capabilities, capabilities.cameraViewportSettings.ID)
6769
end
6870
if clus_has_feature(clusters.CameraAvStreamManagement.types.Feature.LOCAL_STORAGE) then

drivers/SmartThings/matter-switch/src/test/test_matter_camera.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ local mock_device = test.mock_device.build_test_matter_device({
5050
clusters.CameraAvSettingsUserLevelManagement.types.Feature.MECHANICAL_PRESETS,
5151
cluster_type = "SERVER"
5252
},
53+
{
54+
cluster_id = clusters.PushAvStreamTransport.ID,
55+
cluster_type = "SERVER"
56+
},
5357
{
5458
cluster_id = clusters.ZoneManagement.ID,
5559
feature_map = clusters.ZoneManagement.types.Feature.TWO_DIMENSIONAL_CARTESIAN_ZONE |

0 commit comments

Comments
 (0)