@@ -7014,6 +7014,315 @@ cluster LowPower = 1288 {
7014
7014
command Sleep(): DefaultSuccess = 0;
7015
7015
}
7016
7016
7017
+ /** The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. */
7018
+ provisional cluster CameraAvStreamManagement = 1361 {
7019
+ revision 1;
7020
+
7021
+ enum AudioCodecEnum : enum8 {
7022
+ kOPUS = 0;
7023
+ kAACLC = 1;
7024
+ }
7025
+
7026
+ enum ImageCodecEnum : enum8 {
7027
+ kJPEG = 0;
7028
+ }
7029
+
7030
+ enum StreamUsageEnum : enum8 {
7031
+ kInternal = 0;
7032
+ kRecording = 1;
7033
+ kAnalysis = 2;
7034
+ kLiveView = 3;
7035
+ }
7036
+
7037
+ enum TriStateAutoEnum : enum8 {
7038
+ kOff = 0;
7039
+ kOn = 1;
7040
+ kAuto = 2;
7041
+ }
7042
+
7043
+ enum TwoWayTalkSupportTypeEnum : enum8 {
7044
+ kNotSupported = 0;
7045
+ kHalfDuplex = 1;
7046
+ kFullDuplex = 2;
7047
+ }
7048
+
7049
+ enum VideoCodecEnum : enum8 {
7050
+ kH264 = 0;
7051
+ kHEVC = 1;
7052
+ kVVC = 2;
7053
+ kAV1 = 3;
7054
+ }
7055
+
7056
+ bitmap Feature : bitmap32 {
7057
+ kAudio = 0x1;
7058
+ kVideo = 0x2;
7059
+ kSnapshot = 0x4;
7060
+ kPrivacy = 0x8;
7061
+ kSpeaker = 0x10;
7062
+ kImageControl = 0x20;
7063
+ kWatermark = 0x40;
7064
+ kOnScreenDisplay = 0x80;
7065
+ kLocalStorage = 0x100;
7066
+ }
7067
+
7068
+ struct VideoResolutionStruct {
7069
+ int16u width = 0;
7070
+ int16u height = 1;
7071
+ }
7072
+
7073
+ struct VideoStreamStruct {
7074
+ int16u videoStreamID = 0;
7075
+ StreamUsageEnum streamUsage = 1;
7076
+ VideoCodecEnum videoCodec = 2;
7077
+ int16u minFrameRate = 3;
7078
+ int16u maxFrameRate = 4;
7079
+ VideoResolutionStruct minResolution = 5;
7080
+ VideoResolutionStruct maxResolution = 6;
7081
+ int32u minBitRate = 7;
7082
+ int32u maxBitRate = 8;
7083
+ int16u minFragmentLen = 9;
7084
+ int16u maxFragmentLen = 10;
7085
+ optional boolean watermarkEnabled = 11;
7086
+ optional boolean OSDEnabled = 12;
7087
+ int8u referenceCount = 13;
7088
+ }
7089
+
7090
+ struct SnapshotStreamStruct {
7091
+ int16u snapshotStreamID = 0;
7092
+ ImageCodecEnum imageCodec = 1;
7093
+ int16u frameRate = 2;
7094
+ int32u bitRate = 3;
7095
+ VideoResolutionStruct minResolution = 4;
7096
+ VideoResolutionStruct maxResolution = 5;
7097
+ int8u quality = 6;
7098
+ int8u referenceCount = 7;
7099
+ }
7100
+
7101
+ struct SnapshotParamsStruct {
7102
+ VideoResolutionStruct resolution = 0;
7103
+ int16u maxFrameRate = 1;
7104
+ ImageCodecEnum imageCodec = 2;
7105
+ }
7106
+
7107
+ struct RateDistortionTradeOffPointsStruct {
7108
+ VideoCodecEnum codec = 0;
7109
+ VideoResolutionStruct resolution = 1;
7110
+ int32u minBitRate = 2;
7111
+ }
7112
+
7113
+ struct AudioCapabilitiesStruct {
7114
+ int8u maxNumberOfChannels = 0;
7115
+ AudioCodecEnum supportedCodecs[] = 1;
7116
+ int32u supportedSampleRates[] = 2;
7117
+ int8u supportedBitDepths[] = 3;
7118
+ }
7119
+
7120
+ struct AudioStreamStruct {
7121
+ int16u audioStreamID = 0;
7122
+ StreamUsageEnum streamUsage = 1;
7123
+ AudioCodecEnum audioCodec = 2;
7124
+ int8u channelCount = 3;
7125
+ int32u sampleRate = 4;
7126
+ int32u bitRate = 5;
7127
+ int8u bitDepth = 6;
7128
+ int8u referenceCount = 7;
7129
+ }
7130
+
7131
+ struct VideoSensorParamsStruct {
7132
+ int16u sensorWidth = 0;
7133
+ int16u sensorHeight = 1;
7134
+ boolean HDRCapable = 2;
7135
+ int16u maxFPS = 3;
7136
+ int16u maxHDRFPS = 4;
7137
+ }
7138
+
7139
+ struct ViewportStruct {
7140
+ int16u x1 = 0;
7141
+ int16u y1 = 1;
7142
+ int16u x2 = 2;
7143
+ int16u y2 = 3;
7144
+ }
7145
+
7146
+ info event VideoStreamChanged = 0 {
7147
+ int16u videoStreamID = 0;
7148
+ optional StreamUsageEnum streamUsage = 1;
7149
+ optional VideoCodecEnum videoCodec = 2;
7150
+ optional int16u minFrameRate = 3;
7151
+ optional int16u maxFrameRate = 4;
7152
+ optional VideoResolutionStruct minResolution = 5;
7153
+ optional VideoResolutionStruct maxResolution = 6;
7154
+ optional int32u minBitRate = 7;
7155
+ optional int32u maxBitRate = 8;
7156
+ optional int16u minFragmentLen = 9;
7157
+ optional int16u maxFragmentLen = 10;
7158
+ }
7159
+
7160
+ info event AudioStreamChanged = 1 {
7161
+ int16u audioStreamID = 0;
7162
+ optional StreamUsageEnum streamUsage = 1;
7163
+ optional AudioCodecEnum audioCodec = 2;
7164
+ optional int8u channelCount = 3;
7165
+ optional int32u sampleRate = 4;
7166
+ optional int32u bitRate = 5;
7167
+ optional int8u bitDepth = 6;
7168
+ }
7169
+
7170
+ info event SnapshotStreamChanged = 2 {
7171
+ int16u snapshotStreamID = 0;
7172
+ optional ImageCodecEnum imageCodec = 1;
7173
+ optional int16u frameRate = 2;
7174
+ optional int32u bitRate = 3;
7175
+ optional VideoResolutionStruct minResolution = 4;
7176
+ optional VideoResolutionStruct maxResolution = 5;
7177
+ optional int8u quality = 6;
7178
+ }
7179
+
7180
+ readonly attribute optional int8u maxConcurrentVideoEncoders = 0;
7181
+ readonly attribute optional int32u maxEncodedPixelRate = 1;
7182
+ readonly attribute optional VideoSensorParamsStruct videoSensorParams = 2;
7183
+ readonly attribute optional boolean nightVisionCapable = 3;
7184
+ readonly attribute optional VideoResolutionStruct minViewport = 4;
7185
+ readonly attribute optional RateDistortionTradeOffPointsStruct rateDistortionTradeOffPoints[] = 5;
7186
+ readonly attribute optional int32u maxContentBufferSize = 6;
7187
+ readonly attribute optional AudioCapabilitiesStruct microphoneCapabilities = 7;
7188
+ readonly attribute optional AudioCapabilitiesStruct speakerCapabilities = 8;
7189
+ readonly attribute optional TwoWayTalkSupportTypeEnum twoWayTalkSupport = 9;
7190
+ readonly attribute optional SnapshotParamsStruct supportedSnapshotParams[] = 10;
7191
+ readonly attribute int32u maxNetworkBandwidth = 11;
7192
+ readonly attribute optional int16u currentFrameRate = 12;
7193
+ attribute access(read: manage, write: manage) optional boolean HDRModeEnabled = 13;
7194
+ readonly attribute fabric_idx fabricsUsingCamera[] = 14;
7195
+ readonly attribute optional VideoStreamStruct allocatedVideoStreams[] = 15;
7196
+ readonly attribute optional AudioStreamStruct allocatedAudioStreams[] = 16;
7197
+ readonly attribute optional SnapshotStreamStruct allocatedSnapshotStreams[] = 17;
7198
+ readonly attribute optional StreamUsageEnum rankedVideoStreamPrioritiesList[] = 18;
7199
+ attribute optional boolean softRecordingPrivacyModeEnabled = 19;
7200
+ attribute optional boolean softLivestreamPrivacyModeEnabled = 20;
7201
+ readonly attribute optional boolean hardPrivacyModeOn = 21;
7202
+ attribute access(read: manage, write: manage) optional TriStateAutoEnum nightVision = 22;
7203
+ attribute access(read: manage, write: manage) optional TriStateAutoEnum nightVisionIllum = 23;
7204
+ attribute access(read: manage, write: manage) optional ViewportStruct viewport = 24;
7205
+ attribute access(read: manage, write: manage) optional boolean speakerMuted = 25;
7206
+ attribute access(read: manage, write: manage) optional int8u speakerVolumeLevel = 26;
7207
+ readonly attribute access(read: manage) optional int8u speakerMaxLevel = 27;
7208
+ readonly attribute access(read: manage) optional int8u speakerMinLevel = 28;
7209
+ attribute access(read: manage, write: manage) optional boolean microphoneMuted = 29;
7210
+ attribute access(read: manage, write: manage) optional int8u microphoneVolumeLevel = 30;
7211
+ readonly attribute access(read: manage) optional int8u microphoneMaxLevel = 31;
7212
+ readonly attribute access(read: manage) optional int8u microphoneMinLevel = 32;
7213
+ attribute access(read: manage, write: manage) optional boolean microphoneAGCEnabled = 33;
7214
+ attribute access(read: manage, write: manage) optional int16u imageRotation = 34;
7215
+ attribute access(read: manage, write: manage) optional boolean imageFlipHorizontal = 35;
7216
+ attribute access(read: manage, write: manage) optional boolean imageFlipVertical = 36;
7217
+ attribute access(read: manage, write: manage) optional boolean localVideoRecordingEnabled = 37;
7218
+ attribute access(read: manage, write: manage) optional boolean localSnapshotRecordingEnabled = 38;
7219
+ attribute access(read: manage, write: manage) optional boolean statusLightEnabled = 39;
7220
+ attribute access(read: manage, write: manage) optional ThreeLevelAutoEnum statusLightBrightness = 40;
7221
+ readonly attribute command_id generatedCommandList[] = 65528;
7222
+ readonly attribute command_id acceptedCommandList[] = 65529;
7223
+ readonly attribute event_id eventList[] = 65530;
7224
+ readonly attribute attrib_id attributeList[] = 65531;
7225
+ readonly attribute bitmap32 featureMap = 65532;
7226
+ readonly attribute int16u clusterRevision = 65533;
7227
+
7228
+ request struct AudioStreamAllocateRequest {
7229
+ StreamUsageEnum streamUsage = 0;
7230
+ AudioCodecEnum audioCodec = 1;
7231
+ int8u channelCount = 2;
7232
+ int32u sampleRate = 3;
7233
+ int32u bitRate = 4;
7234
+ int8u bitDepth = 5;
7235
+ }
7236
+
7237
+ response struct AudioStreamAllocateResponse = 1 {
7238
+ int16u audioStreamID = 0;
7239
+ }
7240
+
7241
+ request struct AudioStreamDeallocateRequest {
7242
+ int16u audioStreamID = 0;
7243
+ }
7244
+
7245
+ request struct VideoStreamAllocateRequest {
7246
+ StreamUsageEnum streamUsage = 0;
7247
+ VideoCodecEnum videoCodec = 1;
7248
+ int16u minFrameRate = 2;
7249
+ int16u maxFrameRate = 3;
7250
+ VideoResolutionStruct minResolution = 4;
7251
+ VideoResolutionStruct maxResolution = 5;
7252
+ int32u minBitRate = 6;
7253
+ int32u maxBitRate = 7;
7254
+ int16u minFragmentLen = 8;
7255
+ int16u maxFragmentLen = 9;
7256
+ optional boolean watermarkEnabled = 10;
7257
+ optional boolean OSDEnabled = 11;
7258
+ }
7259
+
7260
+ response struct VideoStreamAllocateResponse = 4 {
7261
+ int16u videoStreamID = 0;
7262
+ }
7263
+
7264
+ request struct VideoStreamModifyRequest {
7265
+ int16u videoStreamID = 0;
7266
+ optional boolean watermarkEnabled = 1;
7267
+ optional boolean OSDEnabled = 2;
7268
+ }
7269
+
7270
+ request struct VideoStreamDeallocateRequest {
7271
+ int16u videoStreamID = 0;
7272
+ }
7273
+
7274
+ request struct SnapshotStreamAllocateRequest {
7275
+ ImageCodecEnum imageCodec = 0;
7276
+ int16u maxFrameRate = 1;
7277
+ int32u bitRate = 2;
7278
+ VideoResolutionStruct minResolution = 3;
7279
+ VideoResolutionStruct maxResolution = 4;
7280
+ int8u quality = 5;
7281
+ }
7282
+
7283
+ response struct SnapshotStreamAllocateResponse = 8 {
7284
+ int16u snapshotStreamID = 0;
7285
+ }
7286
+
7287
+ request struct SnapshotStreamDeallocateRequest {
7288
+ int16u snapshotStreamID = 0;
7289
+ }
7290
+
7291
+ request struct SetStreamPrioritiesRequest {
7292
+ StreamUsageEnum streamPriorities[] = 0;
7293
+ }
7294
+
7295
+ request struct CaptureSnapshotRequest {
7296
+ int16u snapshotStreamID = 0;
7297
+ VideoResolutionStruct requestedResolution = 1;
7298
+ }
7299
+
7300
+ response struct CaptureSnapshotResponse = 12 {
7301
+ octet_string data = 0;
7302
+ ImageCodecEnum imageCodec = 1;
7303
+ VideoResolutionStruct resolution = 2;
7304
+ }
7305
+
7306
+ /** This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. */
7307
+ command access(invoke: manage) AudioStreamAllocate(AudioStreamAllocateRequest): AudioStreamAllocateResponse = 0;
7308
+ /** This command SHALL deallocate an audio stream on the camera, corresponding to the given audio stream identifier. */
7309
+ command access(invoke: manage) AudioStreamDeallocate(AudioStreamDeallocateRequest): DefaultSuccess = 2;
7310
+ /** This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. */
7311
+ command access(invoke: manage) VideoStreamAllocate(VideoStreamAllocateRequest): VideoStreamAllocateResponse = 3;
7312
+ /** This command SHALL be used to modify a stream specified by the VideoStreamID. */
7313
+ command access(invoke: manage) VideoStreamModify(VideoStreamModifyRequest): DefaultSuccess = 5;
7314
+ /** This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. */
7315
+ command access(invoke: manage) VideoStreamDeallocate(VideoStreamDeallocateRequest): DefaultSuccess = 6;
7316
+ /** This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. */
7317
+ command access(invoke: manage) SnapshotStreamAllocate(SnapshotStreamAllocateRequest): SnapshotStreamAllocateResponse = 7;
7318
+ /** This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. */
7319
+ command access(invoke: manage) SnapshotStreamDeallocate(SnapshotStreamDeallocateRequest): DefaultSuccess = 9;
7320
+ /** This command SHALL set the relative priorities of the various stream usages on the camera. */
7321
+ command access(invoke: administer) SetStreamPriorities(SetStreamPrioritiesRequest): DefaultSuccess = 10;
7322
+ /** This command SHALL return a Snapshot from the camera. */
7323
+ command CaptureSnapshot(CaptureSnapshotRequest): CaptureSnapshotResponse = 11;
7324
+ }
7325
+
7017
7326
/** The Test Cluster is meant to validate the generated code */
7018
7327
internal cluster UnitTesting = 4294048773 {
7019
7328
revision 1; // NOTE: Default/not specifically set
@@ -9532,6 +9841,27 @@ endpoint 2 {
9532
9841
callback attribute featureMap;
9533
9842
ram attribute clusterRevision default = 5;
9534
9843
}
9844
+
9845
+ server cluster CameraAvStreamManagement {
9846
+ callback attribute supportedSnapshotParams;
9847
+ callback attribute maxNetworkBandwidth;
9848
+ callback attribute fabricsUsingCamera;
9849
+ callback attribute allocatedSnapshotStreams;
9850
+ callback attribute nightVision;
9851
+ callback attribute nightVisionIllum;
9852
+ callback attribute generatedCommandList;
9853
+ callback attribute acceptedCommandList;
9854
+ callback attribute attributeList;
9855
+ callback attribute featureMap;
9856
+ ram attribute clusterRevision default = 1;
9857
+
9858
+ handle command SnapshotStreamAllocate;
9859
+ handle command SnapshotStreamAllocateResponse;
9860
+ handle command SnapshotStreamDeallocate;
9861
+ handle command SetStreamPriorities;
9862
+ handle command CaptureSnapshot;
9863
+ handle command CaptureSnapshotResponse;
9864
+ }
9535
9865
}
9536
9866
endpoint 3 {
9537
9867
device type ma_genericswitch = 15, version 3;
0 commit comments