Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC cluster XML changes for Spec ballot fixes #37825

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ limitations under the License.
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/WebRTC_Provider.adoc
Parameters: in-progress
Git: 0.7-summer-2025-5-g06c4d5596
Git: 0.7-summer-2025-285-g2a2bd1961
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Cameras"/>
@@ -54,16 +54,15 @@ Git: 0.7-summer-2025-5-g06c4d5596
<item fieldId="4" name="CAID" type="int16u" optional="true"/>
</struct>

<struct name="WebRTCSessionStruct" apiMaturity="provisional">
<struct name="WebRTCSessionStruct" apiMaturity="provisional" isFabricScoped="true">
<cluster code="0x0553"/>
<cluster code="0x0554"/>
<item fieldId="1" name="ID" type="int16u"/>
<item fieldId="2" name="PeerNodeID" type="node_id"/>
<item fieldId="3" name="PeerFabricIndex" type="fabric_idx"/>
<item fieldId="4" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<item fieldId="5" name="VideoStreamID" type="int16u" isNullable="true"/>
<item fieldId="6" name="AudioStreamID" type="int16u" isNullable="true"/>
<item fieldId="7" name="MetadataOptions" type="WebRTCMetadataOptionsBitmap" default="0x00" min="0x00" max="0x01"/>
<item fieldId="3" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<item fieldId="4" name="VideoStreamID" type="int16u" isNullable="true"/>
<item fieldId="5" name="AudioStreamID" type="int16u" isNullable="true"/>
<item fieldId="6" name="MetadataOptions" type="WebRTCMetadataOptionsBitmap" default="0x00" min="0x00" max="0x01"/>
</struct>

<cluster apiMaturity="provisional">
@@ -75,8 +74,11 @@ Git: 0.7-summer-2025-5-g06c4d5596
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="1"/>
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct">CurrentSessions</attribute>
<command code="0x01" source="client" name="SolicitOffer" optional="false" response="SolicitOfferResponse">
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct">
<description>CurrentSessions</description>
<access op="read" privilege="manage"/>
</attribute>
<command code="0x01" source="client" name="SolicitOffer" isFabricScoped="true" optional="false" response="SolicitOfferResponse">
<description>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.</description>
<quality largeMessage="true"/>
<arg id="1" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
@@ -96,7 +98,7 @@ Git: 0.7-summer-2025-5-g06c4d5596
<arg id="4" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
</command>

<command code="0x03" source="client" name="ProvideOffer" optional="false" response="ProvideOfferResponse">
<command code="0x03" source="client" name="ProvideOffer" isFabricScoped="true" optional="false" response="ProvideOfferResponse">
<description>This command allows an SDP Offer to be set and start a new session.</description>
<quality largeMessage="true"/>
<arg id="1" name="WebRTCSessionID" type="int16u" isNullable="true"/>
@@ -117,21 +119,21 @@ Git: 0.7-summer-2025-5-g06c4d5596
<arg id="3" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
</command>

<command code="0x05" source="client" name="ProvideAnswer" optional="false">
<command code="0x05" source="client" name="ProvideAnswer" isFabricScoped="true" optional="false">
<description>This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer.</description>
<quality largeMessage="true"/>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="SDP" type="char_string"/>
</command>

<command code="0x06" source="client" name="ProvideICECandidates" optional="false">
<command code="0x06" source="client" name="ProvideICECandidates" isFabricScoped="true" optional="false">
<description>This command allows for string based https://rfc-editor.org/rfc/rfc8839#section-5.1 generated after the initial Offer / Answer exchange, via a JSEP https://datatracker.ietf.org/doc/html/rfc9429#section-4.1.20 event, a DOM https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectioniceevent event, or other WebRTC compliant implementations, to be added to a session during the gathering phase.</description>
<quality largeMessage="true"/>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="ICECandidates" array="true" type="char_string" minLength="1"/>
</command>

<command code="0x07" source="client" name="EndSession" optional="false">
<command code="0x07" source="client" name="EndSession" isFabricScoped="true" optional="false">
<description>This command instructs the stream provider to end the WebRTC session.</description>
<quality largeMessage="true"/>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ limitations under the License.
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/WebRTC_Requestor.adoc
Parameters: in-progress
Git: 0.7-summer-2025-5-g06c4d5596
Git: 0.7-summer-2025-285-g2a2bd1961
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Cameras"/>
@@ -31,7 +31,10 @@ Git: 0.7-summer-2025-5-g06c4d5596
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="1"/>
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct" default="0">CurrentSessions</attribute>
<attribute code="0x0000" side="server" define="CURRENT_SESSIONS" type="array" entryType="WebRTCSessionStruct" default="0">
<description>CurrentSessions</description>
<access op="read" privilege="administer"/>
</attribute>
<command code="0x01" source="client" name="Offer" optional="false">
<description>This command provides the stream requestor with WebRTC session details.</description>
<quality largeMessage="true"/>
@@ -59,7 +62,7 @@ Git: 0.7-summer-2025-5-g06c4d5596
<description>This command notifies the stream requestor that the provider has ended the WebRTC session.</description>
<quality largeMessage="true"/>
<arg id="1" name="WebRTCSessionID" type="int16u"/>
<arg id="2" name="Reason" type="WebRTCEndReasonEnum" min="0x00" max="0x0B"/>
<arg id="2" name="Reason" type="WebRTCEndReasonEnum" default="0x0B" min="0x00" max="0x0B"/>
</command>

</cluster>
38 changes: 19 additions & 19 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
@@ -10138,17 +10138,17 @@ provisional cluster WebRTCTransportProvider = 1363 {
optional int16u caid = 4;
}

struct WebRTCSessionStruct {
fabric_scoped struct WebRTCSessionStruct {
int16u id = 1;
node_id peerNodeID = 2;
fabric_idx peerFabricIndex = 3;
StreamUsageEnum streamUsage = 4;
nullable int16u videoStreamID = 5;
nullable int16u audioStreamID = 6;
WebRTCMetadataOptionsBitmap metadataOptions = 7;
StreamUsageEnum streamUsage = 3;
nullable int16u videoStreamID = 4;
nullable int16u audioStreamID = 5;
WebRTCMetadataOptionsBitmap metadataOptions = 6;
fabric_idx fabricIndex = 254;
}

readonly attribute WebRTCSessionStruct currentSessions[] = 0;
readonly attribute access(read: manage) WebRTCSessionStruct currentSessions[] = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
@@ -10205,15 +10205,15 @@ provisional cluster WebRTCTransportProvider = 1363 {
}

/** 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. */
command SolicitOffer(SolicitOfferRequest): SolicitOfferResponse = 1;
fabric command SolicitOffer(SolicitOfferRequest): SolicitOfferResponse = 1;
/** This command allows an SDP Offer to be set and start a new session. */
command ProvideOffer(ProvideOfferRequest): ProvideOfferResponse = 3;
fabric command ProvideOffer(ProvideOfferRequest): ProvideOfferResponse = 3;
/** This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer. */
command ProvideAnswer(ProvideAnswerRequest): DefaultSuccess = 5;
fabric command ProvideAnswer(ProvideAnswerRequest): DefaultSuccess = 5;
/** This command allows for string based https://rfc-editor.org/rfc/rfc8839#section-5.1 generated after the initial Offer / Answer exchange, via a JSEP https://datatracker.ietf.org/doc/html/rfc9429#section-4.1.20 event, a DOM https://www.w3.org/TR/webrtc/#dom-rtcpeerconnectioniceevent event, or other WebRTC compliant implementations, to be added to a session during the gathering phase. */
command ProvideICECandidates(ProvideICECandidatesRequest): DefaultSuccess = 6;
fabric command ProvideICECandidates(ProvideICECandidatesRequest): DefaultSuccess = 6;
/** This command instructs the stream provider to end the WebRTC session. */
command EndSession(EndSessionRequest): DefaultSuccess = 7;
fabric command EndSession(EndSessionRequest): DefaultSuccess = 7;
}

/** 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. */
@@ -10253,17 +10253,17 @@ provisional cluster WebRTCTransportRequestor = 1364 {
optional int16u caid = 4;
}

struct WebRTCSessionStruct {
fabric_scoped struct WebRTCSessionStruct {
int16u id = 1;
node_id peerNodeID = 2;
fabric_idx peerFabricIndex = 3;
StreamUsageEnum streamUsage = 4;
nullable int16u videoStreamID = 5;
nullable int16u audioStreamID = 6;
WebRTCMetadataOptionsBitmap metadataOptions = 7;
StreamUsageEnum streamUsage = 3;
nullable int16u videoStreamID = 4;
nullable int16u audioStreamID = 5;
WebRTCMetadataOptionsBitmap metadataOptions = 6;
fabric_idx fabricIndex = 254;
}

readonly attribute WebRTCSessionStruct currentSessions[] = 0;
readonly attribute access(read: administer) WebRTCSessionStruct currentSessions[] = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Original file line number Diff line number Diff line change
@@ -63138,6 +63138,11 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback {

public void readCurrentSessionsAttribute(
CurrentSessionsAttributeCallback callback) {
readCurrentSessionsAttributeWithFabricFilter(callback, true);
}

public void readCurrentSessionsAttributeWithFabricFilter(
CurrentSessionsAttributeCallback callback, boolean isFabricFiltered) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@@ -63146,7 +63151,7 @@ public void onSuccess(byte[] tlv) {
List<ChipStructs.WebRTCTransportProviderClusterWebRTCSessionStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, CURRENT_SESSIONS_ATTRIBUTE_ID, true);
}, CURRENT_SESSIONS_ATTRIBUTE_ID, isFabricFiltered);
}

public void subscribeCurrentSessionsAttribute(
@@ -63466,6 +63471,11 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback {

public void readCurrentSessionsAttribute(
CurrentSessionsAttributeCallback callback) {
readCurrentSessionsAttributeWithFabricFilter(callback, true);
}

public void readCurrentSessionsAttributeWithFabricFilter(
CurrentSessionsAttributeCallback callback, boolean isFabricFiltered) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@@ -63474,7 +63484,7 @@ public void onSuccess(byte[] tlv) {
List<ChipStructs.WebRTCTransportRequestorClusterWebRTCSessionStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, CURRENT_SESSIONS_ATTRIBUTE_ID, true);
}, CURRENT_SESSIONS_ATTRIBUTE_ID, isFabricFiltered);
}

public void subscribeCurrentSessionsAttribute(
Loading
Loading