From 4a75b4a7af05bcab98eea6d79c60930197d1a00a Mon Sep 17 00:00:00 2001 From: Pradip De Date: Sun, 29 Sep 2024 00:24:31 -0700 Subject: [PATCH 1/3] Definition of the Camera AV StreamManagement Cluster. Define StreamTypeEnum in global-enums.xml, moving from WebRTC Provider cluster and AV Stream Management. Spec in `cameras` branch. Draft PR: https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/10004 --- .github/workflows/tests.yaml | 1 + scripts/rules.matterlint | 1 + .../camera-av-stream-management-cluster.xml | 478 ++++++++++++++++++ .../zcl/data-model/chip/global-enums.xml | 13 +- .../chip/webrtc-provider-cluster.xml | 9 - .../zcl/zcl-with-test-extensions.json | 11 +- src/app/zap-templates/zcl/zcl.json | 11 +- src/app/zap_cluster_list.json | 2 + 8 files changed, 514 insertions(+), 12 deletions(-) create mode 100644 src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a84e8639f703a7..63957b64d8f00d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -111,6 +111,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml \ + src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/chip-ota.xml \ src/app/zap-templates/zcl/data-model/chip/chip-types.xml \ src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \ diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index 69715eea87efd2..4f61d26be73b5e 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -14,6 +14,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/chip-ota.xml"; diff --git a/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml new file mode 100644 index 00000000000000..c64342b551ad79 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Camera AV Stream Management + 0x0551 + CAMERA_AV_STREAM_MANAGEMENT_CLUSTER + The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + MaxConcurrentVideoEncoders + MaxEncodedPixelRate + VideoSensorParams + NightVisionCapable + MinViewport + RateDistortionTradeOffPoints + MaxPreRollBufferSize + MicrophoneCapabilities + SpeakerCapabilities + TwoWayTalkSupport + SupportedSnapshotParams + MaxNetworkBandwidth + CurrentFrameRate + + HDRModeEnabled + + + + CurrentVideoCodecs + CurrentSnapshotConfig + FabricsUsingCamera + AllocatedVideoStreams + AllocatedAudioStreams + AllocatedSnapshotStreams + + RankedVideoStreamPrioritiesList + + + + SoftRecordingPrivacyModeEnabled + SoftLivestreamPrivacyModeEnabled + HardPrivacyModeOn + + NightVision + + + + + NightVisionIllum + + + + + AWBEnabled + + + + + AutoShutterSpeedEnabled + + + + + AutoISOEnabled + + + + Viewport + + SpeakerMuted + + + + + SpeakerVolumeLevel + + + + + SpeakerMaxLevel + + + + + SpeakerMinLevel + + + + + MicrophoneMuted + + + + + MicrophoneVolumeLevel + + + + + MicrophoneMaxLevel + + + + + MicrophoneMinLevel + + + + + MicrophoneAGCEnabled + + + + ImageRotation + ImageFlipHorizontal + ImageFlipVertical + + LocalVideoRecordingEnabled + + + + + LocalSnapshotRecordingEnabled + + + + + StatusLightEnabled + + + + + StatusLightBrightness + + + + + DepthSensorStatus + + + + + This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. + + + + + + + + + + + This command SHALL be sent by the camera in response to the AudioStreamAllocate command, carrying the newly allocated audio stream identifier. + + + + + This command SHALL deallocate an audio stream on the camera, corresponding to the given audio stream identifier. + + + + + + This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. + + + + + + + + + + + + + + + + + This command SHALL be sent by the camera in response to the VideoStreamAllocate command, carrying the newly allocated video stream identifier. + + + + + This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID. + + + + + + + + + This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. + + + + + + This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. + + + + + + + + + + + This command SHALL be sent by the device in response to the SnapshotStreamAllocate command, carrying the newly allocated snapshot stream identifier. + + + + + This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. + + + + + + This command SHALL set the relative priorities of the various stream types on the camera. + + + + + + This command SHALL return a Snapshot from the camera. + + + + + + + This command SHALL be sent by the device in response to the CaptureSnapshot command, carrying the requested snapshot. + + + + + + + This command sets the viewport in all video streams. + + + + + + The data fields for this command SHALL be as follows: + + + + + + The data fields for this command SHALL be as follows: + + + + + + The data fields for this command SHALL be as follows: + + + + + + + + + + + + + + + + + This event SHALL be generated when there is a modification in the corresponding video stream. + + + + + + + + + + + This event SHALL be generated when there is a modification in the corresponding audio stream. + + + + + + + + + + + This event SHALL be generated when there is a modification in the corresponding snapshot stream. + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml index 81ebd8506ad721..277ceb01aa22f4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml +++ b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml @@ -34,6 +34,18 @@ TODO: Make these structures global rather than defining them for each cluster. + + + + + + + + + + + +