From fa45b405445da2a0a99c4fab56e90db4f6901388 Mon Sep 17 00:00:00 2001 From: Pradip De Date: Mon, 23 Dec 2024 04:03:34 +0000 Subject: [PATCH 1/2] XML and SDK changes corresponding to Spec updates for CameraAVStreamManagement cluster. --- .../camera-av-stream-management-cluster.xml | 35 ++--- .../zcl/data-model/chip/global-enums.xml | 2 +- .../chip/webrtc-provider-cluster.xml | 6 +- .../data_model/controller-clusters.matter | 39 +++--- .../chip/devicecontroller/ChipClusters.java | 96 ++++++++------ .../devicecontroller/ChipEventStructs.java | 44 +++---- .../chip/devicecontroller/ChipStructs.java | 88 ++++++------- .../devicecontroller/ClusterIDMapping.java | 10 +- .../devicecontroller/ClusterInfoMapping.java | 73 +++++++---- ...anagementClusterAudioStreamChangedEvent.kt | 20 +-- ...anagementClusterVideoStreamChangedEvent.kt | 20 +-- ...treamManagementClusterAudioStreamStruct.kt | 12 +- ...treamManagementClusterVideoStreamStruct.kt | 12 +- ...sportProviderClusterWebRTCSessionStruct.kt | 12 +- ...portRequestorClusterWebRTCSessionStruct.kt | 12 +- .../CameraAvStreamManagementCluster.kt | 74 +++++++++-- .../WebRTCTransportProviderCluster.kt | 12 +- ...anagementClusterAudioStreamChangedEvent.kt | 20 +-- ...anagementClusterVideoStreamChangedEvent.kt | 20 +-- ...treamManagementClusterAudioStreamStruct.kt | 12 +- ...treamManagementClusterVideoStreamStruct.kt | 12 +- ...sportProviderClusterWebRTCSessionStruct.kt | 12 +- ...portRequestorClusterWebRTCSessionStruct.kt | 12 +- .../CHIPAttributeTLVValueDecoder.cpp | 64 ++++----- .../CHIPEventTLVValueDecoder.cpp | 44 +++---- .../python/chip/clusters/CHIPClusters.py | 9 +- .../python/chip/clusters/Objects.py | 66 +++++----- .../MTRAttributeTLVValueDecoder.mm | 8 +- .../CHIP/zap-generated/MTRBaseClusters.h | 34 ++--- .../CHIP/zap-generated/MTRBaseClusters.mm | 6 +- .../CHIP/zap-generated/MTRClusters.h | 2 +- .../CHIP/zap-generated/MTRClusters.mm | 6 +- .../zap-generated/MTRCommandPayloadsObjc.h | 10 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 44 +++---- .../zap-generated/MTREventTLVValueDecoder.mm | 12 +- .../CHIP/zap-generated/MTRStructsObjc.h | 12 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 36 +++--- .../zap-generated/cluster-enums-check.h | 4 +- .../app-common/zap-generated/cluster-enums.h | 10 +- .../zap-generated/cluster-objects.cpp | 59 ++++----- .../zap-generated/cluster-objects.h | 121 +++++++++--------- .../zap-generated/cluster/Commands.h | 17 +-- .../cluster/ComplexArgumentParser.cpp | 30 ++--- .../cluster/logging/DataModelLogger.cpp | 22 ++-- .../zap-generated/cluster/Commands.h | 42 +++--- 45 files changed, 690 insertions(+), 623 deletions(-) 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 index 516fe8753a3ef8..6182aba244808f 100644 --- 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 @@ -18,7 +18,7 @@ limitations under the License. XML generated by Alchemy; DO NOT EDIT. Source: src/app_clusters/CameraAVStreamManagement.adoc Parameters: in-progress -Git: 1.3-3830-g1f08d6f40 +Git: 1.4-446-g4a179b5f4 --> @@ -66,7 +66,7 @@ Git: 1.3-3830-g1f08d6f40 - + @@ -119,7 +119,7 @@ Git: 1.3-3830-g1f08d6f40 - + @@ -258,7 +258,7 @@ Git: 1.3-3830-g1f08d6f40 - + RankedVideoStreamPrioritiesList @@ -451,7 +451,7 @@ Git: 1.3-3830-g1f08d6f40 This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. - + @@ -482,7 +482,7 @@ Git: 1.3-3830-g1f08d6f40 This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. - + @@ -511,11 +511,16 @@ Git: 1.3-3830-g1f08d6f40 This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID. - - - + + - + + + + + + + @@ -560,12 +565,12 @@ Git: 1.3-3830-g1f08d6f40 - This command SHALL set the relative priorities of the various stream types on the camera. + This command SHALL set the relative priorities of the various stream usages on the camera. - + - + This command SHALL return a Snapshot from the camera. @@ -588,7 +593,7 @@ Git: 1.3-3830-g1f08d6f40 - + @@ -606,7 +611,7 @@ Git: 1.3-3830-g1f08d6f40 - + 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 277ceb01aa22f4..3cc20e25d12cc1 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 @@ -35,7 +35,7 @@ TODO: Make these structures global rather than defining them for each cluster. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml index 63a9d99bf96e70..e60f57b89cd87e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml @@ -61,7 +61,7 @@ Git: 0.9-fall2024-234-gf4d359001 - + @@ -79,7 +79,7 @@ Git: 0.9-fall2024-234-gf4d359001 CurrentSessions Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow. - + @@ -99,7 +99,7 @@ Git: 0.9-fall2024-234-gf4d359001 This command allows an SDP Offer to be set and start a new session. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 72881a3c4fe308..9515f971e8204c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -9541,7 +9541,7 @@ provisional cluster CameraAvStreamManagement = 1361 { kJPEG = 0; } - enum StreamTypeEnum : enum8 { + enum StreamUsageEnum : enum8 { kInternal = 0; kRecording = 1; kAnalysis = 2; @@ -9586,7 +9586,7 @@ provisional cluster CameraAvStreamManagement = 1361 { struct VideoStreamStruct { int16u videoStreamID = 0; - StreamTypeEnum streamType = 1; + StreamUsageEnum streamUsage = 1; VideoCodecEnum videoCodec = 2; int16u minFrameRate = 3; int16u maxFrameRate = 4; @@ -9633,7 +9633,7 @@ provisional cluster CameraAvStreamManagement = 1361 { struct AudioStreamStruct { int16u audioStreamID = 0; - StreamTypeEnum streamType = 1; + StreamUsageEnum streamUsage = 1; AudioCodecEnum audioCodec = 2; int8u channelCount = 3; int32u sampleRate = 4; @@ -9659,7 +9659,7 @@ provisional cluster CameraAvStreamManagement = 1361 { info event VideoStreamChanged = 0 { int16u videoStreamID = 0; - optional StreamTypeEnum streamType = 1; + optional StreamUsageEnum streamUsage = 1; optional VideoCodecEnum videoCodec = 2; optional int16u minFrameRate = 3; optional int16u maxFrameRate = 4; @@ -9673,7 +9673,7 @@ provisional cluster CameraAvStreamManagement = 1361 { info event AudioStreamChanged = 1 { int16u audioStreamID = 0; - optional StreamTypeEnum streamType = 1; + optional StreamUsageEnum streamUsage = 1; optional AudioCodecEnum audioCodec = 2; optional int8u channelCount = 3; optional int32u sampleRate = 4; @@ -9709,7 +9709,7 @@ provisional cluster CameraAvStreamManagement = 1361 { readonly attribute optional VideoStreamStruct allocatedVideoStreams[] = 15; readonly attribute optional AudioStreamStruct allocatedAudioStreams[] = 16; readonly attribute optional SnapshotStreamStruct allocatedSnapshotStreams[] = 17; - readonly attribute optional StreamTypeEnum rankedVideoStreamPrioritiesList[] = 18; + readonly attribute optional StreamUsageEnum rankedVideoStreamPrioritiesList[] = 18; attribute optional boolean softRecordingPrivacyModeEnabled = 19; attribute optional boolean softLivestreamPrivacyModeEnabled = 20; readonly attribute optional boolean hardPrivacyModeOn = 21; @@ -9740,7 +9740,7 @@ provisional cluster CameraAvStreamManagement = 1361 { readonly attribute int16u clusterRevision = 65533; request struct AudioStreamAllocateRequest { - StreamTypeEnum streamType = 0; + StreamUsageEnum streamUsage = 0; AudioCodecEnum audioCodec = 1; int8u channelCount = 2; int32u sampleRate = 3; @@ -9757,7 +9757,7 @@ provisional cluster CameraAvStreamManagement = 1361 { } request struct VideoStreamAllocateRequest { - StreamTypeEnum streamType = 0; + StreamUsageEnum streamUsage = 0; VideoCodecEnum videoCodec = 1; int16u minFrameRate = 2; int16u maxFrameRate = 3; @@ -9777,9 +9777,8 @@ provisional cluster CameraAvStreamManagement = 1361 { request struct VideoStreamModifyRequest { int16u videoStreamID = 0; - optional VideoResolutionStruct resolution = 1; - optional boolean watermarkEnabled = 2; - optional boolean OSDEnabled = 3; + optional boolean watermarkEnabled = 1; + optional boolean OSDEnabled = 2; } request struct VideoStreamDeallocateRequest { @@ -9804,7 +9803,7 @@ provisional cluster CameraAvStreamManagement = 1361 { } request struct SetStreamPrioritiesRequest { - StreamTypeEnum streamPriorities[] = 0; + StreamUsageEnum streamPriorities[] = 0; } request struct CaptureSnapshotRequest { @@ -9832,17 +9831,17 @@ provisional cluster CameraAvStreamManagement = 1361 { command access(invoke: manage) SnapshotStreamAllocate(SnapshotStreamAllocateRequest): SnapshotStreamAllocateResponse = 7; /** This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. */ command access(invoke: manage) SnapshotStreamDeallocate(SnapshotStreamDeallocateRequest): DefaultSuccess = 9; - /** This command SHALL set the relative priorities of the various stream types on the camera. */ + /** This command SHALL set the relative priorities of the various stream usages on the camera. */ command access(invoke: administer) SetStreamPriorities(SetStreamPrioritiesRequest): DefaultSuccess = 10; /** This command SHALL return a Snapshot from the camera. */ - command CaptureSnapshot(CaptureSnapshotRequest): DefaultSuccess = 11; + command CaptureSnapshot(CaptureSnapshotRequest): CaptureSnapshotResponse = 11; } /** The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. */ provisional cluster WebRTCTransportProvider = 1363 { revision 1; - enum StreamTypeEnum : enum8 { + enum StreamUsageEnum : enum8 { kInternal = 0; kRecording = 1; kAnalysis = 2; @@ -9879,7 +9878,7 @@ provisional cluster WebRTCTransportProvider = 1363 { int16u id = 1; node_id peerNodeID = 2; fabric_idx peerFabricIndex = 3; - StreamTypeEnum streamType = 4; + StreamUsageEnum streamUsage = 4; nullable int16u videoStreamID = 5; nullable int16u audioStreamID = 6; WebRTCMetadataOptions metadataOptions = 7; @@ -9894,7 +9893,7 @@ provisional cluster WebRTCTransportProvider = 1363 { readonly attribute int16u clusterRevision = 65533; request struct SolicitOfferRequest { - StreamTypeEnum streamType = 0; + StreamUsageEnum streamUsage = 0; optional nullable int16u videoStreamID = 1; optional nullable int16u audioStreamID = 2; optional ICEServerStruct ICEServers[] = 3; @@ -9912,7 +9911,7 @@ provisional cluster WebRTCTransportProvider = 1363 { request struct ProvideOfferRequest { nullable int16u webRTCSessionID = 0; char_string sdp = 1; - StreamTypeEnum streamType = 2; + StreamUsageEnum streamUsage = 2; optional nullable int16u videoStreamID = 3; optional nullable int16u audioStreamID = 4; optional ICEServerStruct ICEServers[] = 5; @@ -9957,7 +9956,7 @@ provisional cluster WebRTCTransportProvider = 1363 { cluster WebRTCTransportRequestor = 1364 { revision 1; - enum StreamTypeEnum : enum8 { + enum StreamUsageEnum : enum8 { kInternal = 0; kRecording = 1; kAnalysis = 2; @@ -9994,7 +9993,7 @@ cluster WebRTCTransportRequestor = 1364 { int16u id = 1; node_id peerNodeID = 2; fabric_idx peerFabricIndex = 3; - StreamTypeEnum streamType = 4; + StreamUsageEnum streamUsage = 4; nullable int16u videoStreamID = 5; nullable int16u audioStreamID = 6; WebRTCMetadataOptions metadataOptions = 7; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 228e0236ed0785..5711531c9c5a17 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -59782,17 +59782,17 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void audioStreamAllocate(AudioStreamAllocateResponseCallback callback, Integer streamType, Integer audioCodec, Integer channelCount, Long sampleRate, Long bitRate, Integer bitDepth) { - audioStreamAllocate(callback, streamType, audioCodec, channelCount, sampleRate, bitRate, bitDepth, 0); + public void audioStreamAllocate(AudioStreamAllocateResponseCallback callback, Integer streamUsage, Integer audioCodec, Integer channelCount, Long sampleRate, Long bitRate, Integer bitDepth) { + audioStreamAllocate(callback, streamUsage, audioCodec, channelCount, sampleRate, bitRate, bitDepth, 0); } - public void audioStreamAllocate(AudioStreamAllocateResponseCallback callback, Integer streamType, Integer audioCodec, Integer channelCount, Long sampleRate, Long bitRate, Integer bitDepth, int timedInvokeTimeoutMs) { + public void audioStreamAllocate(AudioStreamAllocateResponseCallback callback, Integer streamUsage, Integer audioCodec, Integer channelCount, Long sampleRate, Long bitRate, Integer bitDepth, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long streamTypeFieldID = 0L; - BaseTLVType streamTypetlvValue = new UIntType(streamType); - elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue)); + final long streamUsageFieldID = 0L; + BaseTLVType streamUsagetlvValue = new UIntType(streamUsage); + elements.add(new StructElement(streamUsageFieldID, streamUsagetlvValue)); final long audioCodecFieldID = 1L; BaseTLVType audioCodectlvValue = new UIntType(audioCodec); @@ -59852,17 +59852,17 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void videoStreamAllocate(VideoStreamAllocateResponseCallback callback, Integer streamType, Integer videoCodec, Integer minFrameRate, Integer maxFrameRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Long minBitRate, Long maxBitRate, Integer minFragmentLen, Integer maxFragmentLen, Optional watermarkEnabled, Optional OSDEnabled) { - videoStreamAllocate(callback, streamType, videoCodec, minFrameRate, maxFrameRate, minResolution, maxResolution, minBitRate, maxBitRate, minFragmentLen, maxFragmentLen, watermarkEnabled, OSDEnabled, 0); + public void videoStreamAllocate(VideoStreamAllocateResponseCallback callback, Integer streamUsage, Integer videoCodec, Integer minFrameRate, Integer maxFrameRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Long minBitRate, Long maxBitRate, Integer minFragmentLen, Integer maxFragmentLen, Optional watermarkEnabled, Optional OSDEnabled) { + videoStreamAllocate(callback, streamUsage, videoCodec, minFrameRate, maxFrameRate, minResolution, maxResolution, minBitRate, maxBitRate, minFragmentLen, maxFragmentLen, watermarkEnabled, OSDEnabled, 0); } - public void videoStreamAllocate(VideoStreamAllocateResponseCallback callback, Integer streamType, Integer videoCodec, Integer minFrameRate, Integer maxFrameRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Long minBitRate, Long maxBitRate, Integer minFragmentLen, Integer maxFragmentLen, Optional watermarkEnabled, Optional OSDEnabled, int timedInvokeTimeoutMs) { + public void videoStreamAllocate(VideoStreamAllocateResponseCallback callback, Integer streamUsage, Integer videoCodec, Integer minFrameRate, Integer maxFrameRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Long minBitRate, Long maxBitRate, Integer minFragmentLen, Integer maxFragmentLen, Optional watermarkEnabled, Optional OSDEnabled, int timedInvokeTimeoutMs) { final long commandId = 3L; ArrayList elements = new ArrayList<>(); - final long streamTypeFieldID = 0L; - BaseTLVType streamTypetlvValue = new UIntType(streamType); - elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue)); + final long streamUsageFieldID = 0L; + BaseTLVType streamUsagetlvValue = new UIntType(streamUsage); + elements.add(new StructElement(streamUsageFieldID, streamUsagetlvValue)); final long videoCodecFieldID = 1L; BaseTLVType videoCodectlvValue = new UIntType(videoCodec); @@ -59926,11 +59926,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void videoStreamModify(DefaultClusterCallback callback, Integer videoStreamID, Optional resolution, Optional watermarkEnabled, Optional OSDEnabled) { - videoStreamModify(callback, videoStreamID, resolution, watermarkEnabled, OSDEnabled, 0); + public void videoStreamModify(DefaultClusterCallback callback, Integer videoStreamID, Optional watermarkEnabled, Optional OSDEnabled) { + videoStreamModify(callback, videoStreamID, watermarkEnabled, OSDEnabled, 0); } - public void videoStreamModify(DefaultClusterCallback callback, Integer videoStreamID, Optional resolution, Optional watermarkEnabled, Optional OSDEnabled, int timedInvokeTimeoutMs) { + public void videoStreamModify(DefaultClusterCallback callback, Integer videoStreamID, Optional watermarkEnabled, Optional OSDEnabled, int timedInvokeTimeoutMs) { final long commandId = 5L; ArrayList elements = new ArrayList<>(); @@ -59938,15 +59938,11 @@ public void videoStreamModify(DefaultClusterCallback callback, Integer videoStre BaseTLVType videoStreamIDtlvValue = new UIntType(videoStreamID); elements.add(new StructElement(videoStreamIDFieldID, videoStreamIDtlvValue)); - final long resolutionFieldID = 1L; - BaseTLVType resolutiontlvValue = resolution.map((nonOptionalresolution) -> nonOptionalresolution.encodeTlv()).orElse(new EmptyType()); - elements.add(new StructElement(resolutionFieldID, resolutiontlvValue)); - - final long watermarkEnabledFieldID = 2L; + final long watermarkEnabledFieldID = 1L; BaseTLVType watermarkEnabledtlvValue = watermarkEnabled.map((nonOptionalwatermarkEnabled) -> new BooleanType(nonOptionalwatermarkEnabled)).orElse(new EmptyType()); elements.add(new StructElement(watermarkEnabledFieldID, watermarkEnabledtlvValue)); - final long OSDEnabledFieldID = 3L; + final long OSDEnabledFieldID = 2L; BaseTLVType OSDEnabledtlvValue = OSDEnabled.map((nonOptionalOSDEnabled) -> new BooleanType(nonOptionalOSDEnabled)).orElse(new EmptyType()); elements.add(new StructElement(OSDEnabledFieldID, OSDEnabledtlvValue)); @@ -60068,11 +60064,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void captureSnapshot(DefaultClusterCallback callback, Integer snapshotStreamID, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct requestedResolution) { + public void captureSnapshot(CaptureSnapshotResponseCallback callback, Integer snapshotStreamID, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct requestedResolution) { captureSnapshot(callback, snapshotStreamID, requestedResolution, 0); } - public void captureSnapshot(DefaultClusterCallback callback, Integer snapshotStreamID, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct requestedResolution, int timedInvokeTimeoutMs) { + public void captureSnapshot(CaptureSnapshotResponseCallback callback, Integer snapshotStreamID, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct requestedResolution, int timedInvokeTimeoutMs) { final long commandId = 11L; ArrayList elements = new ArrayList<>(); @@ -60088,7 +60084,31 @@ public void captureSnapshot(DefaultClusterCallback callback, Integer snapshotStr invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long dataFieldID = 0L; + byte[] data = null; + final long imageCodecFieldID = 1L; + Integer imageCodec = null; + final long resolutionFieldID = 2L; + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == dataFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + data = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == imageCodecFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + imageCodec = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == resolutionFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + resolution = ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(data, imageCodec, resolution); }}, commandId, commandArgs, timedInvokeTimeoutMs); } @@ -60104,6 +60124,10 @@ public interface SnapshotStreamAllocateResponseCallback extends BaseClusterCallb void onSuccess(Integer snapshotStreamID); } + public interface CaptureSnapshotResponseCallback extends BaseClusterCallback { + void onSuccess(byte[] data, Integer imageCodec, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution); + } + public interface VideoSensorParamsAttributeCallback extends BaseAttributeCallback { void onSuccess(ChipStructs.CameraAvStreamManagementClusterVideoSensorParamsStruct value); } @@ -61574,17 +61598,17 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void solicitOffer(SolicitOfferResponseCallback callback, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions) { - solicitOffer(callback, streamType, videoStreamID, audioStreamID, ICEServers, ICETransportPolicy, metadataOptions, 0); + public void solicitOffer(SolicitOfferResponseCallback callback, Integer streamUsage, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions) { + solicitOffer(callback, streamUsage, videoStreamID, audioStreamID, ICEServers, ICETransportPolicy, metadataOptions, 0); } - public void solicitOffer(SolicitOfferResponseCallback callback, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions, int timedInvokeTimeoutMs) { + public void solicitOffer(SolicitOfferResponseCallback callback, Integer streamUsage, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); - final long streamTypeFieldID = 0L; - BaseTLVType streamTypetlvValue = new UIntType(streamType); - elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue)); + final long streamUsageFieldID = 0L; + BaseTLVType streamUsagetlvValue = new UIntType(streamUsage); + elements.add(new StructElement(streamUsageFieldID, streamUsagetlvValue)); final long videoStreamIDFieldID = 1L; BaseTLVType videoStreamIDtlvValue = videoStreamID != null ? videoStreamID.map((nonOptionalvideoStreamID) -> new UIntType(nonOptionalvideoStreamID)).orElse(new EmptyType()) : new NullType(); @@ -61645,11 +61669,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void provideOffer(ProvideOfferResponseCallback callback, @Nullable Integer webRTCSessionID, String sdp, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions) { - provideOffer(callback, webRTCSessionID, sdp, streamType, videoStreamID, audioStreamID, ICEServers, ICETransportPolicy, metadataOptions, 0); + public void provideOffer(ProvideOfferResponseCallback callback, @Nullable Integer webRTCSessionID, String sdp, Integer streamUsage, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions) { + provideOffer(callback, webRTCSessionID, sdp, streamUsage, videoStreamID, audioStreamID, ICEServers, ICETransportPolicy, metadataOptions, 0); } - public void provideOffer(ProvideOfferResponseCallback callback, @Nullable Integer webRTCSessionID, String sdp, Integer streamType, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions, int timedInvokeTimeoutMs) { + public void provideOffer(ProvideOfferResponseCallback callback, @Nullable Integer webRTCSessionID, String sdp, Integer streamUsage, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID, Optional> ICEServers, Optional ICETransportPolicy, Optional metadataOptions, int timedInvokeTimeoutMs) { final long commandId = 3L; ArrayList elements = new ArrayList<>(); @@ -61661,9 +61685,9 @@ public void provideOffer(ProvideOfferResponseCallback callback, @Nullable Intege BaseTLVType sdptlvValue = new StringType(sdp); elements.add(new StructElement(sdpFieldID, sdptlvValue)); - final long streamTypeFieldID = 2L; - BaseTLVType streamTypetlvValue = new UIntType(streamType); - elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue)); + final long streamUsageFieldID = 2L; + BaseTLVType streamUsagetlvValue = new UIntType(streamUsage); + elements.add(new StructElement(streamUsageFieldID, streamUsagetlvValue)); final long videoStreamIDFieldID = 3L; BaseTLVType videoStreamIDtlvValue = videoStreamID != null ? videoStreamID.map((nonOptionalvideoStreamID) -> new UIntType(nonOptionalvideoStreamID)).orElse(new EmptyType()) : new NullType(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 59892d05188b8a..8905c909a086e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -6311,7 +6311,7 @@ public String toString() { } public static class CameraAvStreamManagementClusterVideoStreamChangedEvent { public Integer videoStreamID; - public Optional streamType; + public Optional streamUsage; public Optional videoCodec; public Optional minFrameRate; public Optional maxFrameRate; @@ -6322,7 +6322,7 @@ public static class CameraAvStreamManagementClusterVideoStreamChangedEvent { public Optional minFragmentLen; public Optional maxFragmentLen; private static final long VIDEO_STREAM_ID_ID = 0L; - private static final long STREAM_TYPE_ID = 1L; + private static final long STREAM_USAGE_ID = 1L; private static final long VIDEO_CODEC_ID = 2L; private static final long MIN_FRAME_RATE_ID = 3L; private static final long MAX_FRAME_RATE_ID = 4L; @@ -6335,7 +6335,7 @@ public static class CameraAvStreamManagementClusterVideoStreamChangedEvent { public CameraAvStreamManagementClusterVideoStreamChangedEvent( Integer videoStreamID, - Optional streamType, + Optional streamUsage, Optional videoCodec, Optional minFrameRate, Optional maxFrameRate, @@ -6347,7 +6347,7 @@ public CameraAvStreamManagementClusterVideoStreamChangedEvent( Optional maxFragmentLen ) { this.videoStreamID = videoStreamID; - this.streamType = streamType; + this.streamUsage = streamUsage; this.videoCodec = videoCodec; this.minFrameRate = minFrameRate; this.maxFrameRate = maxFrameRate; @@ -6362,7 +6362,7 @@ public CameraAvStreamManagementClusterVideoStreamChangedEvent( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(VIDEO_STREAM_ID_ID, new UIntType(videoStreamID))); - values.add(new StructElement(STREAM_TYPE_ID, streamType.map((nonOptionalstreamType) -> new UIntType(nonOptionalstreamType)).orElse(new EmptyType()))); + values.add(new StructElement(STREAM_USAGE_ID, streamUsage.map((nonOptionalstreamUsage) -> new UIntType(nonOptionalstreamUsage)).orElse(new EmptyType()))); values.add(new StructElement(VIDEO_CODEC_ID, videoCodec.map((nonOptionalvideoCodec) -> new UIntType(nonOptionalvideoCodec)).orElse(new EmptyType()))); values.add(new StructElement(MIN_FRAME_RATE_ID, minFrameRate.map((nonOptionalminFrameRate) -> new UIntType(nonOptionalminFrameRate)).orElse(new EmptyType()))); values.add(new StructElement(MAX_FRAME_RATE_ID, maxFrameRate.map((nonOptionalmaxFrameRate) -> new UIntType(nonOptionalmaxFrameRate)).orElse(new EmptyType()))); @@ -6381,7 +6381,7 @@ public static CameraAvStreamManagementClusterVideoStreamChangedEvent decodeTlv(B return null; } Integer videoStreamID = null; - Optional streamType = Optional.empty(); + Optional streamUsage = Optional.empty(); Optional videoCodec = Optional.empty(); Optional minFrameRate = Optional.empty(); Optional maxFrameRate = Optional.empty(); @@ -6397,10 +6397,10 @@ public static CameraAvStreamManagementClusterVideoStreamChangedEvent decodeTlv(B UIntType castingValue = element.value(UIntType.class); videoStreamID = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == STREAM_TYPE_ID) { + } else if (element.contextTagNum() == STREAM_USAGE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - streamType = Optional.of(castingValue.value(Integer.class)); + streamUsage = Optional.of(castingValue.value(Integer.class)); } } else if (element.contextTagNum() == VIDEO_CODEC_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -6451,7 +6451,7 @@ public static CameraAvStreamManagementClusterVideoStreamChangedEvent decodeTlv(B } return new CameraAvStreamManagementClusterVideoStreamChangedEvent( videoStreamID, - streamType, + streamUsage, videoCodec, minFrameRate, maxFrameRate, @@ -6471,8 +6471,8 @@ public String toString() { output.append("\tvideoStreamID: "); output.append(videoStreamID); output.append("\n"); - output.append("\tstreamType: "); - output.append(streamType); + output.append("\tstreamUsage: "); + output.append(streamUsage); output.append("\n"); output.append("\tvideoCodec: "); output.append(videoCodec); @@ -6507,14 +6507,14 @@ public String toString() { } public static class CameraAvStreamManagementClusterAudioStreamChangedEvent { public Integer audioStreamID; - public Optional streamType; + public Optional streamUsage; public Optional audioCodec; public Optional channelCount; public Optional sampleRate; public Optional bitRate; public Optional bitDepth; private static final long AUDIO_STREAM_ID_ID = 0L; - private static final long STREAM_TYPE_ID = 1L; + private static final long STREAM_USAGE_ID = 1L; private static final long AUDIO_CODEC_ID = 2L; private static final long CHANNEL_COUNT_ID = 3L; private static final long SAMPLE_RATE_ID = 4L; @@ -6523,7 +6523,7 @@ public static class CameraAvStreamManagementClusterAudioStreamChangedEvent { public CameraAvStreamManagementClusterAudioStreamChangedEvent( Integer audioStreamID, - Optional streamType, + Optional streamUsage, Optional audioCodec, Optional channelCount, Optional sampleRate, @@ -6531,7 +6531,7 @@ public CameraAvStreamManagementClusterAudioStreamChangedEvent( Optional bitDepth ) { this.audioStreamID = audioStreamID; - this.streamType = streamType; + this.streamUsage = streamUsage; this.audioCodec = audioCodec; this.channelCount = channelCount; this.sampleRate = sampleRate; @@ -6542,7 +6542,7 @@ public CameraAvStreamManagementClusterAudioStreamChangedEvent( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(AUDIO_STREAM_ID_ID, new UIntType(audioStreamID))); - values.add(new StructElement(STREAM_TYPE_ID, streamType.map((nonOptionalstreamType) -> new UIntType(nonOptionalstreamType)).orElse(new EmptyType()))); + values.add(new StructElement(STREAM_USAGE_ID, streamUsage.map((nonOptionalstreamUsage) -> new UIntType(nonOptionalstreamUsage)).orElse(new EmptyType()))); values.add(new StructElement(AUDIO_CODEC_ID, audioCodec.map((nonOptionalaudioCodec) -> new UIntType(nonOptionalaudioCodec)).orElse(new EmptyType()))); values.add(new StructElement(CHANNEL_COUNT_ID, channelCount.map((nonOptionalchannelCount) -> new UIntType(nonOptionalchannelCount)).orElse(new EmptyType()))); values.add(new StructElement(SAMPLE_RATE_ID, sampleRate.map((nonOptionalsampleRate) -> new UIntType(nonOptionalsampleRate)).orElse(new EmptyType()))); @@ -6557,7 +6557,7 @@ public static CameraAvStreamManagementClusterAudioStreamChangedEvent decodeTlv(B return null; } Integer audioStreamID = null; - Optional streamType = Optional.empty(); + Optional streamUsage = Optional.empty(); Optional audioCodec = Optional.empty(); Optional channelCount = Optional.empty(); Optional sampleRate = Optional.empty(); @@ -6569,10 +6569,10 @@ public static CameraAvStreamManagementClusterAudioStreamChangedEvent decodeTlv(B UIntType castingValue = element.value(UIntType.class); audioStreamID = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == STREAM_TYPE_ID) { + } else if (element.contextTagNum() == STREAM_USAGE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - streamType = Optional.of(castingValue.value(Integer.class)); + streamUsage = Optional.of(castingValue.value(Integer.class)); } } else if (element.contextTagNum() == AUDIO_CODEC_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -6603,7 +6603,7 @@ public static CameraAvStreamManagementClusterAudioStreamChangedEvent decodeTlv(B } return new CameraAvStreamManagementClusterAudioStreamChangedEvent( audioStreamID, - streamType, + streamUsage, audioCodec, channelCount, sampleRate, @@ -6619,8 +6619,8 @@ public String toString() { output.append("\taudioStreamID: "); output.append(audioStreamID); output.append("\n"); - output.append("\tstreamType: "); - output.append(streamType); + output.append("\tstreamUsage: "); + output.append(streamUsage); output.append("\n"); output.append("\taudioCodec: "); output.append(audioCodec); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index bbb319ba5334ab..5583a303a48d46 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -13121,7 +13121,7 @@ public String toString() { } public static class CameraAvStreamManagementClusterVideoStreamStruct { public Integer videoStreamID; - public Integer streamType; + public Integer streamUsage; public Integer videoCodec; public Integer minFrameRate; public Integer maxFrameRate; @@ -13135,7 +13135,7 @@ public static class CameraAvStreamManagementClusterVideoStreamStruct { public Optional OSDEnabled; public Integer referenceCount; private static final long VIDEO_STREAM_ID_ID = 0L; - private static final long STREAM_TYPE_ID = 1L; + private static final long STREAM_USAGE_ID = 1L; private static final long VIDEO_CODEC_ID = 2L; private static final long MIN_FRAME_RATE_ID = 3L; private static final long MAX_FRAME_RATE_ID = 4L; @@ -13151,7 +13151,7 @@ public static class CameraAvStreamManagementClusterVideoStreamStruct { public CameraAvStreamManagementClusterVideoStreamStruct( Integer videoStreamID, - Integer streamType, + Integer streamUsage, Integer videoCodec, Integer minFrameRate, Integer maxFrameRate, @@ -13166,7 +13166,7 @@ public CameraAvStreamManagementClusterVideoStreamStruct( Integer referenceCount ) { this.videoStreamID = videoStreamID; - this.streamType = streamType; + this.streamUsage = streamUsage; this.videoCodec = videoCodec; this.minFrameRate = minFrameRate; this.maxFrameRate = maxFrameRate; @@ -13184,7 +13184,7 @@ public CameraAvStreamManagementClusterVideoStreamStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(VIDEO_STREAM_ID_ID, new UIntType(videoStreamID))); - values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType))); + values.add(new StructElement(STREAM_USAGE_ID, new UIntType(streamUsage))); values.add(new StructElement(VIDEO_CODEC_ID, new UIntType(videoCodec))); values.add(new StructElement(MIN_FRAME_RATE_ID, new UIntType(minFrameRate))); values.add(new StructElement(MAX_FRAME_RATE_ID, new UIntType(maxFrameRate))); @@ -13206,7 +13206,7 @@ public static CameraAvStreamManagementClusterVideoStreamStruct decodeTlv(BaseTLV return null; } Integer videoStreamID = null; - Integer streamType = null; + Integer streamUsage = null; Integer videoCodec = null; Integer minFrameRate = null; Integer maxFrameRate = null; @@ -13225,10 +13225,10 @@ public static CameraAvStreamManagementClusterVideoStreamStruct decodeTlv(BaseTLV UIntType castingValue = element.value(UIntType.class); videoStreamID = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == STREAM_TYPE_ID) { + } else if (element.contextTagNum() == STREAM_USAGE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - streamType = castingValue.value(Integer.class); + streamUsage = castingValue.value(Integer.class); } } else if (element.contextTagNum() == VIDEO_CODEC_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -13294,7 +13294,7 @@ public static CameraAvStreamManagementClusterVideoStreamStruct decodeTlv(BaseTLV } return new CameraAvStreamManagementClusterVideoStreamStruct( videoStreamID, - streamType, + streamUsage, videoCodec, minFrameRate, maxFrameRate, @@ -13317,8 +13317,8 @@ public String toString() { output.append("\tvideoStreamID: "); output.append(videoStreamID); output.append("\n"); - output.append("\tstreamType: "); - output.append(streamType); + output.append("\tstreamUsage: "); + output.append(streamUsage); output.append("\n"); output.append("\tvideoCodec: "); output.append(videoCodec); @@ -13756,7 +13756,7 @@ public String toString() { } public static class CameraAvStreamManagementClusterAudioStreamStruct { public Integer audioStreamID; - public Integer streamType; + public Integer streamUsage; public Integer audioCodec; public Integer channelCount; public Long sampleRate; @@ -13764,7 +13764,7 @@ public static class CameraAvStreamManagementClusterAudioStreamStruct { public Integer bitDepth; public Integer referenceCount; private static final long AUDIO_STREAM_ID_ID = 0L; - private static final long STREAM_TYPE_ID = 1L; + private static final long STREAM_USAGE_ID = 1L; private static final long AUDIO_CODEC_ID = 2L; private static final long CHANNEL_COUNT_ID = 3L; private static final long SAMPLE_RATE_ID = 4L; @@ -13774,7 +13774,7 @@ public static class CameraAvStreamManagementClusterAudioStreamStruct { public CameraAvStreamManagementClusterAudioStreamStruct( Integer audioStreamID, - Integer streamType, + Integer streamUsage, Integer audioCodec, Integer channelCount, Long sampleRate, @@ -13783,7 +13783,7 @@ public CameraAvStreamManagementClusterAudioStreamStruct( Integer referenceCount ) { this.audioStreamID = audioStreamID; - this.streamType = streamType; + this.streamUsage = streamUsage; this.audioCodec = audioCodec; this.channelCount = channelCount; this.sampleRate = sampleRate; @@ -13795,7 +13795,7 @@ public CameraAvStreamManagementClusterAudioStreamStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(AUDIO_STREAM_ID_ID, new UIntType(audioStreamID))); - values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType))); + values.add(new StructElement(STREAM_USAGE_ID, new UIntType(streamUsage))); values.add(new StructElement(AUDIO_CODEC_ID, new UIntType(audioCodec))); values.add(new StructElement(CHANNEL_COUNT_ID, new UIntType(channelCount))); values.add(new StructElement(SAMPLE_RATE_ID, new UIntType(sampleRate))); @@ -13811,7 +13811,7 @@ public static CameraAvStreamManagementClusterAudioStreamStruct decodeTlv(BaseTLV return null; } Integer audioStreamID = null; - Integer streamType = null; + Integer streamUsage = null; Integer audioCodec = null; Integer channelCount = null; Long sampleRate = null; @@ -13824,10 +13824,10 @@ public static CameraAvStreamManagementClusterAudioStreamStruct decodeTlv(BaseTLV UIntType castingValue = element.value(UIntType.class); audioStreamID = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == STREAM_TYPE_ID) { + } else if (element.contextTagNum() == STREAM_USAGE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - streamType = castingValue.value(Integer.class); + streamUsage = castingValue.value(Integer.class); } } else if (element.contextTagNum() == AUDIO_CODEC_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -13863,7 +13863,7 @@ public static CameraAvStreamManagementClusterAudioStreamStruct decodeTlv(BaseTLV } return new CameraAvStreamManagementClusterAudioStreamStruct( audioStreamID, - streamType, + streamUsage, audioCodec, channelCount, sampleRate, @@ -13880,8 +13880,8 @@ public String toString() { output.append("\taudioStreamID: "); output.append(audioStreamID); output.append("\n"); - output.append("\tstreamType: "); - output.append(streamType); + output.append("\tstreamUsage: "); + output.append(streamUsage); output.append("\n"); output.append("\taudioCodec: "); output.append(audioCodec); @@ -14197,14 +14197,14 @@ public static class WebRTCTransportProviderClusterWebRTCSessionStruct { public Integer id; public Long peerNodeID; public Integer peerFabricIndex; - public Integer streamType; + public Integer streamUsage; public @Nullable Integer videoStreamID; public @Nullable Integer audioStreamID; public Integer metadataOptions; private static final long ID_ID = 1L; private static final long PEER_NODE_ID_ID = 2L; private static final long PEER_FABRIC_INDEX_ID = 3L; - private static final long STREAM_TYPE_ID = 4L; + private static final long STREAM_USAGE_ID = 4L; private static final long VIDEO_STREAM_ID_ID = 5L; private static final long AUDIO_STREAM_ID_ID = 6L; private static final long METADATA_OPTIONS_ID = 7L; @@ -14213,7 +14213,7 @@ public WebRTCTransportProviderClusterWebRTCSessionStruct( Integer id, Long peerNodeID, Integer peerFabricIndex, - Integer streamType, + Integer streamUsage, @Nullable Integer videoStreamID, @Nullable Integer audioStreamID, Integer metadataOptions @@ -14221,7 +14221,7 @@ public WebRTCTransportProviderClusterWebRTCSessionStruct( this.id = id; this.peerNodeID = peerNodeID; this.peerFabricIndex = peerFabricIndex; - this.streamType = streamType; + this.streamUsage = streamUsage; this.videoStreamID = videoStreamID; this.audioStreamID = audioStreamID; this.metadataOptions = metadataOptions; @@ -14232,7 +14232,7 @@ public StructType encodeTlv() { values.add(new StructElement(ID_ID, new UIntType(id))); values.add(new StructElement(PEER_NODE_ID_ID, new UIntType(peerNodeID))); values.add(new StructElement(PEER_FABRIC_INDEX_ID, new UIntType(peerFabricIndex))); - values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType))); + values.add(new StructElement(STREAM_USAGE_ID, new UIntType(streamUsage))); values.add(new StructElement(VIDEO_STREAM_ID_ID, videoStreamID != null ? new UIntType(videoStreamID) : new NullType())); values.add(new StructElement(AUDIO_STREAM_ID_ID, audioStreamID != null ? new UIntType(audioStreamID) : new NullType())); values.add(new StructElement(METADATA_OPTIONS_ID, new UIntType(metadataOptions))); @@ -14247,7 +14247,7 @@ public static WebRTCTransportProviderClusterWebRTCSessionStruct decodeTlv(BaseTL Integer id = null; Long peerNodeID = null; Integer peerFabricIndex = null; - Integer streamType = null; + Integer streamUsage = null; @Nullable Integer videoStreamID = null; @Nullable Integer audioStreamID = null; Integer metadataOptions = null; @@ -14267,10 +14267,10 @@ public static WebRTCTransportProviderClusterWebRTCSessionStruct decodeTlv(BaseTL UIntType castingValue = element.value(UIntType.class); peerFabricIndex = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == STREAM_TYPE_ID) { + } else if (element.contextTagNum() == STREAM_USAGE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - streamType = castingValue.value(Integer.class); + streamUsage = castingValue.value(Integer.class); } } else if (element.contextTagNum() == VIDEO_STREAM_ID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -14293,7 +14293,7 @@ public static WebRTCTransportProviderClusterWebRTCSessionStruct decodeTlv(BaseTL id, peerNodeID, peerFabricIndex, - streamType, + streamUsage, videoStreamID, audioStreamID, metadataOptions @@ -14313,8 +14313,8 @@ public String toString() { output.append("\tpeerFabricIndex: "); output.append(peerFabricIndex); output.append("\n"); - output.append("\tstreamType: "); - output.append(streamType); + output.append("\tstreamUsage: "); + output.append(streamUsage); output.append("\n"); output.append("\tvideoStreamID: "); output.append(videoStreamID); @@ -14424,14 +14424,14 @@ public static class WebRTCTransportRequestorClusterWebRTCSessionStruct { public Integer id; public Long peerNodeID; public Integer peerFabricIndex; - public Integer streamType; + public Integer streamUsage; public @Nullable Integer videoStreamID; public @Nullable Integer audioStreamID; public Integer metadataOptions; private static final long ID_ID = 1L; private static final long PEER_NODE_ID_ID = 2L; private static final long PEER_FABRIC_INDEX_ID = 3L; - private static final long STREAM_TYPE_ID = 4L; + private static final long STREAM_USAGE_ID = 4L; private static final long VIDEO_STREAM_ID_ID = 5L; private static final long AUDIO_STREAM_ID_ID = 6L; private static final long METADATA_OPTIONS_ID = 7L; @@ -14440,7 +14440,7 @@ public WebRTCTransportRequestorClusterWebRTCSessionStruct( Integer id, Long peerNodeID, Integer peerFabricIndex, - Integer streamType, + Integer streamUsage, @Nullable Integer videoStreamID, @Nullable Integer audioStreamID, Integer metadataOptions @@ -14448,7 +14448,7 @@ public WebRTCTransportRequestorClusterWebRTCSessionStruct( this.id = id; this.peerNodeID = peerNodeID; this.peerFabricIndex = peerFabricIndex; - this.streamType = streamType; + this.streamUsage = streamUsage; this.videoStreamID = videoStreamID; this.audioStreamID = audioStreamID; this.metadataOptions = metadataOptions; @@ -14459,7 +14459,7 @@ public StructType encodeTlv() { values.add(new StructElement(ID_ID, new UIntType(id))); values.add(new StructElement(PEER_NODE_ID_ID, new UIntType(peerNodeID))); values.add(new StructElement(PEER_FABRIC_INDEX_ID, new UIntType(peerFabricIndex))); - values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType))); + values.add(new StructElement(STREAM_USAGE_ID, new UIntType(streamUsage))); values.add(new StructElement(VIDEO_STREAM_ID_ID, videoStreamID != null ? new UIntType(videoStreamID) : new NullType())); values.add(new StructElement(AUDIO_STREAM_ID_ID, audioStreamID != null ? new UIntType(audioStreamID) : new NullType())); values.add(new StructElement(METADATA_OPTIONS_ID, new UIntType(metadataOptions))); @@ -14474,7 +14474,7 @@ public static WebRTCTransportRequestorClusterWebRTCSessionStruct decodeTlv(BaseT Integer id = null; Long peerNodeID = null; Integer peerFabricIndex = null; - Integer streamType = null; + Integer streamUsage = null; @Nullable Integer videoStreamID = null; @Nullable Integer audioStreamID = null; Integer metadataOptions = null; @@ -14494,10 +14494,10 @@ public static WebRTCTransportRequestorClusterWebRTCSessionStruct decodeTlv(BaseT UIntType castingValue = element.value(UIntType.class); peerFabricIndex = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == STREAM_TYPE_ID) { + } else if (element.contextTagNum() == STREAM_USAGE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - streamType = castingValue.value(Integer.class); + streamUsage = castingValue.value(Integer.class); } } else if (element.contextTagNum() == VIDEO_STREAM_ID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -14520,7 +14520,7 @@ public static WebRTCTransportRequestorClusterWebRTCSessionStruct decodeTlv(BaseT id, peerNodeID, peerFabricIndex, - streamType, + streamUsage, videoStreamID, audioStreamID, metadataOptions @@ -14540,8 +14540,8 @@ public String toString() { output.append("\tpeerFabricIndex: "); output.append(peerFabricIndex); output.append("\n"); - output.append("\tstreamType: "); - output.append(streamType); + output.append("\tstreamUsage: "); + output.append(streamUsage); output.append("\n"); output.append("\tvideoStreamID: "); output.append(videoStreamID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 86a43781fec889..f8dec7781b032c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -17189,7 +17189,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum AudioStreamAllocateCommandField {StreamType(0),AudioCodec(1),ChannelCount(2),SampleRate(3),BitRate(4),BitDepth(5),; + }public enum AudioStreamAllocateCommandField {StreamUsage(0),AudioCodec(1),ChannelCount(2),SampleRate(3),BitRate(4),BitDepth(5),; private final int id; AudioStreamAllocateCommandField(int id) { this.id = id; @@ -17223,7 +17223,7 @@ public static AudioStreamDeallocateCommandField value(int id) throws NoSuchField } throw new NoSuchFieldError(); } - }public enum VideoStreamAllocateCommandField {StreamType(0),VideoCodec(1),MinFrameRate(2),MaxFrameRate(3),MinResolution(4),MaxResolution(5),MinBitRate(6),MaxBitRate(7),MinFragmentLen(8),MaxFragmentLen(9),WatermarkEnabled(10),OSDEnabled(11),; + }public enum VideoStreamAllocateCommandField {StreamUsage(0),VideoCodec(1),MinFrameRate(2),MaxFrameRate(3),MinResolution(4),MaxResolution(5),MinBitRate(6),MaxBitRate(7),MinFragmentLen(8),MaxFragmentLen(9),WatermarkEnabled(10),OSDEnabled(11),; private final int id; VideoStreamAllocateCommandField(int id) { this.id = id; @@ -17240,7 +17240,7 @@ public static VideoStreamAllocateCommandField value(int id) throws NoSuchFieldEr } throw new NoSuchFieldError(); } - }public enum VideoStreamModifyCommandField {VideoStreamID(0),Resolution(1),WatermarkEnabled(2),OSDEnabled(3),; + }public enum VideoStreamModifyCommandField {VideoStreamID(0),WatermarkEnabled(1),OSDEnabled(2),; private final int id; VideoStreamModifyCommandField(int id) { this.id = id; @@ -17448,7 +17448,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SolicitOfferCommandField {StreamType(0),VideoStreamID(1),AudioStreamID(2),ICEServers(3),ICETransportPolicy(4),MetadataOptions(5),; + }public enum SolicitOfferCommandField {StreamUsage(0),VideoStreamID(1),AudioStreamID(2),ICEServers(3),ICETransportPolicy(4),MetadataOptions(5),; private final int id; SolicitOfferCommandField(int id) { this.id = id; @@ -17465,7 +17465,7 @@ public static SolicitOfferCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum ProvideOfferCommandField {WebRTCSessionID(0),Sdp(1),StreamType(2),VideoStreamID(3),AudioStreamID(4),ICEServers(5),ICETransportPolicy(6),MetadataOptions(7),; + }public enum ProvideOfferCommandField {WebRTCSessionID(0),Sdp(1),StreamUsage(2),VideoStreamID(3),AudioStreamID(4),ICEServers(5),ICETransportPolicy(6),MetadataOptions(7),; private final int id; ProvideOfferCommandField(int id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 42e96815ef9b43..966a553a8eca97 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -20126,6 +20126,32 @@ public void onError(Exception error) { callback.onFailure(error); } } + + public static class DelegatedCameraAvStreamManagementClusterCaptureSnapshotResponseCallback implements ChipClusters.CameraAvStreamManagementCluster.CaptureSnapshotResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(byte[] data, Integer imageCodec, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "byte[]"); + responseValues.put(dataResponseValue, data); + CommandResponseInfo imageCodecResponseValue = new CommandResponseInfo("imageCodec", "Integer"); + responseValues.put(imageCodecResponseValue, imageCodec); + // resolution: Struct VideoResolutionStruct + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } public static class DelegatedCameraAvStreamManagementClusterVideoSensorParamsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.VideoSensorParamsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -29570,8 +29596,8 @@ public Map> getCommandMap() { Map cameraAvStreamManagementaudioStreamAllocateCommandParams = new LinkedHashMap(); - CommandParameterInfo cameraAvStreamManagementaudioStreamAllocatestreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class); - cameraAvStreamManagementaudioStreamAllocateCommandParams.put("streamType",cameraAvStreamManagementaudioStreamAllocatestreamTypeCommandParameterInfo); + CommandParameterInfo cameraAvStreamManagementaudioStreamAllocatestreamUsageCommandParameterInfo = new CommandParameterInfo("streamUsage", Integer.class, Integer.class); + cameraAvStreamManagementaudioStreamAllocateCommandParams.put("streamUsage",cameraAvStreamManagementaudioStreamAllocatestreamUsageCommandParameterInfo); CommandParameterInfo cameraAvStreamManagementaudioStreamAllocateaudioCodecCommandParameterInfo = new CommandParameterInfo("audioCodec", Integer.class, Integer.class); cameraAvStreamManagementaudioStreamAllocateCommandParams.put("audioCodec",cameraAvStreamManagementaudioStreamAllocateaudioCodecCommandParameterInfo); @@ -29592,7 +29618,7 @@ public Map> getCommandMap() { ((ChipClusters.CameraAvStreamManagementCluster) cluster) .audioStreamAllocate((ChipClusters.CameraAvStreamManagementCluster.AudioStreamAllocateResponseCallback) callback , (Integer) - commandArguments.get("streamType") + commandArguments.get("streamUsage") , (Integer) commandArguments.get("audioCodec") @@ -29635,8 +29661,8 @@ public Map> getCommandMap() { Map cameraAvStreamManagementvideoStreamAllocateCommandParams = new LinkedHashMap(); - CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatestreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class); - cameraAvStreamManagementvideoStreamAllocateCommandParams.put("streamType",cameraAvStreamManagementvideoStreamAllocatestreamTypeCommandParameterInfo); + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatestreamUsageCommandParameterInfo = new CommandParameterInfo("streamUsage", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("streamUsage",cameraAvStreamManagementvideoStreamAllocatestreamUsageCommandParameterInfo); CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatevideoCodecCommandParameterInfo = new CommandParameterInfo("videoCodec", Integer.class, Integer.class); cameraAvStreamManagementvideoStreamAllocateCommandParams.put("videoCodec",cameraAvStreamManagementvideoStreamAllocatevideoCodecCommandParameterInfo); @@ -29671,7 +29697,7 @@ public Map> getCommandMap() { ((ChipClusters.CameraAvStreamManagementCluster) cluster) .videoStreamAllocate((ChipClusters.CameraAvStreamManagementCluster.VideoStreamAllocateResponseCallback) callback , (Integer) - commandArguments.get("streamType") + commandArguments.get("streamUsage") , (Integer) commandArguments.get("videoCodec") @@ -29718,7 +29744,6 @@ public Map> getCommandMap() { CommandParameterInfo cameraAvStreamManagementvideoStreamModifyvideoStreamIDCommandParameterInfo = new CommandParameterInfo("videoStreamID", Integer.class, Integer.class); cameraAvStreamManagementvideoStreamModifyCommandParams.put("videoStreamID",cameraAvStreamManagementvideoStreamModifyvideoStreamIDCommandParameterInfo); - CommandParameterInfo cameraAvStreamManagementvideoStreamModifywatermarkEnabledCommandParameterInfo = new CommandParameterInfo("watermarkEnabled", Optional.class, Boolean.class); cameraAvStreamManagementvideoStreamModifyCommandParams.put("watermarkEnabled",cameraAvStreamManagementvideoStreamModifywatermarkEnabledCommandParameterInfo); @@ -29730,8 +29755,6 @@ public Map> getCommandMap() { .videoStreamModify((DefaultClusterCallback) callback , (Integer) commandArguments.get("videoStreamID") - , (Optional) - commandArguments.get("resolution") , (Optional) commandArguments.get("watermarkEnabled") , (Optional) @@ -29846,16 +29869,18 @@ public Map> getCommandMap() { InteractionInfo cameraAvStreamManagementcaptureSnapshotInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.CameraAvStreamManagementCluster) cluster) - .captureSnapshot((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("snapshotStreamID") - , (ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct) - commandArguments.get("requestedResolution") - ); - }, - () -> new DelegatedDefaultClusterCallback(), + .captureSnapshot((ChipClusters.CameraAvStreamManagementCluster.CaptureSnapshotResponseCallback) callback + , (Integer) + commandArguments.get("snapshotStreamID") + + , (ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct) + commandArguments.get("requestedResolution") + + ); + }, + () -> new DelegatedCameraAvStreamManagementClusterCaptureSnapshotResponseCallback(), cameraAvStreamManagementcaptureSnapshotCommandParams - ); + ); cameraAvStreamManagementClusterInteractionInfoMap.put("captureSnapshot", cameraAvStreamManagementcaptureSnapshotInteractionInfo); commandMap.put("cameraAvStreamManagement", cameraAvStreamManagementClusterInteractionInfoMap); @@ -29864,8 +29889,8 @@ public Map> getCommandMap() { Map webRTCTransportProvidersolicitOfferCommandParams = new LinkedHashMap(); - CommandParameterInfo webRTCTransportProvidersolicitOfferstreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class); - webRTCTransportProvidersolicitOfferCommandParams.put("streamType",webRTCTransportProvidersolicitOfferstreamTypeCommandParameterInfo); + CommandParameterInfo webRTCTransportProvidersolicitOfferstreamUsageCommandParameterInfo = new CommandParameterInfo("streamUsage", Integer.class, Integer.class); + webRTCTransportProvidersolicitOfferCommandParams.put("streamUsage",webRTCTransportProvidersolicitOfferstreamUsageCommandParameterInfo); CommandParameterInfo webRTCTransportProvidersolicitOffervideoStreamIDCommandParameterInfo = new CommandParameterInfo("videoStreamID", Optional.class, Integer.class); webRTCTransportProvidersolicitOfferCommandParams.put("videoStreamID",webRTCTransportProvidersolicitOffervideoStreamIDCommandParameterInfo); @@ -29884,7 +29909,7 @@ public Map> getCommandMap() { ((ChipClusters.WebRTCTransportProviderCluster) cluster) .solicitOffer((ChipClusters.WebRTCTransportProviderCluster.SolicitOfferResponseCallback) callback , (Integer) - commandArguments.get("streamType") + commandArguments.get("streamUsage") , (Optional) commandArguments.get("videoStreamID") @@ -29916,8 +29941,8 @@ public Map> getCommandMap() { CommandParameterInfo webRTCTransportProviderprovideOffersdpCommandParameterInfo = new CommandParameterInfo("sdp", String.class, String.class); webRTCTransportProviderprovideOfferCommandParams.put("sdp",webRTCTransportProviderprovideOffersdpCommandParameterInfo); - CommandParameterInfo webRTCTransportProviderprovideOfferstreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class); - webRTCTransportProviderprovideOfferCommandParams.put("streamType",webRTCTransportProviderprovideOfferstreamTypeCommandParameterInfo); + CommandParameterInfo webRTCTransportProviderprovideOfferstreamUsageCommandParameterInfo = new CommandParameterInfo("streamUsage", Integer.class, Integer.class); + webRTCTransportProviderprovideOfferCommandParams.put("streamUsage",webRTCTransportProviderprovideOfferstreamUsageCommandParameterInfo); CommandParameterInfo webRTCTransportProviderprovideOffervideoStreamIDCommandParameterInfo = new CommandParameterInfo("videoStreamID", Optional.class, Integer.class); webRTCTransportProviderprovideOfferCommandParams.put("videoStreamID",webRTCTransportProviderprovideOffervideoStreamIDCommandParameterInfo); @@ -29942,7 +29967,7 @@ public Map> getCommandMap() { commandArguments.get("sdp") , (Integer) - commandArguments.get("streamType") + commandArguments.get("streamUsage") , (Optional) commandArguments.get("videoStreamID") diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt index 912de2937772c3..4c6471dddbb5e7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterAudioStreamChangedEvent( val audioStreamID: UInt, - val streamType: Optional, + val streamUsage: Optional, val audioCodec: Optional, val channelCount: Optional, val sampleRate: Optional, @@ -35,7 +35,7 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterAudioStreamChangedEvent {\n") append("\taudioStreamID : $audioStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\taudioCodec : $audioCodec\n") append("\tchannelCount : $channelCount\n") append("\tsampleRate : $sampleRate\n") @@ -48,9 +48,9 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) - if (streamType.isPresent) { - val optstreamType = streamType.get() - put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + if (streamUsage.isPresent) { + val optstreamUsage = streamUsage.get() + put(ContextSpecificTag(TAG_STREAM_USAGE), optstreamUsage) } if (audioCodec.isPresent) { val optaudioCodec = audioCodec.get() @@ -78,7 +78,7 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( companion object { private const val TAG_AUDIO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_AUDIO_CODEC = 2 private const val TAG_CHANNEL_COUNT = 3 private const val TAG_SAMPLE_RATE = 4 @@ -91,9 +91,9 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( ): CameraAvStreamManagementClusterAudioStreamChangedEvent { tlvReader.enterStructure(tlvTag) val audioStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) - val streamType = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE))) + val streamUsage = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_USAGE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_USAGE))) } else { Optional.empty() } @@ -132,7 +132,7 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( return CameraAvStreamManagementClusterAudioStreamChangedEvent( audioStreamID, - streamType, + streamUsage, audioCodec, channelCount, sampleRate, diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt index cbe9480493c8a6..802ce6a49c8c67 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterVideoStreamChangedEvent( val videoStreamID: UInt, - val streamType: Optional, + val streamUsage: Optional, val videoCodec: Optional, val minFrameRate: Optional, val maxFrameRate: Optional, @@ -45,7 +45,7 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterVideoStreamChangedEvent {\n") append("\tvideoStreamID : $videoStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoCodec : $videoCodec\n") append("\tminFrameRate : $minFrameRate\n") append("\tmaxFrameRate : $maxFrameRate\n") @@ -62,9 +62,9 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) - if (streamType.isPresent) { - val optstreamType = streamType.get() - put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + if (streamUsage.isPresent) { + val optstreamUsage = streamUsage.get() + put(ContextSpecificTag(TAG_STREAM_USAGE), optstreamUsage) } if (videoCodec.isPresent) { val optvideoCodec = videoCodec.get() @@ -108,7 +108,7 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( companion object { private const val TAG_VIDEO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_VIDEO_CODEC = 2 private const val TAG_MIN_FRAME_RATE = 3 private const val TAG_MAX_FRAME_RATE = 4 @@ -125,9 +125,9 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( ): CameraAvStreamManagementClusterVideoStreamChangedEvent { tlvReader.enterStructure(tlvTag) val videoStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) - val streamType = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE))) + val streamUsage = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_USAGE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_USAGE))) } else { Optional.empty() } @@ -198,7 +198,7 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( return CameraAvStreamManagementClusterVideoStreamChangedEvent( videoStreamID, - streamType, + streamUsage, videoCodec, minFrameRate, maxFrameRate, diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt index 5acfc37aadfad9..408d69facba76d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt @@ -24,7 +24,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterAudioStreamStruct( val audioStreamID: UInt, - val streamType: UInt, + val streamUsage: UInt, val audioCodec: UInt, val channelCount: UInt, val sampleRate: ULong, @@ -35,7 +35,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterAudioStreamStruct {\n") append("\taudioStreamID : $audioStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\taudioCodec : $audioCodec\n") append("\tchannelCount : $channelCount\n") append("\tsampleRate : $sampleRate\n") @@ -49,7 +49,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) put(ContextSpecificTag(TAG_AUDIO_CODEC), audioCodec) put(ContextSpecificTag(TAG_CHANNEL_COUNT), channelCount) put(ContextSpecificTag(TAG_SAMPLE_RATE), sampleRate) @@ -62,7 +62,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( companion object { private const val TAG_AUDIO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_AUDIO_CODEC = 2 private const val TAG_CHANNEL_COUNT = 3 private const val TAG_SAMPLE_RATE = 4 @@ -76,7 +76,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( ): CameraAvStreamManagementClusterAudioStreamStruct { tlvReader.enterStructure(tlvTag) val audioStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) - val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_USAGE)) val audioCodec = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_CODEC)) val channelCount = tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL_COUNT)) val sampleRate = tlvReader.getULong(ContextSpecificTag(TAG_SAMPLE_RATE)) @@ -88,7 +88,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( return CameraAvStreamManagementClusterAudioStreamStruct( audioStreamID, - streamType, + streamUsage, audioCodec, channelCount, sampleRate, diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt index 048a8a928f5c8f..c44f8f4f793768 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterVideoStreamStruct( val videoStreamID: UInt, - val streamType: UInt, + val streamUsage: UInt, val videoCodec: UInt, val minFrameRate: UInt, val maxFrameRate: UInt, @@ -42,7 +42,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterVideoStreamStruct {\n") append("\tvideoStreamID : $videoStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoCodec : $videoCodec\n") append("\tminFrameRate : $minFrameRate\n") append("\tmaxFrameRate : $maxFrameRate\n") @@ -62,7 +62,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) put(ContextSpecificTag(TAG_VIDEO_CODEC), videoCodec) put(ContextSpecificTag(TAG_MIN_FRAME_RATE), minFrameRate) put(ContextSpecificTag(TAG_MAX_FRAME_RATE), maxFrameRate) @@ -87,7 +87,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( companion object { private const val TAG_VIDEO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_VIDEO_CODEC = 2 private const val TAG_MIN_FRAME_RATE = 3 private const val TAG_MAX_FRAME_RATE = 4 @@ -107,7 +107,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( ): CameraAvStreamManagementClusterVideoStreamStruct { tlvReader.enterStructure(tlvTag) val videoStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) - val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_USAGE)) val videoCodec = tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_CODEC)) val minFrameRate = tlvReader.getUInt(ContextSpecificTag(TAG_MIN_FRAME_RATE)) val maxFrameRate = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_FRAME_RATE)) @@ -143,7 +143,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( return CameraAvStreamManagementClusterVideoStreamStruct( videoStreamID, - streamType, + streamUsage, videoCodec, minFrameRate, maxFrameRate, diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt index 645c9a779bb57d..793d109046b6e0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt @@ -26,7 +26,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( val id: UInt, val peerNodeID: ULong, val peerFabricIndex: UInt, - val streamType: UInt, + val streamUsage: UInt, val videoStreamID: UInt?, val audioStreamID: UInt?, val metadataOptions: UInt, @@ -36,7 +36,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( append("\tid : $id\n") append("\tpeerNodeID : $peerNodeID\n") append("\tpeerFabricIndex : $peerFabricIndex\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoStreamID : $videoStreamID\n") append("\taudioStreamID : $audioStreamID\n") append("\tmetadataOptions : $metadataOptions\n") @@ -49,7 +49,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( put(ContextSpecificTag(TAG_ID), id) put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID) put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) if (videoStreamID != null) { put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) } else { @@ -69,7 +69,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( private const val TAG_ID = 1 private const val TAG_PEER_NODE_ID = 2 private const val TAG_PEER_FABRIC_INDEX = 3 - private const val TAG_STREAM_TYPE = 4 + private const val TAG_STREAM_USAGE = 4 private const val TAG_VIDEO_STREAM_ID = 5 private const val TAG_AUDIO_STREAM_ID = 6 private const val TAG_METADATA_OPTIONS = 7 @@ -82,7 +82,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( val id = tlvReader.getUInt(ContextSpecificTag(TAG_ID)) val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID)) val peerFabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_PEER_FABRIC_INDEX)) - val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_USAGE)) val videoStreamID = if (!tlvReader.isNull()) { tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) @@ -105,7 +105,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( id, peerNodeID, peerFabricIndex, - streamType, + streamUsage, videoStreamID, audioStreamID, metadataOptions, diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt index 40c666bbd69dea..23180bcc2f92a5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt @@ -26,7 +26,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( val id: UInt, val peerNodeID: ULong, val peerFabricIndex: UInt, - val streamType: UInt, + val streamUsage: UInt, val videoStreamID: UInt?, val audioStreamID: UInt?, val metadataOptions: UInt, @@ -36,7 +36,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( append("\tid : $id\n") append("\tpeerNodeID : $peerNodeID\n") append("\tpeerFabricIndex : $peerFabricIndex\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoStreamID : $videoStreamID\n") append("\taudioStreamID : $audioStreamID\n") append("\tmetadataOptions : $metadataOptions\n") @@ -49,7 +49,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( put(ContextSpecificTag(TAG_ID), id) put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID) put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) if (videoStreamID != null) { put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) } else { @@ -69,7 +69,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( private const val TAG_ID = 1 private const val TAG_PEER_NODE_ID = 2 private const val TAG_PEER_FABRIC_INDEX = 3 - private const val TAG_STREAM_TYPE = 4 + private const val TAG_STREAM_USAGE = 4 private const val TAG_VIDEO_STREAM_ID = 5 private const val TAG_AUDIO_STREAM_ID = 6 private const val TAG_METADATA_OPTIONS = 7 @@ -82,7 +82,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( val id = tlvReader.getUInt(ContextSpecificTag(TAG_ID)) val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID)) val peerFabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_PEER_FABRIC_INDEX)) - val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_USAGE)) val videoStreamID = if (!tlvReader.isNull()) { tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) @@ -105,7 +105,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( id, peerNodeID, peerFabricIndex, - streamType, + streamUsage, videoStreamID, audioStreamID, metadataOptions, diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt index ffcad10cbf9ef1..037f97217b68a3 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt @@ -54,6 +54,12 @@ class CameraAvStreamManagementCluster( class SnapshotStreamAllocateResponse(val snapshotStreamID: UShort) + class CaptureSnapshotResponse( + val data: ByteArray, + val imageCodec: UByte, + val resolution: CameraAvStreamManagementClusterVideoResolutionStruct, + ) + class VideoSensorParamsAttribute( val value: CameraAvStreamManagementClusterVideoSensorParamsStruct? ) @@ -247,7 +253,7 @@ class CameraAvStreamManagementCluster( } suspend fun audioStreamAllocate( - streamType: UByte, + streamUsage: UByte, audioCodec: UByte, channelCount: UByte, sampleRate: UInt, @@ -260,8 +266,8 @@ class CameraAvStreamManagementCluster( val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) - val TAG_STREAM_TYPE_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType) + val TAG_STREAM_USAGE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_STREAM_USAGE_REQ), streamUsage) val TAG_AUDIO_CODEC_REQ: Int = 1 tlvWriter.put(ContextSpecificTag(TAG_AUDIO_CODEC_REQ), audioCodec) @@ -335,7 +341,7 @@ class CameraAvStreamManagementCluster( } suspend fun videoStreamAllocate( - streamType: UByte, + streamUsage: UByte, videoCodec: UByte, minFrameRate: UShort, maxFrameRate: UShort, @@ -354,8 +360,8 @@ class CameraAvStreamManagementCluster( val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) - val TAG_STREAM_TYPE_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType) + val TAG_STREAM_USAGE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_STREAM_USAGE_REQ), streamUsage) val TAG_VIDEO_CODEC_REQ: Int = 1 tlvWriter.put(ContextSpecificTag(TAG_VIDEO_CODEC_REQ), videoCodec) @@ -429,7 +435,6 @@ class CameraAvStreamManagementCluster( suspend fun videoStreamModify( videoStreamID: UShort, - resolution: CameraAvStreamManagementClusterVideoResolutionStruct?, watermarkEnabled: Boolean?, OSDEnabled: Boolean?, timedInvokeTimeout: Duration? = null, @@ -442,15 +447,12 @@ class CameraAvStreamManagementCluster( val TAG_VIDEO_STREAM_ID_REQ: Int = 0 tlvWriter.put(ContextSpecificTag(TAG_VIDEO_STREAM_ID_REQ), videoStreamID) - val TAG_RESOLUTION_REQ: Int = 1 - resolution?.let { resolution.toTlv(ContextSpecificTag(TAG_RESOLUTION_REQ), tlvWriter) } - - val TAG_WATERMARK_ENABLED_REQ: Int = 2 + val TAG_WATERMARK_ENABLED_REQ: Int = 1 watermarkEnabled?.let { tlvWriter.put(ContextSpecificTag(TAG_WATERMARK_ENABLED_REQ), watermarkEnabled) } - val TAG_OSD_ENABLED_REQ: Int = 3 + val TAG_OSD_ENABLED_REQ: Int = 2 OSDEnabled?.let { tlvWriter.put(ContextSpecificTag(TAG_OSD_ENABLED_REQ), OSDEnabled) } tlvWriter.endStructure() @@ -609,7 +611,7 @@ class CameraAvStreamManagementCluster( snapshotStreamID: UShort, requestedResolution: CameraAvStreamManagementClusterVideoResolutionStruct, timedInvokeTimeout: Duration? = null, - ) { + ): CaptureSnapshotResponse { val commandId: UInt = 11u val tlvWriter = TlvWriter() @@ -631,6 +633,52 @@ class CameraAvStreamManagementCluster( val response: InvokeResponse = controller.invoke(request) logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_DATA: Int = 0 + var data_decoded: ByteArray? = null + + val TAG_IMAGE_CODEC: Int = 1 + var imageCodec_decoded: UByte? = null + + val TAG_RESOLUTION: Int = 2 + var resolution_decoded: CameraAvStreamManagementClusterVideoResolutionStruct? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_DATA)) { + data_decoded = tlvReader.getByteArray(tag) + } + + if (tag == ContextSpecificTag(TAG_IMAGE_CODEC)) { + imageCodec_decoded = tlvReader.getUByte(tag) + } + + if (tag == ContextSpecificTag(TAG_RESOLUTION)) { + resolution_decoded = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv(tag, tlvReader) + } else { + tlvReader.skipElement() + } + } + + if (data_decoded == null) { + throw IllegalStateException("data not found in TLV") + } + + if (imageCodec_decoded == null) { + throw IllegalStateException("imageCodec not found in TLV") + } + + if (resolution_decoded == null) { + throw IllegalStateException("resolution not found in TLV") + } + + tlvReader.exitContainer() + + return CaptureSnapshotResponse(data_decoded, imageCodec_decoded, resolution_decoded) } suspend fun readMaxConcurrentVideoEncodersAttribute(): UByte? { diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt index 6fee15959f507e..26a9d7cb498940 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt @@ -110,7 +110,7 @@ class WebRTCTransportProviderCluster( } suspend fun solicitOffer( - streamType: UByte, + streamUsage: UByte, videoStreamID: UShort?, audioStreamID: UShort?, ICEServers: List?, @@ -123,8 +123,8 @@ class WebRTCTransportProviderCluster( val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) - val TAG_STREAM_TYPE_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType) + val TAG_STREAM_USAGE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_STREAM_USAGE_REQ), streamUsage) val TAG_VIDEO_STREAM_ID_REQ: Int = 1 videoStreamID?.let { tlvWriter.put(ContextSpecificTag(TAG_VIDEO_STREAM_ID_REQ), videoStreamID) } @@ -249,7 +249,7 @@ class WebRTCTransportProviderCluster( suspend fun provideOffer( webRTCSessionID: UShort?, sdp: String, - streamType: UByte, + streamUsage: UByte, videoStreamID: UShort?, audioStreamID: UShort?, ICEServers: List?, @@ -270,8 +270,8 @@ class WebRTCTransportProviderCluster( val TAG_SDP_REQ: Int = 1 tlvWriter.put(ContextSpecificTag(TAG_SDP_REQ), sdp) - val TAG_STREAM_TYPE_REQ: Int = 2 - tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType) + val TAG_STREAM_USAGE_REQ: Int = 2 + tlvWriter.put(ContextSpecificTag(TAG_STREAM_USAGE_REQ), streamUsage) val TAG_VIDEO_STREAM_ID_REQ: Int = 3 videoStreamID?.let { tlvWriter.put(ContextSpecificTag(TAG_VIDEO_STREAM_ID_REQ), videoStreamID) } diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt index c398f49796b595..3e3f78187c7c50 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterAudioStreamChangedEvent( val audioStreamID: UShort, - val streamType: Optional, + val streamUsage: Optional, val audioCodec: Optional, val channelCount: Optional, val sampleRate: Optional, @@ -35,7 +35,7 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterAudioStreamChangedEvent {\n") append("\taudioStreamID : $audioStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\taudioCodec : $audioCodec\n") append("\tchannelCount : $channelCount\n") append("\tsampleRate : $sampleRate\n") @@ -48,9 +48,9 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) - if (streamType.isPresent) { - val optstreamType = streamType.get() - put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + if (streamUsage.isPresent) { + val optstreamUsage = streamUsage.get() + put(ContextSpecificTag(TAG_STREAM_USAGE), optstreamUsage) } if (audioCodec.isPresent) { val optaudioCodec = audioCodec.get() @@ -78,7 +78,7 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( companion object { private const val TAG_AUDIO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_AUDIO_CODEC = 2 private const val TAG_CHANNEL_COUNT = 3 private const val TAG_SAMPLE_RATE = 4 @@ -91,9 +91,9 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( ): CameraAvStreamManagementClusterAudioStreamChangedEvent { tlvReader.enterStructure(tlvTag) val audioStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) - val streamType = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { - Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE))) + val streamUsage = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_USAGE))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_USAGE))) } else { Optional.empty() } @@ -132,7 +132,7 @@ class CameraAvStreamManagementClusterAudioStreamChangedEvent( return CameraAvStreamManagementClusterAudioStreamChangedEvent( audioStreamID, - streamType, + streamUsage, audioCodec, channelCount, sampleRate, diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt index c618556cd53f0c..e365197fee4a8c 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterVideoStreamChangedEvent( val videoStreamID: UShort, - val streamType: Optional, + val streamUsage: Optional, val videoCodec: Optional, val minFrameRate: Optional, val maxFrameRate: Optional, @@ -45,7 +45,7 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterVideoStreamChangedEvent {\n") append("\tvideoStreamID : $videoStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoCodec : $videoCodec\n") append("\tminFrameRate : $minFrameRate\n") append("\tmaxFrameRate : $maxFrameRate\n") @@ -62,9 +62,9 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) - if (streamType.isPresent) { - val optstreamType = streamType.get() - put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + if (streamUsage.isPresent) { + val optstreamUsage = streamUsage.get() + put(ContextSpecificTag(TAG_STREAM_USAGE), optstreamUsage) } if (videoCodec.isPresent) { val optvideoCodec = videoCodec.get() @@ -108,7 +108,7 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( companion object { private const val TAG_VIDEO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_VIDEO_CODEC = 2 private const val TAG_MIN_FRAME_RATE = 3 private const val TAG_MAX_FRAME_RATE = 4 @@ -125,9 +125,9 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( ): CameraAvStreamManagementClusterVideoStreamChangedEvent { tlvReader.enterStructure(tlvTag) val videoStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) - val streamType = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { - Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE))) + val streamUsage = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_USAGE))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_USAGE))) } else { Optional.empty() } @@ -196,7 +196,7 @@ class CameraAvStreamManagementClusterVideoStreamChangedEvent( return CameraAvStreamManagementClusterVideoStreamChangedEvent( videoStreamID, - streamType, + streamUsage, videoCodec, minFrameRate, maxFrameRate, diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt index 0ede21e0d34614..5dc285fa4caff1 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt @@ -24,7 +24,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterAudioStreamStruct( val audioStreamID: UShort, - val streamType: UByte, + val streamUsage: UByte, val audioCodec: UByte, val channelCount: UByte, val sampleRate: UInt, @@ -35,7 +35,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterAudioStreamStruct {\n") append("\taudioStreamID : $audioStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\taudioCodec : $audioCodec\n") append("\tchannelCount : $channelCount\n") append("\tsampleRate : $sampleRate\n") @@ -49,7 +49,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) put(ContextSpecificTag(TAG_AUDIO_CODEC), audioCodec) put(ContextSpecificTag(TAG_CHANNEL_COUNT), channelCount) put(ContextSpecificTag(TAG_SAMPLE_RATE), sampleRate) @@ -62,7 +62,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( companion object { private const val TAG_AUDIO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_AUDIO_CODEC = 2 private const val TAG_CHANNEL_COUNT = 3 private const val TAG_SAMPLE_RATE = 4 @@ -76,7 +76,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( ): CameraAvStreamManagementClusterAudioStreamStruct { tlvReader.enterStructure(tlvTag) val audioStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) - val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_USAGE)) val audioCodec = tlvReader.getUByte(ContextSpecificTag(TAG_AUDIO_CODEC)) val channelCount = tlvReader.getUByte(ContextSpecificTag(TAG_CHANNEL_COUNT)) val sampleRate = tlvReader.getUInt(ContextSpecificTag(TAG_SAMPLE_RATE)) @@ -88,7 +88,7 @@ class CameraAvStreamManagementClusterAudioStreamStruct( return CameraAvStreamManagementClusterAudioStreamStruct( audioStreamID, - streamType, + streamUsage, audioCodec, channelCount, sampleRate, diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt index 65941f8ba5783b..ac10a55505f413 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt @@ -25,7 +25,7 @@ import matter.tlv.TlvWriter class CameraAvStreamManagementClusterVideoStreamStruct( val videoStreamID: UShort, - val streamType: UByte, + val streamUsage: UByte, val videoCodec: UByte, val minFrameRate: UShort, val maxFrameRate: UShort, @@ -42,7 +42,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( override fun toString(): String = buildString { append("CameraAvStreamManagementClusterVideoStreamStruct {\n") append("\tvideoStreamID : $videoStreamID\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoCodec : $videoCodec\n") append("\tminFrameRate : $minFrameRate\n") append("\tmaxFrameRate : $maxFrameRate\n") @@ -62,7 +62,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) put(ContextSpecificTag(TAG_VIDEO_CODEC), videoCodec) put(ContextSpecificTag(TAG_MIN_FRAME_RATE), minFrameRate) put(ContextSpecificTag(TAG_MAX_FRAME_RATE), maxFrameRate) @@ -87,7 +87,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( companion object { private const val TAG_VIDEO_STREAM_ID = 0 - private const val TAG_STREAM_TYPE = 1 + private const val TAG_STREAM_USAGE = 1 private const val TAG_VIDEO_CODEC = 2 private const val TAG_MIN_FRAME_RATE = 3 private const val TAG_MAX_FRAME_RATE = 4 @@ -107,7 +107,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( ): CameraAvStreamManagementClusterVideoStreamStruct { tlvReader.enterStructure(tlvTag) val videoStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) - val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_USAGE)) val videoCodec = tlvReader.getUByte(ContextSpecificTag(TAG_VIDEO_CODEC)) val minFrameRate = tlvReader.getUShort(ContextSpecificTag(TAG_MIN_FRAME_RATE)) val maxFrameRate = tlvReader.getUShort(ContextSpecificTag(TAG_MAX_FRAME_RATE)) @@ -143,7 +143,7 @@ class CameraAvStreamManagementClusterVideoStreamStruct( return CameraAvStreamManagementClusterVideoStreamStruct( videoStreamID, - streamType, + streamUsage, videoCodec, minFrameRate, maxFrameRate, diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt index 564f52c520b476..ad0b1235cb3f55 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt @@ -26,7 +26,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( val id: UShort, val peerNodeID: ULong, val peerFabricIndex: UByte, - val streamType: UByte, + val streamUsage: UByte, val videoStreamID: UShort?, val audioStreamID: UShort?, val metadataOptions: UByte, @@ -36,7 +36,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( append("\tid : $id\n") append("\tpeerNodeID : $peerNodeID\n") append("\tpeerFabricIndex : $peerFabricIndex\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoStreamID : $videoStreamID\n") append("\taudioStreamID : $audioStreamID\n") append("\tmetadataOptions : $metadataOptions\n") @@ -49,7 +49,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( put(ContextSpecificTag(TAG_ID), id) put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID) put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) if (videoStreamID != null) { put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) } else { @@ -69,7 +69,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( private const val TAG_ID = 1 private const val TAG_PEER_NODE_ID = 2 private const val TAG_PEER_FABRIC_INDEX = 3 - private const val TAG_STREAM_TYPE = 4 + private const val TAG_STREAM_USAGE = 4 private const val TAG_VIDEO_STREAM_ID = 5 private const val TAG_AUDIO_STREAM_ID = 6 private const val TAG_METADATA_OPTIONS = 7 @@ -82,7 +82,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( val id = tlvReader.getUShort(ContextSpecificTag(TAG_ID)) val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID)) val peerFabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_PEER_FABRIC_INDEX)) - val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_USAGE)) val videoStreamID = if (!tlvReader.isNull()) { tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) @@ -105,7 +105,7 @@ class WebRTCTransportProviderClusterWebRTCSessionStruct( id, peerNodeID, peerFabricIndex, - streamType, + streamUsage, videoStreamID, audioStreamID, metadataOptions, diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt index 9c572a4097ce6d..8bc16bf9e82efe 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt @@ -26,7 +26,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( val id: UShort, val peerNodeID: ULong, val peerFabricIndex: UByte, - val streamType: UByte, + val streamUsage: UByte, val videoStreamID: UShort?, val audioStreamID: UShort?, val metadataOptions: UByte, @@ -36,7 +36,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( append("\tid : $id\n") append("\tpeerNodeID : $peerNodeID\n") append("\tpeerFabricIndex : $peerFabricIndex\n") - append("\tstreamType : $streamType\n") + append("\tstreamUsage : $streamUsage\n") append("\tvideoStreamID : $videoStreamID\n") append("\taudioStreamID : $audioStreamID\n") append("\tmetadataOptions : $metadataOptions\n") @@ -49,7 +49,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( put(ContextSpecificTag(TAG_ID), id) put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID) put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex) - put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_STREAM_USAGE), streamUsage) if (videoStreamID != null) { put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) } else { @@ -69,7 +69,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( private const val TAG_ID = 1 private const val TAG_PEER_NODE_ID = 2 private const val TAG_PEER_FABRIC_INDEX = 3 - private const val TAG_STREAM_TYPE = 4 + private const val TAG_STREAM_USAGE = 4 private const val TAG_VIDEO_STREAM_ID = 5 private const val TAG_AUDIO_STREAM_ID = 6 private const val TAG_METADATA_OPTIONS = 7 @@ -82,7 +82,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( val id = tlvReader.getUShort(ContextSpecificTag(TAG_ID)) val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID)) val peerFabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_PEER_FABRIC_INDEX)) - val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE)) + val streamUsage = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_USAGE)) val videoStreamID = if (!tlvReader.isNull()) { tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) @@ -105,7 +105,7 @@ class WebRTCTransportRequestorClusterWebRTCSessionStruct( id, peerNodeID, peerFabricIndex, - streamType, + streamUsage, videoStreamID, audioStreamID, metadataOptions, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index deddd974e4515e..137e2afeb3d0bc 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -40541,13 +40541,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(), jninewElement_0_videoStreamID, newElement_0_videoStreamID); - jobject newElement_0_streamType; - std::string newElement_0_streamTypeClassName = "java/lang/Integer"; - std::string newElement_0_streamTypeCtorSignature = "(I)V"; - jint jninewElement_0_streamType = static_cast(entry_0.streamType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), - newElement_0_streamTypeCtorSignature.c_str(), - jninewElement_0_streamType, newElement_0_streamType); + jobject newElement_0_streamUsage; + std::string newElement_0_streamUsageClassName = "java/lang/Integer"; + std::string newElement_0_streamUsageCtorSignature = "(I)V"; + jint jninewElement_0_streamUsage = static_cast(entry_0.streamUsage); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamUsageClassName.c_str(), + newElement_0_streamUsageCtorSignature.c_str(), + jninewElement_0_streamUsage, newElement_0_streamUsage); jobject newElement_0_videoCodec; std::string newElement_0_videoCodecClassName = "java/lang/Integer"; std::string newElement_0_videoCodecCtorSignature = "(I)V"; @@ -40754,7 +40754,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0 = env->NewObject( videoStreamStructStructClass_1, videoStreamStructStructCtor_1, newElement_0_videoStreamID, - newElement_0_streamType, newElement_0_videoCodec, newElement_0_minFrameRate, newElement_0_maxFrameRate, + newElement_0_streamUsage, newElement_0_videoCodec, newElement_0_minFrameRate, newElement_0_maxFrameRate, newElement_0_minResolution, newElement_0_maxResolution, newElement_0_minBitRate, newElement_0_maxBitRate, newElement_0_minFragmentLen, newElement_0_maxFragmentLen, newElement_0_watermarkEnabled, newElement_0_OSDEnabled, newElement_0_referenceCount); @@ -40786,13 +40786,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_audioStreamIDClassName.c_str(), newElement_0_audioStreamIDCtorSignature.c_str(), jninewElement_0_audioStreamID, newElement_0_audioStreamID); - jobject newElement_0_streamType; - std::string newElement_0_streamTypeClassName = "java/lang/Integer"; - std::string newElement_0_streamTypeCtorSignature = "(I)V"; - jint jninewElement_0_streamType = static_cast(entry_0.streamType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), - newElement_0_streamTypeCtorSignature.c_str(), - jninewElement_0_streamType, newElement_0_streamType); + jobject newElement_0_streamUsage; + std::string newElement_0_streamUsageClassName = "java/lang/Integer"; + std::string newElement_0_streamUsageCtorSignature = "(I)V"; + jint jninewElement_0_streamUsage = static_cast(entry_0.streamUsage); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamUsageClassName.c_str(), + newElement_0_streamUsageCtorSignature.c_str(), + jninewElement_0_streamUsage, newElement_0_streamUsage); jobject newElement_0_audioCodec; std::string newElement_0_audioCodecClassName = "java/lang/Integer"; std::string newElement_0_audioCodecCtorSignature = "(I)V"; @@ -40861,7 +40861,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } newElement_0 = env->NewObject(audioStreamStructStructClass_1, audioStreamStructStructCtor_1, - newElement_0_audioStreamID, newElement_0_streamType, newElement_0_audioCodec, + newElement_0_audioStreamID, newElement_0_streamUsage, newElement_0_audioCodec, newElement_0_channelCount, newElement_0_sampleRate, newElement_0_bitRate, newElement_0_bitDepth, newElement_0_referenceCount); } @@ -41620,13 +41620,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_peerFabricIndexClassName.c_str(), newElement_0_peerFabricIndexCtorSignature.c_str(), jninewElement_0_peerFabricIndex, newElement_0_peerFabricIndex); - jobject newElement_0_streamType; - std::string newElement_0_streamTypeClassName = "java/lang/Integer"; - std::string newElement_0_streamTypeCtorSignature = "(I)V"; - jint jninewElement_0_streamType = static_cast(entry_0.streamType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), - newElement_0_streamTypeCtorSignature.c_str(), - jninewElement_0_streamType, newElement_0_streamType); + jobject newElement_0_streamUsage; + std::string newElement_0_streamUsageClassName = "java/lang/Integer"; + std::string newElement_0_streamUsageCtorSignature = "(I)V"; + jint jninewElement_0_streamUsage = static_cast(entry_0.streamUsage); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamUsageClassName.c_str(), + newElement_0_streamUsageCtorSignature.c_str(), + jninewElement_0_streamUsage, newElement_0_streamUsage); jobject newElement_0_videoStreamID; if (entry_0.videoStreamID.IsNull()) { @@ -41689,7 +41689,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0 = env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id, - newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType, + newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamUsage, newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); @@ -41849,13 +41849,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_peerFabricIndexClassName.c_str(), newElement_0_peerFabricIndexCtorSignature.c_str(), jninewElement_0_peerFabricIndex, newElement_0_peerFabricIndex); - jobject newElement_0_streamType; - std::string newElement_0_streamTypeClassName = "java/lang/Integer"; - std::string newElement_0_streamTypeCtorSignature = "(I)V"; - jint jninewElement_0_streamType = static_cast(entry_0.streamType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), - newElement_0_streamTypeCtorSignature.c_str(), - jninewElement_0_streamType, newElement_0_streamType); + jobject newElement_0_streamUsage; + std::string newElement_0_streamUsageClassName = "java/lang/Integer"; + std::string newElement_0_streamUsageCtorSignature = "(I)V"; + jint jninewElement_0_streamUsage = static_cast(entry_0.streamUsage); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamUsageClassName.c_str(), + newElement_0_streamUsageCtorSignature.c_str(), + jninewElement_0_streamUsage, newElement_0_streamUsage); jobject newElement_0_videoStreamID; if (entry_0.videoStreamID.IsNull()) { @@ -41918,7 +41918,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0 = env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id, - newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType, + newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamUsage, newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index fdb5c9fb6589f7..1a28bfdffae10c 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -8442,21 +8442,21 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_videoStreamIDCtorSignature.c_str(), jnivalue_videoStreamID, value_videoStreamID); - jobject value_streamType; - if (!cppValue.streamType.HasValue()) + jobject value_streamUsage; + if (!cppValue.streamUsage.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_streamType); + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_streamUsage); } else { - jobject value_streamTypeInsideOptional; - std::string value_streamTypeInsideOptionalClassName = "java/lang/Integer"; - std::string value_streamTypeInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_streamTypeInsideOptional = static_cast(cppValue.streamType.Value()); + jobject value_streamUsageInsideOptional; + std::string value_streamUsageInsideOptionalClassName = "java/lang/Integer"; + std::string value_streamUsageInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_streamUsageInsideOptional = static_cast(cppValue.streamUsage.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - value_streamTypeInsideOptionalClassName.c_str(), value_streamTypeInsideOptionalCtorSignature.c_str(), - jnivalue_streamTypeInsideOptional, value_streamTypeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(value_streamTypeInsideOptional, value_streamType); + value_streamUsageInsideOptionalClassName.c_str(), value_streamUsageInsideOptionalCtorSignature.c_str(), + jnivalue_streamUsageInsideOptional, value_streamUsageInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_streamUsageInsideOptional, value_streamUsage); } jobject value_videoCodec; @@ -8710,7 +8710,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jobject value = - env->NewObject(videoStreamChangedStructClass, videoStreamChangedStructCtor, value_videoStreamID, value_streamType, + env->NewObject(videoStreamChangedStructClass, videoStreamChangedStructCtor, value_videoStreamID, value_streamUsage, value_videoCodec, value_minFrameRate, value_maxFrameRate, value_minResolution, value_maxResolution, value_minBitRate, value_maxBitRate, value_minFragmentLen, value_maxFragmentLen); @@ -8731,21 +8731,21 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_audioStreamIDCtorSignature.c_str(), jnivalue_audioStreamID, value_audioStreamID); - jobject value_streamType; - if (!cppValue.streamType.HasValue()) + jobject value_streamUsage; + if (!cppValue.streamUsage.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, value_streamType); + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_streamUsage); } else { - jobject value_streamTypeInsideOptional; - std::string value_streamTypeInsideOptionalClassName = "java/lang/Integer"; - std::string value_streamTypeInsideOptionalCtorSignature = "(I)V"; - jint jnivalue_streamTypeInsideOptional = static_cast(cppValue.streamType.Value()); + jobject value_streamUsageInsideOptional; + std::string value_streamUsageInsideOptionalClassName = "java/lang/Integer"; + std::string value_streamUsageInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_streamUsageInsideOptional = static_cast(cppValue.streamUsage.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - value_streamTypeInsideOptionalClassName.c_str(), value_streamTypeInsideOptionalCtorSignature.c_str(), - jnivalue_streamTypeInsideOptional, value_streamTypeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(value_streamTypeInsideOptional, value_streamType); + value_streamUsageInsideOptionalClassName.c_str(), value_streamUsageInsideOptionalCtorSignature.c_str(), + jnivalue_streamUsageInsideOptional, value_streamUsageInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_streamUsageInsideOptional, value_streamUsage); } jobject value_audioCodec; @@ -8857,7 +8857,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jobject value = - env->NewObject(audioStreamChangedStructClass, audioStreamChangedStructCtor, value_audioStreamID, value_streamType, + env->NewObject(audioStreamChangedStructClass, audioStreamChangedStructCtor, value_audioStreamID, value_streamUsage, value_audioCodec, value_channelCount, value_sampleRate, value_bitRate, value_bitDepth); return value; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 971bb232a097f3..253edc506414b9 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -12392,7 +12392,7 @@ class ChipClusters: "commandId": 0x00000000, "commandName": "AudioStreamAllocate", "args": { - "streamType": "int", + "streamUsage": "int", "audioCodec": "int", "channelCount": "int", "sampleRate": "int", @@ -12411,7 +12411,7 @@ class ChipClusters: "commandId": 0x00000003, "commandName": "VideoStreamAllocate", "args": { - "streamType": "int", + "streamUsage": "int", "videoCodec": "int", "minFrameRate": "int", "maxFrameRate": "int", @@ -12430,7 +12430,6 @@ class ChipClusters: "commandName": "VideoStreamModify", "args": { "videoStreamID": "int", - "resolution": "VideoResolutionStruct", "watermarkEnabled": "bool", "OSDEnabled": "bool", }, @@ -12782,7 +12781,7 @@ class ChipClusters: "commandId": 0x00000001, "commandName": "SolicitOffer", "args": { - "streamType": "int", + "streamUsage": "int", "videoStreamID": "int", "audioStreamID": "int", "ICEServers": "ICEServerStruct", @@ -12796,7 +12795,7 @@ class ChipClusters: "args": { "webRTCSessionID": "int", "sdp": "str", - "streamType": "int", + "streamUsage": "int", "videoStreamID": "int", "audioStreamID": "int", "ICEServers": "ICEServerStruct", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index b27196c7512fce..727610a72c3aeb 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -44794,7 +44794,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="allocatedVideoStreams", Tag=0x0000000F, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.VideoStreamStruct]]), ClusterObjectFieldDescriptor(Label="allocatedAudioStreams", Tag=0x00000010, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.AudioStreamStruct]]), ClusterObjectFieldDescriptor(Label="allocatedSnapshotStreams", Tag=0x00000011, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotStreamStruct]]), - ClusterObjectFieldDescriptor(Label="rankedVideoStreamPrioritiesList", Tag=0x00000012, Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]]), + ClusterObjectFieldDescriptor(Label="rankedVideoStreamPrioritiesList", Tag=0x00000012, Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamUsageEnum]]), ClusterObjectFieldDescriptor(Label="softRecordingPrivacyModeEnabled", Tag=0x00000013, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="softLivestreamPrivacyModeEnabled", Tag=0x00000014, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="hardPrivacyModeOn", Tag=0x00000015, Type=typing.Optional[bool]), @@ -44842,7 +44842,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: allocatedVideoStreams: typing.Optional[typing.List[CameraAvStreamManagement.Structs.VideoStreamStruct]] = None allocatedAudioStreams: typing.Optional[typing.List[CameraAvStreamManagement.Structs.AudioStreamStruct]] = None allocatedSnapshotStreams: typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotStreamStruct]] = None - rankedVideoStreamPrioritiesList: typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]] = None + rankedVideoStreamPrioritiesList: typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamUsageEnum]] = None softRecordingPrivacyModeEnabled: typing.Optional[bool] = None softLivestreamPrivacyModeEnabled: typing.Optional[bool] = None hardPrivacyModeOn: typing.Optional[bool] = None @@ -44889,7 +44889,7 @@ class ImageCodecEnum(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1 - class StreamTypeEnum(MatterIntEnum): + class StreamUsageEnum(MatterIntEnum): kInternal = 0x00 kRecording = 0x01 kAnalysis = 0x02 @@ -44964,7 +44964,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=1, Type=CameraAvStreamManagement.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="videoCodec", Tag=2, Type=CameraAvStreamManagement.Enums.VideoCodecEnum), ClusterObjectFieldDescriptor(Label="minFrameRate", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="maxFrameRate", Tag=4, Type=uint), @@ -44980,7 +44980,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) videoStreamID: 'uint' = 0 - streamType: 'CameraAvStreamManagement.Enums.StreamTypeEnum' = 0 + streamUsage: 'CameraAvStreamManagement.Enums.StreamUsageEnum' = 0 videoCodec: 'CameraAvStreamManagement.Enums.VideoCodecEnum' = 0 minFrameRate: 'uint' = 0 maxFrameRate: 'uint' = 0 @@ -45073,7 +45073,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=1, Type=CameraAvStreamManagement.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="audioCodec", Tag=2, Type=CameraAvStreamManagement.Enums.AudioCodecEnum), ClusterObjectFieldDescriptor(Label="channelCount", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="sampleRate", Tag=4, Type=uint), @@ -45083,7 +45083,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) audioStreamID: 'uint' = 0 - streamType: 'CameraAvStreamManagement.Enums.StreamTypeEnum' = 0 + streamUsage: 'CameraAvStreamManagement.Enums.StreamUsageEnum' = 0 audioCodec: 'CameraAvStreamManagement.Enums.AudioCodecEnum' = 0 channelCount: 'uint' = 0 sampleRate: 'uint' = 0 @@ -45139,7 +45139,7 @@ class AudioStreamAllocate(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=0, Type=CameraAvStreamManagement.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="audioCodec", Tag=1, Type=CameraAvStreamManagement.Enums.AudioCodecEnum), ClusterObjectFieldDescriptor(Label="channelCount", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="sampleRate", Tag=3, Type=uint), @@ -45147,7 +45147,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="bitDepth", Tag=5, Type=uint), ]) - streamType: CameraAvStreamManagement.Enums.StreamTypeEnum = 0 + streamUsage: CameraAvStreamManagement.Enums.StreamUsageEnum = 0 audioCodec: CameraAvStreamManagement.Enums.AudioCodecEnum = 0 channelCount: uint = 0 sampleRate: uint = 0 @@ -45197,7 +45197,7 @@ class VideoStreamAllocate(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=0, Type=CameraAvStreamManagement.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="videoCodec", Tag=1, Type=CameraAvStreamManagement.Enums.VideoCodecEnum), ClusterObjectFieldDescriptor(Label="minFrameRate", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="maxFrameRate", Tag=3, Type=uint), @@ -45211,7 +45211,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="OSDEnabled", Tag=11, Type=typing.Optional[bool]), ]) - streamType: CameraAvStreamManagement.Enums.StreamTypeEnum = 0 + streamUsage: CameraAvStreamManagement.Enums.StreamUsageEnum = 0 videoCodec: CameraAvStreamManagement.Enums.VideoCodecEnum = 0 minFrameRate: uint = 0 maxFrameRate: uint = 0 @@ -45252,13 +45252,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="resolution", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), - ClusterObjectFieldDescriptor(Label="watermarkEnabled", Tag=2, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="OSDEnabled", Tag=3, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="watermarkEnabled", Tag=1, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="OSDEnabled", Tag=2, Type=typing.Optional[bool]), ]) videoStreamID: uint = 0 - resolution: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None watermarkEnabled: typing.Optional[bool] = None OSDEnabled: typing.Optional[bool] = None @@ -45347,17 +45345,17 @@ class SetStreamPriorities(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="streamPriorities", Tag=0, Type=typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]), + ClusterObjectFieldDescriptor(Label="streamPriorities", Tag=0, Type=typing.List[CameraAvStreamManagement.Enums.StreamUsageEnum]), ]) - streamPriorities: typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum] = field(default_factory=lambda: []) + streamPriorities: typing.List[CameraAvStreamManagement.Enums.StreamUsageEnum] = field(default_factory=lambda: []) @dataclass class CaptureSnapshot(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000551 command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[typing.Optional[str]] = None + response_type: typing.ClassVar[str] = 'CaptureSnapshotResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -45691,9 +45689,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamUsageEnum]]) - value: typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]] = None + value: typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamUsageEnum]] = None @dataclass class SoftRecordingPrivacyModeEnabled(ClusterAttributeDescriptor): @@ -46143,7 +46141,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum]), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Enums.StreamUsageEnum]), ClusterObjectFieldDescriptor(Label="videoCodec", Tag=2, Type=typing.Optional[CameraAvStreamManagement.Enums.VideoCodecEnum]), ClusterObjectFieldDescriptor(Label="minFrameRate", Tag=3, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="maxFrameRate", Tag=4, Type=typing.Optional[uint]), @@ -46156,7 +46154,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) videoStreamID: uint = 0 - streamType: typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum] = None + streamUsage: typing.Optional[CameraAvStreamManagement.Enums.StreamUsageEnum] = None videoCodec: typing.Optional[CameraAvStreamManagement.Enums.VideoCodecEnum] = None minFrameRate: typing.Optional[uint] = None maxFrameRate: typing.Optional[uint] = None @@ -46182,7 +46180,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum]), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Enums.StreamUsageEnum]), ClusterObjectFieldDescriptor(Label="audioCodec", Tag=2, Type=typing.Optional[CameraAvStreamManagement.Enums.AudioCodecEnum]), ClusterObjectFieldDescriptor(Label="channelCount", Tag=3, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="sampleRate", Tag=4, Type=typing.Optional[uint]), @@ -46191,7 +46189,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) audioStreamID: uint = 0 - streamType: typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum] = None + streamUsage: typing.Optional[CameraAvStreamManagement.Enums.StreamUsageEnum] = None audioCodec: typing.Optional[CameraAvStreamManagement.Enums.AudioCodecEnum] = None channelCount: typing.Optional[uint] = None sampleRate: typing.Optional[uint] = None @@ -46254,7 +46252,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: uint = 0 class Enums: - class StreamTypeEnum(MatterIntEnum): + class StreamUsageEnum(MatterIntEnum): kInternal = 0x00 kRecording = 0x01 kAnalysis = 0x02 @@ -46315,7 +46313,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="peerNodeID", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="peerFabricIndex", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="streamType", Tag=4, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=4, Type=WebRTCTransportProvider.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=5, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=6, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=uint), @@ -46324,7 +46322,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: id: 'uint' = 0 peerNodeID: 'uint' = 0 peerFabricIndex: 'uint' = 0 - streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0 + streamUsage: 'WebRTCTransportProvider.Enums.StreamUsageEnum' = 0 videoStreamID: 'typing.Union[Nullable, uint]' = NullValue audioStreamID: 'typing.Union[Nullable, uint]' = NullValue metadataOptions: 'uint' = 0 @@ -46341,7 +46339,7 @@ class SolicitOffer(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=0, Type=WebRTCTransportProvider.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=1, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=2, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="ICEServers", Tag=3, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]), @@ -46349,7 +46347,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=5, Type=typing.Optional[uint]), ]) - streamType: WebRTCTransportProvider.Enums.StreamTypeEnum = 0 + streamUsage: WebRTCTransportProvider.Enums.StreamUsageEnum = 0 videoStreamID: typing.Union[None, Nullable, uint] = None audioStreamID: typing.Union[None, Nullable, uint] = None ICEServers: typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]] = None @@ -46391,7 +46389,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="streamType", Tag=2, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=2, Type=WebRTCTransportProvider.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=3, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=4, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="ICEServers", Tag=5, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]), @@ -46401,7 +46399,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: webRTCSessionID: typing.Union[Nullable, uint] = NullValue sdp: str = "" - streamType: WebRTCTransportProvider.Enums.StreamTypeEnum = 0 + streamUsage: WebRTCTransportProvider.Enums.StreamUsageEnum = 0 videoStreamID: typing.Union[None, Nullable, uint] = None audioStreamID: typing.Union[None, Nullable, uint] = None ICEServers: typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]] = None @@ -46604,7 +46602,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: uint = 0 class Enums: - class StreamTypeEnum(MatterIntEnum): + class StreamUsageEnum(MatterIntEnum): kInternal = 0x00 kRecording = 0x01 kAnalysis = 0x02 @@ -46665,7 +46663,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="peerNodeID", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="peerFabricIndex", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="streamType", Tag=4, Type=WebRTCTransportRequestor.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="streamUsage", Tag=4, Type=WebRTCTransportRequestor.Enums.StreamUsageEnum), ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=5, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=6, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=uint), @@ -46674,7 +46672,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: id: 'uint' = 0 peerNodeID: 'uint' = 0 peerFabricIndex: 'uint' = 0 - streamType: 'WebRTCTransportRequestor.Enums.StreamTypeEnum' = 0 + streamUsage: 'WebRTCTransportRequestor.Enums.StreamUsageEnum' = 0 videoStreamID: 'typing.Union[Nullable, uint]' = NullValue audioStreamID: 'typing.Union[Nullable, uint]' = NullValue metadataOptions: 'uint' = 0 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index cd2f99abca1e03..7d0e323174b64f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -17132,7 +17132,7 @@ static id _Nullable DecodeAttributeValueForCameraAVStreamManagementCluster(Attri MTRCameraAVStreamManagementClusterVideoStreamStruct * newElement_0; newElement_0 = [MTRCameraAVStreamManagementClusterVideoStreamStruct new]; newElement_0.videoStreamID = [NSNumber numberWithUnsignedShort:entry_0.videoStreamID]; - newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + newElement_0.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamUsage)]; newElement_0.videoCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.videoCodec)]; newElement_0.minFrameRate = [NSNumber numberWithUnsignedShort:entry_0.minFrameRate]; newElement_0.maxFrameRate = [NSNumber numberWithUnsignedShort:entry_0.maxFrameRate]; @@ -17184,7 +17184,7 @@ static id _Nullable DecodeAttributeValueForCameraAVStreamManagementCluster(Attri MTRCameraAVStreamManagementClusterAudioStreamStruct * newElement_0; newElement_0 = [MTRCameraAVStreamManagementClusterAudioStreamStruct new]; newElement_0.audioStreamID = [NSNumber numberWithUnsignedShort:entry_0.audioStreamID]; - newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + newElement_0.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamUsage)]; newElement_0.audioCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.audioCodec)]; newElement_0.channelCount = [NSNumber numberWithUnsignedChar:entry_0.channelCount]; newElement_0.sampleRate = [NSNumber numberWithUnsignedInt:entry_0.sampleRate]; @@ -17542,7 +17542,7 @@ static id _Nullable DecodeAttributeValueForWebRTCTransportProviderCluster(Attrib newElement_0.id = [NSNumber numberWithUnsignedShort:entry_0.id]; newElement_0.peerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.peerNodeID]; newElement_0.peerFabricIndex = [NSNumber numberWithUnsignedChar:entry_0.peerFabricIndex]; - newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + newElement_0.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamUsage)]; if (entry_0.videoStreamID.IsNull()) { newElement_0.videoStreamID = nil; } else { @@ -17595,7 +17595,7 @@ static id _Nullable DecodeAttributeValueForWebRTCTransportRequestorCluster(Attri newElement_0.id = [NSNumber numberWithUnsignedShort:entry_0.id]; newElement_0.peerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.peerNodeID]; newElement_0.peerFabricIndex = [NSNumber numberWithUnsignedChar:entry_0.peerFabricIndex]; - newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + newElement_0.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamUsage)]; if (entry_0.videoStreamID.IsNull()) { newElement_0.videoStreamID = nil; } else { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 78e455cf210aa6..0b3222cb70dce9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -14110,7 +14110,7 @@ MTR_PROVISIONALLY_AVAILABLE /** * Command SetStreamPriorities * - * This command SHALL set the relative priorities of the various stream types on the camera. + * This command SHALL set the relative priorities of the various stream usages on the camera. */ - (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; /** @@ -14118,7 +14118,7 @@ MTR_PROVISIONALLY_AVAILABLE * * This command SHALL return a Snapshot from the camera. */ -- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeMaxConcurrentVideoEncodersWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeMaxConcurrentVideoEncodersWithParams:(MTRSubscribeParams *)params @@ -19988,11 +19988,11 @@ typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementImageCodec) { MTRCameraAVStreamManagementImageCodecJPEG MTR_PROVISIONALLY_AVAILABLE = 0x00, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementStreamType) { - MTRCameraAVStreamManagementStreamTypeInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRCameraAVStreamManagementStreamTypeRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRCameraAVStreamManagementStreamTypeAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRCameraAVStreamManagementStreamTypeLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementStreamUsage) { + MTRCameraAVStreamManagementStreamUsageInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRCameraAVStreamManagementStreamUsageRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRCameraAVStreamManagementStreamUsageAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRCameraAVStreamManagementStreamUsageLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementTriStateAuto) { @@ -20026,11 +20026,11 @@ typedef NS_OPTIONS(uint32_t, MTRCameraAVStreamManagementFeature) { MTRCameraAVStreamManagementFeatureLocalStorage MTR_PROVISIONALLY_AVAILABLE = 0x100, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWebRTCTransportProviderStreamType) { - MTRWebRTCTransportProviderStreamTypeInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRWebRTCTransportProviderStreamTypeRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRWebRTCTransportProviderStreamTypeAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRWebRTCTransportProviderStreamTypeLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_ENUM(uint8_t, MTRWebRTCTransportProviderStreamUsage) { + MTRWebRTCTransportProviderStreamUsageInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRWebRTCTransportProviderStreamUsageRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRWebRTCTransportProviderStreamUsageAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRWebRTCTransportProviderStreamUsageLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRWebRTCTransportProviderWebRTCEndReason) { @@ -20052,11 +20052,11 @@ typedef NS_OPTIONS(uint8_t, MTRWebRTCTransportProviderWebRTCMetadataOptions) { MTRWebRTCTransportProviderWebRTCMetadataOptionsDataTLV MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWebRTCTransportRequestorStreamType) { - MTRWebRTCTransportRequestorStreamTypeInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRWebRTCTransportRequestorStreamTypeRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRWebRTCTransportRequestorStreamTypeAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRWebRTCTransportRequestorStreamTypeLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_ENUM(uint8_t, MTRWebRTCTransportRequestorStreamUsage) { + MTRWebRTCTransportRequestorStreamUsageInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRWebRTCTransportRequestorStreamUsageRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRWebRTCTransportRequestorStreamUsageAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRWebRTCTransportRequestorStreamUsageLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRWebRTCTransportRequestorWebRTCEndReason) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index bddf4c4de023ef..67641bfe64d0a8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -97715,7 +97715,7 @@ - (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStre queue:self.callbackQueue completion:responseHandler]; } -- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params completion:(MTRStatusCompletion)completion +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRCameraAVStreamManagementClusterCaptureSnapshotParams @@ -97723,7 +97723,7 @@ - (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnap } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -97735,7 +97735,7 @@ - (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnap commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams.class queue:self.callbackQueue completion:responseHandler]; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 6056a0f4718e60..7ed71648699866 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -6604,7 +6604,7 @@ MTR_PROVISIONALLY_AVAILABLE - (void)snapshotStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)snapshotStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeMaxConcurrentVideoEncodersWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f19bcdd2b23836..f5e926500a54d0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -19099,7 +19099,7 @@ - (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStre completion:responseHandler]; } -- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRCameraAVStreamManagementClusterCaptureSnapshotParams @@ -19107,7 +19107,7 @@ - (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnap } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -19121,7 +19121,7 @@ - (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnap expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams.class queue:self.callbackQueue completion:responseHandler]; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index c3297d058d03ba..3a85b9e455f115 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -10942,7 +10942,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCameraAVStreamManagementClusterAudioStreamAllocateParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull audioCodec MTR_PROVISIONALLY_AVAILABLE; @@ -11031,7 +11031,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCameraAVStreamManagementClusterVideoStreamAllocateParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull videoCodec MTR_PROVISIONALLY_AVAILABLE; @@ -11104,8 +11104,6 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable resolution MTR_PROVISIONALLY_AVAILABLE; - @property (nonatomic, copy) NSNumber * _Nullable watermarkEnabled MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable osdEnabled MTR_PROVISIONALLY_AVAILABLE; @@ -11342,7 +11340,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRWebRTCTransportProviderClusterSolicitOfferParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable videoStreamID MTR_PROVISIONALLY_AVAILABLE; @@ -11411,7 +11409,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSString * _Nonnull sdp MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable videoStreamID MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 3c060416f06723..e6146942f58257 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -31816,7 +31816,7 @@ - (instancetype)init { if (self = [super init]) { - _streamType = @(0); + _streamUsage = @(0); _audioCodec = @(0); @@ -31837,7 +31837,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRCameraAVStreamManagementClusterAudioStreamAllocateParams alloc] init]; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.audioCodec = self.audioCodec; other.channelCount = self.channelCount; other.sampleRate = self.sampleRate; @@ -31851,7 +31851,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamType:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; >", NSStringFromClass([self class]), _streamType, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamUsage:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; >", NSStringFromClass([self class]), _streamUsage, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth]; return descriptionString; } @@ -31864,7 +31864,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::CameraAvStreamManagement::Commands::AudioStreamAllocate::Type encodableStruct; ListFreer listFreer; { - encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); + encodableStruct.streamUsage = static_cast>(self.streamUsage.unsignedCharValue); } { encodableStruct.audioCodec = static_cast>(self.audioCodec.unsignedCharValue); @@ -32083,7 +32083,7 @@ - (instancetype)init { if (self = [super init]) { - _streamType = @(0); + _streamUsage = @(0); _videoCodec = @(0); @@ -32116,7 +32116,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRCameraAVStreamManagementClusterVideoStreamAllocateParams alloc] init]; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.videoCodec = self.videoCodec; other.minFrameRate = self.minFrameRate; other.maxFrameRate = self.maxFrameRate; @@ -32136,7 +32136,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamType:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; watermarkEnabled:%@; osdEnabled:%@; >", NSStringFromClass([self class]), _streamType, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen, _watermarkEnabled, _osdEnabled]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamUsage:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; watermarkEnabled:%@; osdEnabled:%@; >", NSStringFromClass([self class]), _streamUsage, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen, _watermarkEnabled, _osdEnabled]; return descriptionString; } @@ -32149,7 +32149,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamAllocate::Type encodableStruct; ListFreer listFreer; { - encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); + encodableStruct.streamUsage = static_cast>(self.streamUsage.unsignedCharValue); } { encodableStruct.videoCodec = static_cast>(self.videoCodec.unsignedCharValue); @@ -32317,8 +32317,6 @@ - (instancetype)init _videoStreamID = @(0); - _resolution = nil; - _watermarkEnabled = nil; _osdEnabled = nil; @@ -32333,7 +32331,6 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRCameraAVStreamManagementClusterVideoStreamModifyParams alloc] init]; other.videoStreamID = self.videoStreamID; - other.resolution = self.resolution; other.watermarkEnabled = self.watermarkEnabled; other.osdEnabled = self.osdEnabled; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -32344,7 +32341,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; resolution:%@; watermarkEnabled:%@; osdEnabled:%@; >", NSStringFromClass([self class]), _videoStreamID, _resolution, _watermarkEnabled, _osdEnabled]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; watermarkEnabled:%@; osdEnabled:%@; >", NSStringFromClass([self class]), _videoStreamID, _watermarkEnabled, _osdEnabled]; return descriptionString; } @@ -32359,13 +32356,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { encodableStruct.videoStreamID = self.videoStreamID.unsignedShortValue; } - { - if (self.resolution != nil) { - auto & definedValue_0 = encodableStruct.resolution.Emplace(); - definedValue_0.width = self.resolution.width.unsignedShortValue; - definedValue_0.height = self.resolution.height.unsignedShortValue; - } - } { if (self.watermarkEnabled != nil) { auto & definedValue_0 = encodableStruct.watermarkEnabled.Emplace(); @@ -33050,7 +33040,7 @@ - (instancetype)init { if (self = [super init]) { - _streamType = @(0); + _streamUsage = @(0); _videoStreamID = nil; @@ -33071,7 +33061,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRWebRTCTransportProviderClusterSolicitOfferParams alloc] init]; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.videoStreamID = self.videoStreamID; other.audioStreamID = self.audioStreamID; other.iceServers = self.iceServers; @@ -33085,7 +33075,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamType:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _streamType, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamUsage:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _streamUsage, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; return descriptionString; } @@ -33098,7 +33088,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::WebRTCTransportProvider::Commands::SolicitOffer::Type encodableStruct; ListFreer listFreer; { - encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); + encodableStruct.streamUsage = static_cast>(self.streamUsage.unsignedCharValue); } { if (self.videoStreamID != nil) { @@ -33357,7 +33347,7 @@ - (instancetype)init _sdp = @""; - _streamType = @(0); + _streamUsage = @(0); _videoStreamID = nil; @@ -33380,7 +33370,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.webRTCSessionID = self.webRTCSessionID; other.sdp = self.sdp; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.videoStreamID = self.videoStreamID; other.audioStreamID = self.audioStreamID; other.iceServers = self.iceServers; @@ -33394,7 +33384,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; sdp:%@; streamType:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _sdp, _streamType, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; sdp:%@; streamUsage:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _sdp, _streamUsage, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; return descriptionString; } @@ -33418,7 +33408,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.sdp = AsCharSpan(self.sdp); } { - encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); + encodableStruct.streamUsage = static_cast>(self.streamUsage.unsignedCharValue); } { if (self.videoStreamID != nil) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 0a04add54fd1d3..797ffcbe7a1b1d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -4649,12 +4649,12 @@ static id _Nullable DecodeEventPayloadForCameraAVStreamManagementCluster(EventId } while (0); do { NSNumber * _Nullable memberValue; - if (cppValue.streamType.HasValue()) { - memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.streamType.Value())]; + if (cppValue.streamUsage.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.streamUsage.Value())]; } else { memberValue = nil; } - value.streamType = memberValue; + value.streamUsage = memberValue; } while (0); do { NSNumber * _Nullable memberValue; @@ -4760,12 +4760,12 @@ static id _Nullable DecodeEventPayloadForCameraAVStreamManagementCluster(EventId } while (0); do { NSNumber * _Nullable memberValue; - if (cppValue.streamType.HasValue()) { - memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.streamType.Value())]; + if (cppValue.streamUsage.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.streamUsage.Value())]; } else { memberValue = nil; } - value.streamType = memberValue; + value.streamUsage = memberValue; } while (0); do { NSNumber * _Nullable memberValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 9a4fe7168afb6e..c2bb0804fb7237 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -2168,7 +2168,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCameraAVStreamManagementClusterVideoStreamStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull videoCodec MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull minFrameRate MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull maxFrameRate MTR_PROVISIONALLY_AVAILABLE; @@ -2220,7 +2220,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCameraAVStreamManagementClusterAudioStreamStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull audioStreamID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull audioCodec MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull channelCount MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull sampleRate MTR_PROVISIONALLY_AVAILABLE; @@ -2249,7 +2249,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCameraAVStreamManagementClusterVideoStreamChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable videoCodec MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable minFrameRate MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable maxFrameRate MTR_PROVISIONALLY_AVAILABLE; @@ -2264,7 +2264,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCameraAVStreamManagementClusterAudioStreamChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull audioStreamID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable audioCodec MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable channelCount MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable sampleRate MTR_PROVISIONALLY_AVAILABLE; @@ -2296,7 +2296,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull id MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull peerNodeID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull peerFabricIndex MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable videoStreamID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable audioStreamID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull metadataOptions MTR_PROVISIONALLY_AVAILABLE; @@ -2315,7 +2315,7 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull id MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull peerNodeID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull peerFabricIndex MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamUsage MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable videoStreamID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable audioStreamID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull metadataOptions MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index ddc22861202fc1..fb99592f46b3c5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -9003,7 +9003,7 @@ - (instancetype)init _videoStreamID = @(0); - _streamType = @(0); + _streamUsage = @(0); _videoCodec = @(0); @@ -9037,7 +9037,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRCameraAVStreamManagementClusterVideoStreamStruct alloc] init]; other.videoStreamID = self.videoStreamID; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.videoCodec = self.videoCodec; other.minFrameRate = self.minFrameRate; other.maxFrameRate = self.maxFrameRate; @@ -9056,7 +9056,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; streamType:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; watermarkEnabled:%@; osdEnabled:%@; referenceCount:%@; >", NSStringFromClass([self class]), _videoStreamID, _streamType, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen, _watermarkEnabled, _osdEnabled, _referenceCount]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; streamUsage:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; watermarkEnabled:%@; osdEnabled:%@; referenceCount:%@; >", NSStringFromClass([self class]), _videoStreamID, _streamUsage, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen, _watermarkEnabled, _osdEnabled, _referenceCount]; return descriptionString; } @@ -9219,7 +9219,7 @@ - (instancetype)init _audioStreamID = @(0); - _streamType = @(0); + _streamUsage = @(0); _audioCodec = @(0); @@ -9241,7 +9241,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRCameraAVStreamManagementClusterAudioStreamStruct alloc] init]; other.audioStreamID = self.audioStreamID; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.audioCodec = self.audioCodec; other.channelCount = self.channelCount; other.sampleRate = self.sampleRate; @@ -9254,7 +9254,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; streamType:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; referenceCount:%@; >", NSStringFromClass([self class]), _audioStreamID, _streamType, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth, _referenceCount]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; streamUsage:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; referenceCount:%@; >", NSStringFromClass([self class]), _audioStreamID, _streamUsage, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth, _referenceCount]; return descriptionString; } @@ -9342,7 +9342,7 @@ - (instancetype)init _videoStreamID = @(0); - _streamType = nil; + _streamUsage = nil; _videoCodec = nil; @@ -9370,7 +9370,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRCameraAVStreamManagementClusterVideoStreamChangedEvent alloc] init]; other.videoStreamID = self.videoStreamID; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.videoCodec = self.videoCodec; other.minFrameRate = self.minFrameRate; other.maxFrameRate = self.maxFrameRate; @@ -9386,7 +9386,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; streamType:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; >", NSStringFromClass([self class]), _videoStreamID, _streamType, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; streamUsage:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; >", NSStringFromClass([self class]), _videoStreamID, _streamUsage, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen]; return descriptionString; } @@ -9399,7 +9399,7 @@ - (instancetype)init _audioStreamID = @(0); - _streamType = nil; + _streamUsage = nil; _audioCodec = nil; @@ -9419,7 +9419,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRCameraAVStreamManagementClusterAudioStreamChangedEvent alloc] init]; other.audioStreamID = self.audioStreamID; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.audioCodec = self.audioCodec; other.channelCount = self.channelCount; other.sampleRate = self.sampleRate; @@ -9431,7 +9431,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; streamType:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; >", NSStringFromClass([self class]), _audioStreamID, _streamType, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; streamUsage:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; >", NSStringFromClass([self class]), _audioStreamID, _streamUsage, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth]; return descriptionString; } @@ -9529,7 +9529,7 @@ - (instancetype)init _peerFabricIndex = @(0); - _streamType = @(0); + _streamUsage = @(0); _videoStreamID = nil; @@ -9547,7 +9547,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.id = self.id; other.peerNodeID = self.peerNodeID; other.peerFabricIndex = self.peerFabricIndex; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.videoStreamID = self.videoStreamID; other.audioStreamID = self.audioStreamID; other.metadataOptions = self.metadataOptions; @@ -9557,7 +9557,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: id:%@; peerNodeID:%@; peerFabricIndex:%@; streamType:%@; videoStreamID:%@; audioStreamID:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _id, _peerNodeID, _peerFabricIndex, _streamType, _videoStreamID, _audioStreamID, _metadataOptions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: id:%@; peerNodeID:%@; peerFabricIndex:%@; streamUsage:%@; videoStreamID:%@; audioStreamID:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _id, _peerNodeID, _peerFabricIndex, _streamUsage, _videoStreamID, _audioStreamID, _metadataOptions]; return descriptionString; } @@ -9610,7 +9610,7 @@ - (instancetype)init _peerFabricIndex = @(0); - _streamType = @(0); + _streamUsage = @(0); _videoStreamID = nil; @@ -9628,7 +9628,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.id = self.id; other.peerNodeID = self.peerNodeID; other.peerFabricIndex = self.peerFabricIndex; - other.streamType = self.streamType; + other.streamUsage = self.streamUsage; other.videoStreamID = self.videoStreamID; other.audioStreamID = self.audioStreamID; other.metadataOptions = self.metadataOptions; @@ -9638,7 +9638,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: id:%@; peerNodeID:%@; peerFabricIndex:%@; streamType:%@; videoStreamID:%@; audioStreamID:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _id, _peerNodeID, _peerFabricIndex, _streamType, _videoStreamID, _audioStreamID, _metadataOptions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: id:%@; peerNodeID:%@; peerFabricIndex:%@; streamUsage:%@; videoStreamID:%@; audioStreamID:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _id, _peerNodeID, _peerFabricIndex, _streamUsage, _videoStreamID, _audioStreamID, _metadataOptions]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index f877d63b7feeb6..5d991f47163b6a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -388,9 +388,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::RelativePositi } } -static auto __attribute__((unused)) EnsureKnownEnumValue(detail::StreamTypeEnum val) +static auto __attribute__((unused)) EnsureKnownEnumValue(detail::StreamUsageEnum val) { - using EnumType = detail::StreamTypeEnum; + using EnumType = detail::StreamUsageEnum; switch (val) { case EnumType::kInternal: diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index aae67302e404a0..9d20b7e2d4bae7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -139,8 +139,8 @@ enum class ProductIdentifierTypeEnum : uint8_t kUnknownEnumValue = 5, }; -// Enum for StreamTypeEnum -enum class StreamTypeEnum : uint8_t +// Enum for StreamUsageEnum +enum class StreamUsageEnum : uint8_t { kInternal = 0x00, kRecording = 0x01, @@ -5555,7 +5555,7 @@ enum class ImageCodecEnum : uint8_t kUnknownEnumValue = 1, }; -using StreamTypeEnum = Clusters::detail::StreamTypeEnum; +using StreamUsageEnum = Clusters::detail::StreamUsageEnum; // Enum for TriStateAutoEnum enum class TriStateAutoEnum : uint8_t @@ -5614,7 +5614,7 @@ enum class Feature : uint32_t namespace WebRTCTransportProvider { -using StreamTypeEnum = Clusters::detail::StreamTypeEnum; +using StreamUsageEnum = Clusters::detail::StreamUsageEnum; using WebRTCEndReasonEnum = Clusters::detail::WebRTCEndReasonEnum; @@ -5623,7 +5623,7 @@ using WebRTCMetadataOptions = Clusters::detail::WebRTCMetadataOptions; namespace WebRTCTransportRequestor { -using StreamTypeEnum = Clusters::detail::StreamTypeEnum; +using StreamUsageEnum = Clusters::detail::StreamUsageEnum; using WebRTCEndReasonEnum = Clusters::detail::WebRTCEndReasonEnum; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 4879ae5213c65d..edd93fb1fd0ede 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -613,7 +613,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const encoder.Encode(to_underlying(Fields::kId), id); encoder.Encode(to_underlying(Fields::kPeerNodeID), peerNodeID); encoder.Encode(to_underlying(Fields::kPeerFabricIndex), peerFabricIndex); - encoder.Encode(to_underlying(Fields::kStreamType), streamType); + encoder.Encode(to_underlying(Fields::kStreamUsage), streamUsage); encoder.Encode(to_underlying(Fields::kVideoStreamID), videoStreamID); encoder.Encode(to_underlying(Fields::kAudioStreamID), audioStreamID); encoder.Encode(to_underlying(Fields::kMetadataOptions), metadataOptions); @@ -646,9 +646,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, peerFabricIndex); } - else if (__context_tag == to_underlying(Fields::kStreamType)) + else if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kVideoStreamID)) { @@ -28972,7 +28972,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kVideoStreamID), videoStreamID); - encoder.Encode(to_underlying(Fields::kStreamType), streamType); + encoder.Encode(to_underlying(Fields::kStreamUsage), streamUsage); encoder.Encode(to_underlying(Fields::kVideoCodec), videoCodec); encoder.Encode(to_underlying(Fields::kMinFrameRate), minFrameRate); encoder.Encode(to_underlying(Fields::kMaxFrameRate), maxFrameRate); @@ -29006,9 +29006,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, videoStreamID); } - else if (__context_tag == to_underlying(Fields::kStreamType)) + else if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kVideoCodec)) { @@ -29287,7 +29287,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kAudioStreamID), audioStreamID); - encoder.Encode(to_underlying(Fields::kStreamType), streamType); + encoder.Encode(to_underlying(Fields::kStreamUsage), streamUsage); encoder.Encode(to_underlying(Fields::kAudioCodec), audioCodec); encoder.Encode(to_underlying(Fields::kChannelCount), channelCount); encoder.Encode(to_underlying(Fields::kSampleRate), sampleRate); @@ -29315,9 +29315,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, audioStreamID); } - else if (__context_tag == to_underlying(Fields::kStreamType)) + else if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kAudioCodec)) { @@ -29415,7 +29415,7 @@ namespace AudioStreamAllocate { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStreamType), streamType); + encoder.Encode(to_underlying(Fields::kStreamUsage), streamUsage); encoder.Encode(to_underlying(Fields::kAudioCodec), audioCodec); encoder.Encode(to_underlying(Fields::kChannelCount), channelCount); encoder.Encode(to_underlying(Fields::kSampleRate), sampleRate); @@ -29438,9 +29438,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStreamType)) + if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kAudioCodec)) { @@ -29542,7 +29542,7 @@ namespace VideoStreamAllocate { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStreamType), streamType); + encoder.Encode(to_underlying(Fields::kStreamUsage), streamUsage); encoder.Encode(to_underlying(Fields::kVideoCodec), videoCodec); encoder.Encode(to_underlying(Fields::kMinFrameRate), minFrameRate); encoder.Encode(to_underlying(Fields::kMaxFrameRate), maxFrameRate); @@ -29571,9 +29571,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStreamType)) + if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kVideoCodec)) { @@ -29666,7 +29666,6 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kVideoStreamID), videoStreamID); - encoder.Encode(to_underlying(Fields::kResolution), resolution); encoder.Encode(to_underlying(Fields::kWatermarkEnabled), watermarkEnabled); encoder.Encode(to_underlying(Fields::kOSDEnabled), OSDEnabled); return encoder.Finalize(); @@ -29690,10 +29689,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, videoStreamID); } - else if (__context_tag == to_underlying(Fields::kResolution)) - { - err = DataModel::Decode(reader, resolution); - } else if (__context_tag == to_underlying(Fields::kWatermarkEnabled)) { err = DataModel::Decode(reader, watermarkEnabled); @@ -30100,7 +30095,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kVideoStreamID), videoStreamID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStreamType), streamType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStreamUsage), streamUsage)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kVideoCodec), videoCodec)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMinFrameRate), minFrameRate)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMaxFrameRate), maxFrameRate)); @@ -30131,9 +30126,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, videoStreamID); } - else if (__context_tag == to_underlying(Fields::kStreamType)) + else if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kVideoCodec)) { @@ -30185,7 +30180,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAudioStreamID), audioStreamID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStreamType), streamType)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStreamUsage), streamUsage)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAudioCodec), audioCodec)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kChannelCount), channelCount)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSampleRate), sampleRate)); @@ -30212,9 +30207,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, audioStreamID); } - else if (__context_tag == to_underlying(Fields::kStreamType)) + else if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kAudioCodec)) { @@ -30320,7 +30315,7 @@ namespace SolicitOffer { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStreamType), streamType); + encoder.Encode(to_underlying(Fields::kStreamUsage), streamUsage); encoder.Encode(to_underlying(Fields::kVideoStreamID), videoStreamID); encoder.Encode(to_underlying(Fields::kAudioStreamID), audioStreamID); encoder.Encode(to_underlying(Fields::kICEServers), ICEServers); @@ -30343,9 +30338,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStreamType)) + if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kVideoStreamID)) { @@ -30430,7 +30425,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kWebRTCSessionID), webRTCSessionID); encoder.Encode(to_underlying(Fields::kSdp), sdp); - encoder.Encode(to_underlying(Fields::kStreamType), streamType); + encoder.Encode(to_underlying(Fields::kStreamUsage), streamUsage); encoder.Encode(to_underlying(Fields::kVideoStreamID), videoStreamID); encoder.Encode(to_underlying(Fields::kAudioStreamID), audioStreamID); encoder.Encode(to_underlying(Fields::kICEServers), ICEServers); @@ -30461,9 +30456,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, sdp); } - else if (__context_tag == to_underlying(Fields::kStreamType)) + else if (__context_tag == to_underlying(Fields::kStreamUsage)) { - err = DataModel::Decode(reader, streamType); + err = DataModel::Decode(reader, streamUsage); } else if (__context_tag == to_underlying(Fields::kVideoStreamID)) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 2357a87dd9d9fa..d83f7dd3469508 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -359,7 +359,7 @@ enum class Fields : uint8_t kId = 1, kPeerNodeID = 2, kPeerFabricIndex = 3, - kStreamType = 4, + kStreamUsage = 4, kVideoStreamID = 5, kAudioStreamID = 6, kMetadataOptions = 7, @@ -371,7 +371,7 @@ struct Type uint16_t id = static_cast(0); chip::NodeId peerNodeID = static_cast(0); chip::FabricIndex peerFabricIndex = static_cast(0); - StreamTypeEnum streamType = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); DataModel::Nullable videoStreamID; DataModel::Nullable audioStreamID; chip::BitMask metadataOptions = static_cast>(0); @@ -40955,7 +40955,7 @@ namespace VideoStreamStruct { enum class Fields : uint8_t { kVideoStreamID = 0, - kStreamType = 1, + kStreamUsage = 1, kVideoCodec = 2, kMinFrameRate = 3, kMaxFrameRate = 4, @@ -40973,11 +40973,11 @@ enum class Fields : uint8_t struct Type { public: - uint16_t videoStreamID = static_cast(0); - StreamTypeEnum streamType = static_cast(0); - VideoCodecEnum videoCodec = static_cast(0); - uint16_t minFrameRate = static_cast(0); - uint16_t maxFrameRate = static_cast(0); + uint16_t videoStreamID = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); + VideoCodecEnum videoCodec = static_cast(0); + uint16_t minFrameRate = static_cast(0); + uint16_t maxFrameRate = static_cast(0); Structs::VideoResolutionStruct::Type minResolution; Structs::VideoResolutionStruct::Type maxResolution; uint32_t minBitRate = static_cast(0); @@ -41123,7 +41123,7 @@ namespace AudioStreamStruct { enum class Fields : uint8_t { kAudioStreamID = 0, - kStreamType = 1, + kStreamUsage = 1, kAudioCodec = 2, kChannelCount = 3, kSampleRate = 4, @@ -41135,14 +41135,14 @@ enum class Fields : uint8_t struct Type { public: - uint16_t audioStreamID = static_cast(0); - StreamTypeEnum streamType = static_cast(0); - AudioCodecEnum audioCodec = static_cast(0); - uint8_t channelCount = static_cast(0); - uint32_t sampleRate = static_cast(0); - uint32_t bitRate = static_cast(0); - uint8_t bitDepth = static_cast(0); - uint8_t referenceCount = static_cast(0); + uint16_t audioStreamID = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); + AudioCodecEnum audioCodec = static_cast(0); + uint8_t channelCount = static_cast(0); + uint32_t sampleRate = static_cast(0); + uint32_t bitRate = static_cast(0); + uint8_t bitDepth = static_cast(0); + uint8_t referenceCount = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -41260,7 +41260,7 @@ namespace Commands { namespace AudioStreamAllocate { enum class Fields : uint8_t { - kStreamType = 0, + kStreamUsage = 0, kAudioCodec = 1, kChannelCount = 2, kSampleRate = 3, @@ -41275,12 +41275,12 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AudioStreamAllocate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } - StreamTypeEnum streamType = static_cast(0); - AudioCodecEnum audioCodec = static_cast(0); - uint8_t channelCount = static_cast(0); - uint32_t sampleRate = static_cast(0); - uint32_t bitRate = static_cast(0); - uint8_t bitDepth = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); + AudioCodecEnum audioCodec = static_cast(0); + uint8_t channelCount = static_cast(0); + uint32_t sampleRate = static_cast(0); + uint32_t bitRate = static_cast(0); + uint8_t bitDepth = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -41295,12 +41295,12 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AudioStreamAllocate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } - StreamTypeEnum streamType = static_cast(0); - AudioCodecEnum audioCodec = static_cast(0); - uint8_t channelCount = static_cast(0); - uint32_t sampleRate = static_cast(0); - uint32_t bitRate = static_cast(0); - uint8_t bitDepth = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); + AudioCodecEnum audioCodec = static_cast(0); + uint8_t channelCount = static_cast(0); + uint32_t sampleRate = static_cast(0); + uint32_t bitRate = static_cast(0); + uint8_t bitDepth = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AudioStreamAllocate @@ -41371,7 +41371,7 @@ struct DecodableType namespace VideoStreamAllocate { enum class Fields : uint8_t { - kStreamType = 0, + kStreamUsage = 0, kVideoCodec = 1, kMinFrameRate = 2, kMaxFrameRate = 3, @@ -41392,10 +41392,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::VideoStreamAllocate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } - StreamTypeEnum streamType = static_cast(0); - VideoCodecEnum videoCodec = static_cast(0); - uint16_t minFrameRate = static_cast(0); - uint16_t maxFrameRate = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); + VideoCodecEnum videoCodec = static_cast(0); + uint16_t minFrameRate = static_cast(0); + uint16_t maxFrameRate = static_cast(0); Structs::VideoResolutionStruct::Type minResolution; Structs::VideoResolutionStruct::Type maxResolution; uint32_t minBitRate = static_cast(0); @@ -41418,10 +41418,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::VideoStreamAllocate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } - StreamTypeEnum streamType = static_cast(0); - VideoCodecEnum videoCodec = static_cast(0); - uint16_t minFrameRate = static_cast(0); - uint16_t maxFrameRate = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); + VideoCodecEnum videoCodec = static_cast(0); + uint16_t minFrameRate = static_cast(0); + uint16_t maxFrameRate = static_cast(0); Structs::VideoResolutionStruct::DecodableType minResolution; Structs::VideoResolutionStruct::DecodableType maxResolution; uint32_t minBitRate = static_cast(0); @@ -41469,9 +41469,8 @@ namespace VideoStreamModify { enum class Fields : uint8_t { kVideoStreamID = 0, - kResolution = 1, - kWatermarkEnabled = 2, - kOSDEnabled = 3, + kWatermarkEnabled = 1, + kOSDEnabled = 2, }; struct Type @@ -41482,7 +41481,6 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } uint16_t videoStreamID = static_cast(0); - Optional resolution; Optional watermarkEnabled; Optional OSDEnabled; @@ -41500,7 +41498,6 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } uint16_t videoStreamID = static_cast(0); - Optional resolution; Optional watermarkEnabled; Optional OSDEnabled; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -41662,7 +41659,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetStreamPriorities::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } - DataModel::List streamPriorities; + DataModel::List streamPriorities; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -41677,7 +41674,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetStreamPriorities::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } - DataModel::DecodableList streamPriorities; + DataModel::DecodableList streamPriorities; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetStreamPriorities @@ -41700,7 +41697,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::CameraAvStreamManagement::Commands::CaptureSnapshotResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -41990,10 +41987,10 @@ struct TypeInfo namespace RankedVideoStreamPrioritiesList { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::DecodableList &; + const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::RankedVideoStreamPrioritiesList::Id; } @@ -42364,7 +42361,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { kVideoStreamID = 0, - kStreamType = 1, + kStreamUsage = 1, kVideoCodec = 2, kMinFrameRate = 3, kMaxFrameRate = 4, @@ -42385,7 +42382,7 @@ struct Type static constexpr bool kIsFabricScoped = false; uint16_t videoStreamID = static_cast(0); - Optional streamType; + Optional streamUsage; Optional videoCodec; Optional minFrameRate; Optional maxFrameRate; @@ -42407,7 +42404,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } uint16_t videoStreamID = static_cast(0); - Optional streamType; + Optional streamUsage; Optional videoCodec; Optional minFrameRate; Optional maxFrameRate; @@ -42427,7 +42424,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { kAudioStreamID = 0, - kStreamType = 1, + kStreamUsage = 1, kAudioCodec = 2, kChannelCount = 3, kSampleRate = 4, @@ -42444,7 +42441,7 @@ struct Type static constexpr bool kIsFabricScoped = false; uint16_t audioStreamID = static_cast(0); - Optional streamType; + Optional streamUsage; Optional audioCodec; Optional channelCount; Optional sampleRate; @@ -42462,7 +42459,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } uint16_t audioStreamID = static_cast(0); - Optional streamType; + Optional streamUsage; Optional audioCodec; Optional channelCount; Optional sampleRate; @@ -42575,7 +42572,7 @@ namespace Commands { namespace SolicitOffer { enum class Fields : uint8_t { - kStreamType = 0, + kStreamUsage = 0, kVideoStreamID = 1, kAudioStreamID = 2, kICEServers = 3, @@ -42590,7 +42587,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SolicitOffer::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WebRTCTransportProvider::Id; } - StreamTypeEnum streamType = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); Optional> videoStreamID; Optional> audioStreamID; Optional> ICEServers; @@ -42610,7 +42607,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SolicitOffer::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WebRTCTransportProvider::Id; } - StreamTypeEnum streamType = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); Optional> videoStreamID; Optional> audioStreamID; Optional> ICEServers; @@ -42665,7 +42662,7 @@ enum class Fields : uint8_t { kWebRTCSessionID = 0, kSdp = 1, - kStreamType = 2, + kStreamUsage = 2, kVideoStreamID = 3, kAudioStreamID = 4, kICEServers = 5, @@ -42682,7 +42679,7 @@ struct Type DataModel::Nullable webRTCSessionID; chip::CharSpan sdp; - StreamTypeEnum streamType = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); Optional> videoStreamID; Optional> audioStreamID; Optional> ICEServers; @@ -42704,7 +42701,7 @@ struct DecodableType DataModel::Nullable webRTCSessionID; chip::CharSpan sdp; - StreamTypeEnum streamType = static_cast(0); + StreamUsageEnum streamUsage = static_cast(0); Optional> videoStreamID; Optional> audioStreamID; Optional> ICEServers; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index b0c00980d3e42d..d9da5b5fdea625 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -13784,7 +13784,7 @@ class CameraAvStreamManagementAudioStreamAllocate : public ClusterCommand CameraAvStreamManagementAudioStreamAllocate(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("audio-stream-allocate", credsIssuerConfig) { - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); AddArgument("AudioCodec", 0, UINT8_MAX, &mRequest.audioCodec); AddArgument("ChannelCount", 0, UINT8_MAX, &mRequest.channelCount); AddArgument("SampleRate", 0, UINT32_MAX, &mRequest.sampleRate); @@ -13866,7 +13866,7 @@ class CameraAvStreamManagementVideoStreamAllocate : public ClusterCommand ClusterCommand("video-stream-allocate", credsIssuerConfig), mComplex_MinResolution(&mRequest.minResolution), mComplex_MaxResolution(&mRequest.maxResolution) { - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); AddArgument("VideoCodec", 0, UINT8_MAX, &mRequest.videoCodec); AddArgument("MinFrameRate", 0, UINT16_MAX, &mRequest.minFrameRate); AddArgument("MaxFrameRate", 0, UINT16_MAX, &mRequest.maxFrameRate); @@ -13917,10 +13917,9 @@ class CameraAvStreamManagementVideoStreamModify : public ClusterCommand { public: CameraAvStreamManagementVideoStreamModify(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("video-stream-modify", credsIssuerConfig), mComplex_Resolution(&mRequest.resolution) + ClusterCommand("video-stream-modify", credsIssuerConfig) { AddArgument("VideoStreamID", 0, UINT16_MAX, &mRequest.videoStreamID); - AddArgument("Resolution", &mComplex_Resolution, "", Argument::kOptional); AddArgument("WatermarkEnabled", 0, 1, &mRequest.watermarkEnabled); AddArgument("OSDEnabled", 0, 1, &mRequest.OSDEnabled); ClusterCommand::AddArguments(); @@ -13949,8 +13948,6 @@ class CameraAvStreamManagementVideoStreamModify : public ClusterCommand private: chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamModify::Type mRequest; - TypedComplexArgument> - mComplex_Resolution; }; /* @@ -14113,7 +14110,7 @@ class CameraAvStreamManagementSetStreamPriorities : public ClusterCommand private: chip::app::Clusters::CameraAvStreamManagement::Commands::SetStreamPriorities::Type mRequest; - TypedComplexArgument> + TypedComplexArgument> mComplex_StreamPriorities; }; @@ -14188,7 +14185,7 @@ class WebRTCTransportProviderSolicitOffer : public ClusterCommand WebRTCTransportProviderSolicitOffer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("solicit-offer", credsIssuerConfig), mComplex_ICEServers(&mRequest.ICEServers) { - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); AddArgument("VideoStreamID", 0, UINT16_MAX, &mRequest.videoStreamID); AddArgument("AudioStreamID", 0, UINT16_MAX, &mRequest.audioStreamID); AddArgument("ICEServers", &mComplex_ICEServers, "", Argument::kOptional); @@ -14236,7 +14233,7 @@ class WebRTCTransportProviderProvideOffer : public ClusterCommand { AddArgument("WebRTCSessionID", 0, UINT16_MAX, &mRequest.webRTCSessionID); AddArgument("Sdp", &mRequest.sdp); - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); AddArgument("VideoStreamID", 0, UINT16_MAX, &mRequest.videoStreamID); AddArgument("AudioStreamID", 0, UINT16_MAX, &mRequest.audioStreamID); AddArgument("ICEServers", &mComplex_ICEServers, "", Argument::kOptional); @@ -26855,7 +26852,7 @@ void registerClusterCameraAvStreamManagement(Commands & commands, CredentialIssu Id, "allocated-snapshot-streams", Attributes::AllocatedSnapshotStreams::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( + chip::app::DataModel::List>>( Id, "ranked-video-stream-priorities-list", Attributes::RankedVideoStreamPrioritiesList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "soft-recording-privacy-mode-enabled", 0, 1, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 0c3abfbc83a89d..d2711c95e030fb 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -596,7 +596,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WebRTCSessionStruct.peerFabricIndex", "peerFabricIndex", value.isMember("peerFabricIndex"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("WebRTCSessionStruct.streamType", "streamType", value.isMember("streamType"))); + ComplexArgumentParser::EnsureMemberExist("WebRTCSessionStruct.streamUsage", "streamUsage", value.isMember("streamUsage"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WebRTCSessionStruct.videoStreamID", "videoStreamID", value.isMember("videoStreamID"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WebRTCSessionStruct.audioStreamID", "audioStreamID", @@ -617,9 +617,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.peerFabricIndex, value["peerFabricIndex"])); valueCopy.removeMember("peerFabricIndex"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "streamType"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.streamType, value["streamType"])); - valueCopy.removeMember("streamType"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "streamUsage"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.streamUsage, value["streamUsage"])); + valueCopy.removeMember("streamUsage"); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "videoStreamID"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.videoStreamID, value["videoStreamID"])); @@ -641,7 +641,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::WebRT ComplexArgumentParser::Finalize(request.id); ComplexArgumentParser::Finalize(request.peerNodeID); ComplexArgumentParser::Finalize(request.peerFabricIndex); - ComplexArgumentParser::Finalize(request.streamType); + ComplexArgumentParser::Finalize(request.streamUsage); ComplexArgumentParser::Finalize(request.videoStreamID); ComplexArgumentParser::Finalize(request.audioStreamID); ComplexArgumentParser::Finalize(request.metadataOptions); @@ -6038,7 +6038,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("VideoStreamStruct.videoStreamID", "videoStreamID", value.isMember("videoStreamID"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("VideoStreamStruct.streamType", "streamType", value.isMember("streamType"))); + ComplexArgumentParser::EnsureMemberExist("VideoStreamStruct.streamUsage", "streamUsage", value.isMember("streamUsage"))); ReturnErrorOnFailure( ComplexArgumentParser::EnsureMemberExist("VideoStreamStruct.videoCodec", "videoCodec", value.isMember("videoCodec"))); ReturnErrorOnFailure( @@ -6065,9 +6065,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.videoStreamID, value["videoStreamID"])); valueCopy.removeMember("videoStreamID"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "streamType"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.streamType, value["streamType"])); - valueCopy.removeMember("streamType"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "streamUsage"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.streamUsage, value["streamUsage"])); + valueCopy.removeMember("streamUsage"); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "videoCodec"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.videoCodec, value["videoCodec"])); @@ -6129,7 +6129,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::CameraAvStreamManagement::Structs::VideoStreamStruct::Type & request) { ComplexArgumentParser::Finalize(request.videoStreamID); - ComplexArgumentParser::Finalize(request.streamType); + ComplexArgumentParser::Finalize(request.streamUsage); ComplexArgumentParser::Finalize(request.videoCodec); ComplexArgumentParser::Finalize(request.minFrameRate); ComplexArgumentParser::Finalize(request.maxFrameRate); @@ -6360,7 +6360,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AudioStreamStruct.audioStreamID", "audioStreamID", value.isMember("audioStreamID"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("AudioStreamStruct.streamType", "streamType", value.isMember("streamType"))); + ComplexArgumentParser::EnsureMemberExist("AudioStreamStruct.streamUsage", "streamUsage", value.isMember("streamUsage"))); ReturnErrorOnFailure( ComplexArgumentParser::EnsureMemberExist("AudioStreamStruct.audioCodec", "audioCodec", value.isMember("audioCodec"))); ReturnErrorOnFailure( @@ -6379,9 +6379,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.audioStreamID, value["audioStreamID"])); valueCopy.removeMember("audioStreamID"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "streamType"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.streamType, value["streamType"])); - valueCopy.removeMember("streamType"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "streamUsage"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.streamUsage, value["streamUsage"])); + valueCopy.removeMember("streamUsage"); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "audioCodec"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.audioCodec, value["audioCodec"])); @@ -6413,7 +6413,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::CameraAvStreamManagement::Structs::AudioStreamStruct::Type & request) { ComplexArgumentParser::Finalize(request.audioStreamID); - ComplexArgumentParser::Finalize(request.streamType); + ComplexArgumentParser::Finalize(request.streamUsage); ComplexArgumentParser::Finalize(request.audioCodec); ComplexArgumentParser::Finalize(request.channelCount); ComplexArgumentParser::Finalize(request.sampleRate); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 9e44b001a17247..ce3372ab18d836 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -535,10 +535,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("StreamType", indent + 1, value.streamType); + CHIP_ERROR err = LogValue("StreamUsage", indent + 1, value.streamUsage); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StreamType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StreamUsage'"); return err; } } @@ -5336,10 +5336,10 @@ DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("StreamType", indent + 1, value.streamType); + CHIP_ERROR err = LogValue("StreamUsage", indent + 1, value.streamUsage); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StreamType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StreamUsage'"); return err; } } @@ -5642,10 +5642,10 @@ DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("StreamType", indent + 1, value.streamType); + CHIP_ERROR err = LogValue("StreamUsage", indent + 1, value.streamUsage); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StreamType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StreamUsage'"); return err; } } @@ -8737,10 +8737,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = DataModelLogger::LogValue("StreamType", indent + 1, value.streamType); + CHIP_ERROR err = DataModelLogger::LogValue("StreamUsage", indent + 1, value.streamUsage); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'StreamType'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'StreamUsage'"); return err; } } @@ -8833,10 +8833,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = DataModelLogger::LogValue("StreamType", indent + 1, value.streamType); + CHIP_ERROR err = DataModelLogger::LogValue("StreamUsage", indent + 1, value.streamUsage); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'StreamType'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'StreamUsage'"); return err; } } @@ -18590,7 +18590,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("AllocatedSnapshotStreams", 1, value); } case CameraAvStreamManagement::Attributes::RankedVideoStreamPrioritiesList::Id: { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RankedVideoStreamPrioritiesList", 1, value); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 4933a70c649ba6..c16632f02fb3aa 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -148881,7 +148881,7 @@ class CameraAvStreamManagementAudioStreamAllocate : public ClusterCommand { : ClusterCommand("audio-stream-allocate") { #if MTR_ENABLE_PROVISIONAL - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("AudioCodec", 0, UINT8_MAX, &mRequest.audioCodec); @@ -148913,7 +148913,7 @@ class CameraAvStreamManagementAudioStreamAllocate : public ClusterCommand { __auto_type * params = [[MTRCameraAVStreamManagementClusterAudioStreamAllocateParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamType)]; + params.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamUsage)]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL params.audioCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.audioCodec)]; @@ -149025,7 +149025,7 @@ class CameraAvStreamManagementVideoStreamAllocate : public ClusterCommand { , mComplex_MaxResolution(&mRequest.maxResolution) { #if MTR_ENABLE_PROVISIONAL - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("VideoCodec", 0, UINT8_MAX, &mRequest.videoCodec); @@ -149075,7 +149075,7 @@ class CameraAvStreamManagementVideoStreamAllocate : public ClusterCommand { __auto_type * params = [[MTRCameraAVStreamManagementClusterVideoStreamAllocateParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamType)]; + params.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamUsage)]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL params.videoCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.videoCodec)]; @@ -149162,14 +149162,10 @@ class CameraAvStreamManagementVideoStreamModify : public ClusterCommand { public: CameraAvStreamManagementVideoStreamModify() : ClusterCommand("video-stream-modify") - , mComplex_Resolution(&mRequest.resolution) { #if MTR_ENABLE_PROVISIONAL AddArgument("VideoStreamID", 0, UINT16_MAX, &mRequest.videoStreamID); #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Resolution", &mComplex_Resolution); -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("WatermarkEnabled", 0, 1, &mRequest.watermarkEnabled); #endif // MTR_ENABLE_PROVISIONAL @@ -149193,15 +149189,6 @@ class CameraAvStreamManagementVideoStreamModify : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL params.videoStreamID = [NSNumber numberWithUnsignedShort:mRequest.videoStreamID]; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.resolution.HasValue()) { - params.resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; - params.resolution.width = [NSNumber numberWithUnsignedShort:mRequest.resolution.Value().width]; - params.resolution.height = [NSNumber numberWithUnsignedShort:mRequest.resolution.Value().height]; - } else { - params.resolution = nil; - } -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.watermarkEnabled.HasValue()) { params.watermarkEnabled = [NSNumber numberWithBool:mRequest.watermarkEnabled.Value()]; @@ -149237,7 +149224,6 @@ class CameraAvStreamManagementVideoStreamModify : public ClusterCommand { private: chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamModify::Type mRequest; - TypedComplexArgument> mComplex_Resolution; }; #endif // MTR_ENABLE_PROVISIONAL @@ -149503,7 +149489,7 @@ class CameraAvStreamManagementSetStreamPriorities : public ClusterCommand { private: chip::app::Clusters::CameraAvStreamManagement::Commands::SetStreamPriorities::Type mRequest; - TypedComplexArgument> mComplex_StreamPriorities; + TypedComplexArgument> mComplex_StreamPriorities; }; #endif // MTR_ENABLE_PROVISIONAL @@ -149549,12 +149535,18 @@ class CameraAvStreamManagementCaptureSnapshot : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster captureSnapshotWithParams:params completion: - ^(NSError * _Nullable error) { + ^(MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::CameraAvStreamManagement::Commands::CaptureSnapshotResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + constexpr chip::CommandId responseId = chip::app::Clusters::CameraAvStreamManagement::Commands::CaptureSnapshotResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -154260,7 +154252,7 @@ class WebRTCTransportProviderSolicitOffer : public ClusterCommand { , mComplex_ICEServers(&mRequest.ICEServers) { #if MTR_ENABLE_PROVISIONAL - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("VideoStreamID", 0, UINT16_MAX, &mRequest.videoStreamID); @@ -154292,7 +154284,7 @@ class WebRTCTransportProviderSolicitOffer : public ClusterCommand { __auto_type * params = [[MTRWebRTCTransportProviderClusterSolicitOfferParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamType)]; + params.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamUsage)]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.videoStreamID.HasValue()) { @@ -154417,7 +154409,7 @@ class WebRTCTransportProviderProvideOffer : public ClusterCommand { AddArgument("Sdp", &mRequest.sdp); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("StreamType", 0, UINT8_MAX, &mRequest.streamType); + AddArgument("StreamUsage", 0, UINT8_MAX, &mRequest.streamUsage); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("VideoStreamID", 0, UINT16_MAX, &mRequest.videoStreamID); @@ -154459,7 +154451,7 @@ class WebRTCTransportProviderProvideOffer : public ClusterCommand { params.sdp = [[NSString alloc] initWithBytes:mRequest.sdp.data() length:mRequest.sdp.size() encoding:NSUTF8StringEncoding]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamType)]; + params.streamUsage = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.streamUsage)]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.videoStreamID.HasValue()) { From 5aa1c847a52d416345bfdba1efc09782f94f91e7 Mon Sep 17 00:00:00 2001 From: Pradip De Date: Fri, 3 Jan 2025 20:18:51 +0000 Subject: [PATCH 2/2] Add missing "provisional apiMaturity" to webrtc-requestor-cluster.xml. --- .../zcl/data-model/chip/webrtc-requestor-cluster.xml | 2 +- src/controller/data_model/controller-clusters.matter | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml index 557ebf8e7b3cba..e07c294a45d598 100644 --- a/src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml @@ -22,7 +22,7 @@ Git: 0.9-fall2024-228-g54b1ae035 --> - + Cameras WebRTC Transport Requestor 0x0554 diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 9515f971e8204c..c798e39e965450 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -9953,7 +9953,7 @@ provisional cluster WebRTCTransportProvider = 1363 { } /** The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider. */ -cluster WebRTCTransportRequestor = 1364 { +provisional cluster WebRTCTransportRequestor = 1364 { revision 1; enum StreamUsageEnum : enum8 {