Skip to content

Commit

Permalink
Camera AVStreamMgmt xml updates (#36133)
Browse files Browse the repository at this point in the history
* Incorporate Spec modifications into the Camera AVStreamManagement Cluster xml.

Name changes to Max content buffer size and On screen display names.
Adjust constraints for Min and Max fragment len.

* Corresponding ZAP Autogen code changes.
  • Loading branch information
pidarped authored and pull[bot] committed Nov 11, 2024
1 parent e89d1fb commit 3943bf8
Show file tree
Hide file tree
Showing 26 changed files with 94 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: 0.9-fall2024-387-gfd3062545
Git: 0.9-fall2024-411-g9835b5cd7
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="General"/>
Expand Down Expand Up @@ -127,8 +127,8 @@ Git: 0.9-fall2024-387-gfd3062545
<item fieldId="6" name="MaxResolution" type="VideoResolutionStruct"/>
<item fieldId="7" name="MinBitRate" type="int32u" min="1"/>
<item fieldId="8" name="MaxBitRate" type="int32u" min="1"/>
<item fieldId="9" name="MinFragmentLen" type="int16u" default="4000" min="0" max="65500"/>
<item fieldId="10" name="MaxFragmentLen" type="int16u" default="4000" min="0" max="65500"/>
<item fieldId="9" name="MinFragmentLen" type="int16u" default="4000" max="65500"/>
<item fieldId="10" name="MaxFragmentLen" type="int16u" default="4000" max="65500"/>
<item fieldId="11" name="WatermarkEnabled" type="boolean" optional="true" default="0"/>
<item fieldId="12" name="OSDEnabled" type="boolean" optional="true" default="0"/>
<item fieldId="13" name="ReferenceCount" type="int8u" default="0"/>
Expand All @@ -143,8 +143,8 @@ Git: 0.9-fall2024-387-gfd3062545
<item fieldId="3" name="Y2" type="int16u" default="0"/>
</struct>

<cluster>
<domain name="General"/>
<cluster apiMaturity="provisional">
<domain name="Cameras"/>
<name>Camera AV Stream Management</name>
<code>0x0551</code>
<define>CAMERA_AV_STREAM_MANAGEMENT_CLUSTER</define>
Expand Down Expand Up @@ -172,7 +172,7 @@ Git: 0.9-fall2024-387-gfd3062545
<feature bit="6" code="WMARK" name="Watermark" summary="Watermark supported">
<optionalConform/>
</feature>
<feature bit="7" code="OSD" name="On-Screen Display" summary="OSD supported">
<feature bit="7" code="OSD" name="OnScreenDisplay" summary="OSD supported">
<optionalConform/>
</feature>
<feature bit="8" code="STOR" name="LocalStorage" summary="Local Storage available">
Expand All @@ -187,7 +187,7 @@ Git: 0.9-fall2024-387-gfd3062545
<attribute code="0x0003" side="server" define="NIGHT_VISION_CAPABLE" type="boolean" reportable="true" optional="true">NightVisionCapable</attribute>
<attribute code="0x0004" side="server" define="MIN_VIEWPORT" type="VideoResolutionStruct" reportable="true" optional="true">MinViewport</attribute>
<attribute code="0x0005" side="server" define="RATE_DISTORTION_TRADE_OFF_POINTS" type="array" entryType="RateDistortionTradeOffPointsStruct" reportable="true" optional="true">RateDistortionTradeOffPoints</attribute>
<attribute code="0x0006" side="server" define="MAX_PRE_ROLL_BUFFER_SIZE" type="int32u" reportable="true" optional="true">MaxPreRollBufferSize</attribute>
<attribute code="0x0006" side="server" define="MAX_CONTENT_BUFFER_SIZE" type="int32u" reportable="true" optional="true">MaxContentBufferSize</attribute>
<attribute code="0x0007" side="server" define="MICROPHONE_CAPABILITIES" type="AudioCapabilitiesStruct" reportable="true" optional="true">MicrophoneCapabilities</attribute>
<attribute code="0x0008" side="server" define="SPEAKER_CAPABILITIES" type="AudioCapabilitiesStruct" reportable="true" optional="true">SpeakerCapabilities</attribute>
<attribute code="0x0009" side="server" define="TWO_WAY_TALK_SUPPORT" type="TwoWayTalkSupportTypeEnum" reportable="true" min="0x00" max="0x02" optional="true">TwoWayTalkSupport</attribute>
Expand Down Expand Up @@ -345,8 +345,8 @@ Git: 0.9-fall2024-387-gfd3062545
<arg id="6" name="MaxResolution" type="VideoResolutionStruct"/>
<arg id="7" name="MinBitRate" type="int32u" min="1"/>
<arg id="8" name="MaxBitRate" type="int32u" min="1"/>
<arg id="9" name="MinFragmentLen" type="int16u" default="4000" min="0" max="65500"/>
<arg id="10" name="MaxFragmentLen" type="int16u" default="4000" min="0" max="65500"/>
<arg id="9" name="MinFragmentLen" type="int16u" default="4000" max="65500"/>
<arg id="10" name="MaxFragmentLen" type="int16u" default="4000" max="65500"/>
<arg id="11" name="WatermarkEnabled" type="boolean" optional="true" default="0"/>
<arg id="12" name="OSDEnabled" type="boolean" optional="true" default="0"/>
</command>
Expand Down Expand Up @@ -447,8 +447,8 @@ Git: 0.9-fall2024-387-gfd3062545
<field id="6" name="MaxResolution" type="VideoResolutionStruct" optional="true"/>
<field id="7" name="MinBitRate" type="int32u" optional="true" min="1"/>
<field id="8" name="MaxBitRate" type="int32u" optional="true" min="1"/>
<field id="9" name="MinFragmentLen" type="int16u" optional="true" min="0" max="65500"/>
<field id="10" name="MaxFragmentLen" type="int16u" optional="true" min="0" max="65500"/>
<field id="9" name="MinFragmentLen" type="int16u" optional="true" max="65500"/>
<field id="10" name="MaxFragmentLen" type="int16u" optional="true" max="65500"/>
<description>This event SHALL be generated when there is a modification in the corresponding video stream.</description>
</event>

Expand Down
4 changes: 2 additions & 2 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -9527,7 +9527,7 @@ provisional cluster ZoneManagement = 1360 {
}

/** 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. */
cluster CameraAvStreamManagement = 1361 {
provisional cluster CameraAvStreamManagement = 1361 {
revision 1;

enum AudioCodecEnum : enum8 {
Expand Down Expand Up @@ -9695,7 +9695,7 @@ cluster CameraAvStreamManagement = 1361 {
readonly attribute optional boolean nightVisionCapable = 3;
readonly attribute optional VideoResolutionStruct minViewport = 4;
readonly attribute optional RateDistortionTradeOffPointsStruct rateDistortionTradeOffPoints[] = 5;
readonly attribute optional int32u maxPreRollBufferSize = 6;
readonly attribute optional int32u maxContentBufferSize = 6;
readonly attribute optional AudioCapabilitiesStruct microphoneCapabilities = 7;
readonly attribute optional AudioCapabilitiesStruct speakerCapabilities = 8;
readonly attribute optional TwoWayTalkSupportTypeEnum twoWayTalkSupport = 9;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59730,7 +59730,7 @@ public static class CameraAvStreamManagementCluster extends BaseChipCluster {
private static final long NIGHT_VISION_CAPABLE_ATTRIBUTE_ID = 3L;
private static final long MIN_VIEWPORT_ATTRIBUTE_ID = 4L;
private static final long RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID = 5L;
private static final long MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID = 6L;
private static final long MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID = 6L;
private static final long MICROPHONE_CAPABILITIES_ATTRIBUTE_ID = 7L;
private static final long SPEAKER_CAPABILITIES_ATTRIBUTE_ID = 8L;
private static final long TWO_WAY_TALK_SUPPORT_ATTRIBUTE_ID = 9L;
Expand Down Expand Up @@ -60418,30 +60418,30 @@ public void onSuccess(byte[] tlv) {
}, RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readMaxPreRollBufferSizeAttribute(
public void readMaxContentBufferSizeAttribute(
LongAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID, true);
}, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID, true);
}

public void subscribeMaxPreRollBufferSizeAttribute(
public void subscribeMaxContentBufferSizeAttribute(
LongAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID);
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID, minInterval, maxInterval);
}, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID, minInterval, maxInterval);
}

public void readMicrophoneCapabilitiesAttribute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17079,7 +17079,7 @@ public enum Attribute {
NightVisionCapable(3L),
MinViewport(4L),
RateDistortionTradeOffPoints(5L),
MaxPreRollBufferSize(6L),
MaxContentBufferSize(6L),
MicrophoneCapabilities(7L),
SpeakerCapabilities(8L),
TwoWayTalkSupport(9L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18340,17 +18340,17 @@ private static Map<String, InteractionInfo> readCameraAvStreamManagementInteract
readCameraAvStreamManagementRateDistortionTradeOffPointsCommandParams
);
result.put("readRateDistortionTradeOffPointsAttribute", readCameraAvStreamManagementRateDistortionTradeOffPointsAttributeInteractionInfo);
Map<String, CommandParameterInfo> readCameraAvStreamManagementMaxPreRollBufferSizeCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readCameraAvStreamManagementMaxPreRollBufferSizeAttributeInteractionInfo = new InteractionInfo(
Map<String, CommandParameterInfo> readCameraAvStreamManagementMaxContentBufferSizeCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readCameraAvStreamManagementMaxContentBufferSizeAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxPreRollBufferSizeAttribute(
((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxContentBufferSizeAttribute(
(ChipClusters.LongAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
readCameraAvStreamManagementMaxPreRollBufferSizeCommandParams
readCameraAvStreamManagementMaxContentBufferSizeCommandParams
);
result.put("readMaxPreRollBufferSizeAttribute", readCameraAvStreamManagementMaxPreRollBufferSizeAttributeInteractionInfo);
result.put("readMaxContentBufferSizeAttribute", readCameraAvStreamManagementMaxContentBufferSizeAttributeInteractionInfo);
Map<String, CommandParameterInfo> readCameraAvStreamManagementTwoWayTalkSupportCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readCameraAvStreamManagementTwoWayTalkSupportAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ class CameraAvStreamManagementCluster(
}
}

suspend fun readMaxPreRollBufferSizeAttribute(): UInt? {
suspend fun readMaxContentBufferSizeAttribute(): UInt? {
val ATTRIBUTE_ID: UInt = 6u

val attributePath =
Expand All @@ -1349,7 +1349,7 @@ class CameraAvStreamManagementCluster(
it.path.attributeId == ATTRIBUTE_ID
}

requireNotNull(attributeData) { "Maxprerollbuffersize attribute not found in response" }
requireNotNull(attributeData) { "Maxcontentbuffersize attribute not found in response" }

// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
Expand All @@ -1363,7 +1363,7 @@ class CameraAvStreamManagementCluster(
return decodedValue
}

suspend fun subscribeMaxPreRollBufferSizeAttribute(
suspend fun subscribeMaxContentBufferSizeAttribute(
minInterval: Int,
maxInterval: Int,
): Flow<UIntSubscriptionState> {
Expand Down Expand Up @@ -1399,7 +1399,7 @@ class CameraAvStreamManagementCluster(
.firstOrNull { it.path.attributeId == ATTRIBUTE_ID }

requireNotNull(attributeData) {
"Maxprerollbuffersize attribute not found in Node State update"
"Maxcontentbuffersize attribute not found in Node State update"
}

// Decode the TLV data into the appropriate type
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/controller/python/chip/clusters/CHIPClusters.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3943bf8

Please sign in to comment.