Skip to content

Commit d79f80b

Browse files
pidarpedgmarcosb
authored andcommitted
Camera av stream management XML changes for Spec ballot fixes (project-chip#37823)
* Update CameraAVStreamMgmt xml to reflect spec changes. * Run zap regen.
1 parent 102d3b1 commit d79f80b

File tree

50 files changed

+997
-3819
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+997
-3819
lines changed

src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml

+85-111
Large diffs are not rendered by default.

src/controller/data_model/controller-clusters.matter

+19-43
Original file line numberDiff line numberDiff line change
@@ -9741,6 +9741,7 @@ provisional cluster CameraAvStreamManagement = 1361 {
97419741
kWatermark = 0x40;
97429742
kOnScreenDisplay = 0x80;
97439743
kLocalStorage = 0x100;
9744+
kHighDynamicRange = 0x200;
97449745
}
97459746

97469747
struct VideoResolutionStruct {
@@ -9809,9 +9810,8 @@ provisional cluster CameraAvStreamManagement = 1361 {
98099810
struct VideoSensorParamsStruct {
98109811
int16u sensorWidth = 0;
98119812
int16u sensorHeight = 1;
9812-
boolean HDRCapable = 2;
9813-
int16u maxFPS = 3;
9814-
int16u maxHDRFPS = 4;
9813+
int16u maxFPS = 2;
9814+
optional int16u maxHDRFPS = 3;
98159815
}
98169816

98179817
struct ViewportStruct {
@@ -9821,55 +9821,21 @@ provisional cluster CameraAvStreamManagement = 1361 {
98219821
int16u y2 = 3;
98229822
}
98239823

9824-
info event VideoStreamChanged = 0 {
9825-
int16u videoStreamID = 0;
9826-
optional StreamUsageEnum streamUsage = 1;
9827-
optional VideoCodecEnum videoCodec = 2;
9828-
optional int16u minFrameRate = 3;
9829-
optional int16u maxFrameRate = 4;
9830-
optional VideoResolutionStruct minResolution = 5;
9831-
optional VideoResolutionStruct maxResolution = 6;
9832-
optional int32u minBitRate = 7;
9833-
optional int32u maxBitRate = 8;
9834-
optional int16u minFragmentLen = 9;
9835-
optional int16u maxFragmentLen = 10;
9836-
}
9837-
9838-
info event AudioStreamChanged = 1 {
9839-
int16u audioStreamID = 0;
9840-
optional StreamUsageEnum streamUsage = 1;
9841-
optional AudioCodecEnum audioCodec = 2;
9842-
optional int8u channelCount = 3;
9843-
optional int32u sampleRate = 4;
9844-
optional int32u bitRate = 5;
9845-
optional int8u bitDepth = 6;
9846-
}
9847-
9848-
info event SnapshotStreamChanged = 2 {
9849-
int16u snapshotStreamID = 0;
9850-
optional ImageCodecEnum imageCodec = 1;
9851-
optional int16u frameRate = 2;
9852-
optional int32u bitRate = 3;
9853-
optional VideoResolutionStruct minResolution = 4;
9854-
optional VideoResolutionStruct maxResolution = 5;
9855-
optional int8u quality = 6;
9856-
}
9857-
98589824
readonly attribute optional int8u maxConcurrentVideoEncoders = 0;
98599825
readonly attribute optional int32u maxEncodedPixelRate = 1;
98609826
readonly attribute optional VideoSensorParamsStruct videoSensorParams = 2;
98619827
readonly attribute optional boolean nightVisionCapable = 3;
98629828
readonly attribute optional VideoResolutionStruct minViewport = 4;
98639829
readonly attribute optional RateDistortionTradeOffPointsStruct rateDistortionTradeOffPoints[] = 5;
9864-
readonly attribute optional int32u maxContentBufferSize = 6;
9830+
readonly attribute int32u maxContentBufferSize = 6;
98659831
readonly attribute optional AudioCapabilitiesStruct microphoneCapabilities = 7;
98669832
readonly attribute optional AudioCapabilitiesStruct speakerCapabilities = 8;
98679833
readonly attribute optional TwoWayTalkSupportTypeEnum twoWayTalkSupport = 9;
98689834
readonly attribute optional SnapshotParamsStruct supportedSnapshotParams[] = 10;
98699835
readonly attribute int32u maxNetworkBandwidth = 11;
98709836
readonly attribute optional int16u currentFrameRate = 12;
98719837
attribute access(read: manage, write: manage) optional boolean HDRModeEnabled = 13;
9872-
readonly attribute fabric_idx fabricsUsingCamera[] = 14;
9838+
readonly attribute StreamUsageEnum supportedStreamUsages[] = 14;
98739839
readonly attribute optional VideoStreamStruct allocatedVideoStreams[] = 15;
98749840
readonly attribute optional AudioStreamStruct allocatedAudioStreams[] = 16;
98759841
readonly attribute optional SnapshotStreamStruct allocatedSnapshotStreams[] = 17;
@@ -9956,12 +9922,20 @@ provisional cluster CameraAvStreamManagement = 1361 {
99569922
VideoResolutionStruct minResolution = 3;
99579923
VideoResolutionStruct maxResolution = 4;
99589924
int8u quality = 5;
9925+
optional boolean watermarkEnabled = 6;
9926+
optional boolean OSDEnabled = 7;
99599927
}
99609928

99619929
response struct SnapshotStreamAllocateResponse = 8 {
99629930
int16u snapshotStreamID = 0;
99639931
}
99649932

9933+
request struct SnapshotStreamModifyRequest {
9934+
int16u snapshotStreamID = 0;
9935+
optional boolean watermarkEnabled = 1;
9936+
optional boolean OSDEnabled = 2;
9937+
}
9938+
99659939
request struct SnapshotStreamDeallocateRequest {
99669940
int16u snapshotStreamID = 0;
99679941
}
@@ -9975,7 +9949,7 @@ provisional cluster CameraAvStreamManagement = 1361 {
99759949
VideoResolutionStruct requestedResolution = 1;
99769950
}
99779951

9978-
response struct CaptureSnapshotResponse = 12 {
9952+
response struct CaptureSnapshotResponse = 13 {
99799953
octet_string data = 0;
99809954
ImageCodecEnum imageCodec = 1;
99819955
VideoResolutionStruct resolution = 2;
@@ -9993,12 +9967,14 @@ provisional cluster CameraAvStreamManagement = 1361 {
99939967
command access(invoke: manage) VideoStreamDeallocate(VideoStreamDeallocateRequest): DefaultSuccess = 6;
99949968
/** This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. */
99959969
command access(invoke: manage) SnapshotStreamAllocate(SnapshotStreamAllocateRequest): SnapshotStreamAllocateResponse = 7;
9970+
/** This command SHALL be used to modify a stream specified by the VideoStreamID. */
9971+
command access(invoke: manage) SnapshotStreamModify(SnapshotStreamModifyRequest): DefaultSuccess = 9;
99969972
/** This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. */
9997-
command access(invoke: manage) SnapshotStreamDeallocate(SnapshotStreamDeallocateRequest): DefaultSuccess = 9;
9973+
command access(invoke: manage) SnapshotStreamDeallocate(SnapshotStreamDeallocateRequest): DefaultSuccess = 10;
99989974
/** This command SHALL set the relative priorities of the various stream usages on the camera. */
9999-
command access(invoke: administer) SetStreamPriorities(SetStreamPrioritiesRequest): DefaultSuccess = 10;
9975+
command access(invoke: administer) SetStreamPriorities(SetStreamPrioritiesRequest): DefaultSuccess = 11;
100009976
/** This command SHALL return a Snapshot from the camera. */
10001-
command CaptureSnapshot(CaptureSnapshotRequest): CaptureSnapshotResponse = 11;
9977+
command CaptureSnapshot(CaptureSnapshotRequest): CaptureSnapshotResponse = 12;
100029978
}
100039979

100049980
/** This cluster provides an interface into controls associated with the operation of a device that provides pan, tilt, and zoom functions, either mechanically, or against a digital image. */

src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java

+52-16
Original file line numberDiff line numberDiff line change
@@ -60409,7 +60409,7 @@ public static class CameraAvStreamManagementCluster extends BaseChipCluster {
6040960409
private static final long MAX_NETWORK_BANDWIDTH_ATTRIBUTE_ID = 11L;
6041060410
private static final long CURRENT_FRAME_RATE_ATTRIBUTE_ID = 12L;
6041160411
private static final long HDR_MODE_ENABLED_ATTRIBUTE_ID = 13L;
60412-
private static final long FABRICS_USING_CAMERA_ATTRIBUTE_ID = 14L;
60412+
private static final long SUPPORTED_STREAM_USAGES_ATTRIBUTE_ID = 14L;
6041360413
private static final long ALLOCATED_VIDEO_STREAMS_ATTRIBUTE_ID = 15L;
6041460414
private static final long ALLOCATED_AUDIO_STREAMS_ATTRIBUTE_ID = 16L;
6041560415
private static final long ALLOCATED_SNAPSHOT_STREAMS_ATTRIBUTE_ID = 17L;
@@ -60645,11 +60645,11 @@ public void onResponse(StructType invokeStructValue) {
6064560645
}}, commandId, commandArgs, timedInvokeTimeoutMs);
6064660646
}
6064760647

60648-
public void snapshotStreamAllocate(SnapshotStreamAllocateResponseCallback callback, Integer imageCodec, Integer maxFrameRate, Long bitRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Integer quality) {
60649-
snapshotStreamAllocate(callback, imageCodec, maxFrameRate, bitRate, minResolution, maxResolution, quality, 0);
60648+
public void snapshotStreamAllocate(SnapshotStreamAllocateResponseCallback callback, Integer imageCodec, Integer maxFrameRate, Long bitRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Integer quality, Optional<Boolean> watermarkEnabled, Optional<Boolean> OSDEnabled) {
60649+
snapshotStreamAllocate(callback, imageCodec, maxFrameRate, bitRate, minResolution, maxResolution, quality, watermarkEnabled, OSDEnabled, 0);
6065060650
}
6065160651

60652-
public void snapshotStreamAllocate(SnapshotStreamAllocateResponseCallback callback, Integer imageCodec, Integer maxFrameRate, Long bitRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Integer quality, int timedInvokeTimeoutMs) {
60652+
public void snapshotStreamAllocate(SnapshotStreamAllocateResponseCallback callback, Integer imageCodec, Integer maxFrameRate, Long bitRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Integer quality, Optional<Boolean> watermarkEnabled, Optional<Boolean> OSDEnabled, int timedInvokeTimeoutMs) {
6065360653
final long commandId = 7L;
6065460654

6065560655
ArrayList<StructElement> elements = new ArrayList<>();
@@ -60677,6 +60677,14 @@ public void snapshotStreamAllocate(SnapshotStreamAllocateResponseCallback callba
6067760677
BaseTLVType qualitytlvValue = new UIntType(quality);
6067860678
elements.add(new StructElement(qualityFieldID, qualitytlvValue));
6067960679

60680+
final long watermarkEnabledFieldID = 6L;
60681+
BaseTLVType watermarkEnabledtlvValue = watermarkEnabled.<BaseTLVType>map((nonOptionalwatermarkEnabled) -> new BooleanType(nonOptionalwatermarkEnabled)).orElse(new EmptyType());
60682+
elements.add(new StructElement(watermarkEnabledFieldID, watermarkEnabledtlvValue));
60683+
60684+
final long OSDEnabledFieldID = 7L;
60685+
BaseTLVType OSDEnabledtlvValue = OSDEnabled.<BaseTLVType>map((nonOptionalOSDEnabled) -> new BooleanType(nonOptionalOSDEnabled)).orElse(new EmptyType());
60686+
elements.add(new StructElement(OSDEnabledFieldID, OSDEnabledtlvValue));
60687+
6068060688
StructType commandArgs = new StructType(elements);
6068160689
invoke(new InvokeCallbackImpl(callback) {
6068260690
@Override
@@ -60695,12 +60703,40 @@ public void onResponse(StructType invokeStructValue) {
6069560703
}}, commandId, commandArgs, timedInvokeTimeoutMs);
6069660704
}
6069760705

60706+
public void snapshotStreamModify(DefaultClusterCallback callback, Integer snapshotStreamID, Optional<Boolean> watermarkEnabled, Optional<Boolean> OSDEnabled) {
60707+
snapshotStreamModify(callback, snapshotStreamID, watermarkEnabled, OSDEnabled, 0);
60708+
}
60709+
60710+
public void snapshotStreamModify(DefaultClusterCallback callback, Integer snapshotStreamID, Optional<Boolean> watermarkEnabled, Optional<Boolean> OSDEnabled, int timedInvokeTimeoutMs) {
60711+
final long commandId = 9L;
60712+
60713+
ArrayList<StructElement> elements = new ArrayList<>();
60714+
final long snapshotStreamIDFieldID = 0L;
60715+
BaseTLVType snapshotStreamIDtlvValue = new UIntType(snapshotStreamID);
60716+
elements.add(new StructElement(snapshotStreamIDFieldID, snapshotStreamIDtlvValue));
60717+
60718+
final long watermarkEnabledFieldID = 1L;
60719+
BaseTLVType watermarkEnabledtlvValue = watermarkEnabled.<BaseTLVType>map((nonOptionalwatermarkEnabled) -> new BooleanType(nonOptionalwatermarkEnabled)).orElse(new EmptyType());
60720+
elements.add(new StructElement(watermarkEnabledFieldID, watermarkEnabledtlvValue));
60721+
60722+
final long OSDEnabledFieldID = 2L;
60723+
BaseTLVType OSDEnabledtlvValue = OSDEnabled.<BaseTLVType>map((nonOptionalOSDEnabled) -> new BooleanType(nonOptionalOSDEnabled)).orElse(new EmptyType());
60724+
elements.add(new StructElement(OSDEnabledFieldID, OSDEnabledtlvValue));
60725+
60726+
StructType commandArgs = new StructType(elements);
60727+
invoke(new InvokeCallbackImpl(callback) {
60728+
@Override
60729+
public void onResponse(StructType invokeStructValue) {
60730+
callback.onSuccess();
60731+
}}, commandId, commandArgs, timedInvokeTimeoutMs);
60732+
}
60733+
6069860734
public void snapshotStreamDeallocate(DefaultClusterCallback callback, Integer snapshotStreamID) {
6069960735
snapshotStreamDeallocate(callback, snapshotStreamID, 0);
6070060736
}
6070160737

6070260738
public void snapshotStreamDeallocate(DefaultClusterCallback callback, Integer snapshotStreamID, int timedInvokeTimeoutMs) {
60703-
final long commandId = 9L;
60739+
final long commandId = 10L;
6070460740

6070560741
ArrayList<StructElement> elements = new ArrayList<>();
6070660742
final long snapshotStreamIDFieldID = 0L;
@@ -60720,7 +60756,7 @@ public void setStreamPriorities(DefaultClusterCallback callback, ArrayList<Integ
6072060756
}
6072160757

6072260758
public void setStreamPriorities(DefaultClusterCallback callback, ArrayList<Integer> streamPriorities, int timedInvokeTimeoutMs) {
60723-
final long commandId = 10L;
60759+
final long commandId = 11L;
6072460760

6072560761
ArrayList<StructElement> elements = new ArrayList<>();
6072660762
final long streamPrioritiesFieldID = 0L;
@@ -60740,7 +60776,7 @@ public void captureSnapshot(CaptureSnapshotResponseCallback callback, Integer sn
6074060776
}
6074160777

6074260778
public void captureSnapshot(CaptureSnapshotResponseCallback callback, Integer snapshotStreamID, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct requestedResolution, int timedInvokeTimeoutMs) {
60743-
final long commandId = 11L;
60779+
final long commandId = 12L;
6074460780

6074560781
ArrayList<StructElement> elements = new ArrayList<>();
6074660782
final long snapshotStreamIDFieldID = 0L;
@@ -60823,7 +60859,7 @@ public interface SupportedSnapshotParamsAttributeCallback extends BaseAttributeC
6082360859
void onSuccess(List<ChipStructs.CameraAvStreamManagementClusterSnapshotParamsStruct> value);
6082460860
}
6082560861

60826-
public interface FabricsUsingCameraAttributeCallback extends BaseAttributeCallback {
60862+
public interface SupportedStreamUsagesAttributeCallback extends BaseAttributeCallback {
6082760863
void onSuccess(List<Integer> value);
6082860864
}
6082960865

@@ -61236,30 +61272,30 @@ public void onSuccess(byte[] tlv) {
6123661272
}, HDR_MODE_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval);
6123761273
}
6123861274

61239-
public void readFabricsUsingCameraAttribute(
61240-
FabricsUsingCameraAttributeCallback callback) {
61241-
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRICS_USING_CAMERA_ATTRIBUTE_ID);
61275+
public void readSupportedStreamUsagesAttribute(
61276+
SupportedStreamUsagesAttributeCallback callback) {
61277+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_STREAM_USAGES_ATTRIBUTE_ID);
6124261278

6124361279
readAttribute(new ReportCallbackImpl(callback, path) {
6124461280
@Override
6124561281
public void onSuccess(byte[] tlv) {
6124661282
List<Integer> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
6124761283
callback.onSuccess(value);
6124861284
}
61249-
}, FABRICS_USING_CAMERA_ATTRIBUTE_ID, true);
61285+
}, SUPPORTED_STREAM_USAGES_ATTRIBUTE_ID, true);
6125061286
}
6125161287

61252-
public void subscribeFabricsUsingCameraAttribute(
61253-
FabricsUsingCameraAttributeCallback callback, int minInterval, int maxInterval) {
61254-
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRICS_USING_CAMERA_ATTRIBUTE_ID);
61288+
public void subscribeSupportedStreamUsagesAttribute(
61289+
SupportedStreamUsagesAttributeCallback callback, int minInterval, int maxInterval) {
61290+
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_STREAM_USAGES_ATTRIBUTE_ID);
6125561291

6125661292
subscribeAttribute(new ReportCallbackImpl(callback, path) {
6125761293
@Override
6125861294
public void onSuccess(byte[] tlv) {
6125961295
List<Integer> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
6126061296
callback.onSuccess(value);
6126161297
}
61262-
}, FABRICS_USING_CAMERA_ATTRIBUTE_ID, minInterval, maxInterval);
61298+
}, SUPPORTED_STREAM_USAGES_ATTRIBUTE_ID, minInterval, maxInterval);
6126361299
}
6126461300

6126561301
public void readAllocatedVideoStreamsAttribute(

0 commit comments

Comments
 (0)