Skip to content

Commit

Permalink
XML and SDK changes corresponding to Spec updates for CameraAVStreamM…
Browse files Browse the repository at this point in the history
…anagement cluster.
  • Loading branch information
pidarped committed Dec 23, 2024
1 parent af336ec commit fa45b40
Show file tree
Hide file tree
Showing 45 changed files with 690 additions and 623 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: 1.3-3830-g1f08d6f40
Git: 1.4-446-g4a179b5f4
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Cameras"/>
Expand Down Expand Up @@ -66,7 +66,7 @@ Git: 1.3-3830-g1f08d6f40
<struct name="AudioStreamStruct" apiMaturity="provisional">
<cluster code="0x0551"/>
<item fieldId="0" name="AudioStreamID" type="int16u"/>
<item fieldId="1" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<item fieldId="1" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<item fieldId="2" name="AudioCodec" type="AudioCodecEnum" min="0x00" max="0x01"/>
<item fieldId="3" name="ChannelCount" type="int8u" min="1" max="8"/>
<item fieldId="4" name="SampleRate" type="int32u" min="1"/>
Expand Down Expand Up @@ -119,7 +119,7 @@ Git: 1.3-3830-g1f08d6f40
<struct name="VideoStreamStruct" apiMaturity="provisional">
<cluster code="0x0551"/>
<item fieldId="0" name="VideoStreamID" type="int16u"/>
<item fieldId="1" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<item fieldId="1" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<item fieldId="2" name="VideoCodec" type="VideoCodecEnum" min="0x00" max="0x03"/>
<item fieldId="3" name="MinFrameRate" type="int16u" min="1"/>
<item fieldId="4" name="MaxFrameRate" type="int16u" min="1"/>
Expand Down Expand Up @@ -258,7 +258,7 @@ Git: 1.3-3830-g1f08d6f40
<feature name="SNP"/>
</mandatoryConform>
</attribute>
<attribute code="0x0012" side="server" define="RANKED_VIDEO_STREAM_PRIORITIES_LIST" type="array" entryType="StreamTypeEnum" optional="true">
<attribute code="0x0012" side="server" define="RANKED_VIDEO_STREAM_PRIORITIES_LIST" type="array" entryType="StreamUsageEnum" optional="true">
<description>RankedVideoStreamPrioritiesList</description>
<mandatoryConform>
<feature name="VDO"/>
Expand Down Expand Up @@ -451,7 +451,7 @@ Git: 1.3-3830-g1f08d6f40
<command code="0x00" source="client" name="AudioStreamAllocate" optional="true" response="AudioStreamAllocateResponse">
<description>This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier.</description>
<access op="invoke" privilege="manage"/>
<arg id="0" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<arg id="0" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<arg id="1" name="AudioCodec" type="AudioCodecEnum" min="0x00" max="0x01"/>
<arg id="2" name="ChannelCount" type="int8u" default="1" min="1" max="8"/>
<arg id="3" name="SampleRate" type="int32u" min="1"/>
Expand Down Expand Up @@ -482,7 +482,7 @@ Git: 1.3-3830-g1f08d6f40
<command code="0x03" source="client" name="VideoStreamAllocate" optional="true" response="VideoStreamAllocateResponse">
<description>This command SHALL allocate a video stream on the camera and return an allocated video stream identifier.</description>
<access op="invoke" privilege="manage"/>
<arg id="1" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<arg id="1" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<arg id="2" name="VideoCodec" type="VideoCodecEnum" min="0x00" max="0x03"/>
<arg id="3" name="MinFrameRate" type="int16u" min="1"/>
<arg id="4" name="MaxFrameRate" type="int16u" min="1"/>
Expand Down Expand Up @@ -511,11 +511,16 @@ Git: 1.3-3830-g1f08d6f40
<description>This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID.</description>
<access op="invoke" privilege="manage"/>
<arg id="0" name="VideoStreamID" type="int16u"/>
<arg id="1" name="Resolution" type="VideoResolutionStruct" optional="true"/>
<arg id="2" name="WatermarkEnabled" type="boolean" optional="true"/>
<arg id="3" name="OSDEnabled" type="boolean" optional="true"/>
<arg id="1" name="WatermarkEnabled" type="boolean" optional="true"/>
<arg id="2" name="OSDEnabled" type="boolean" optional="true"/>
<mandatoryConform>
<feature name="VDO"/>
<andTerm>
<feature name="VDO"/>
<orTerm>
<feature name="WMARK"/>
<feature name="OSD"/>
</orTerm>
</andTerm>
</mandatoryConform>
</command>

Expand Down Expand Up @@ -560,12 +565,12 @@ Git: 1.3-3830-g1f08d6f40
</command>

<command code="0x0A" source="client" name="SetStreamPriorities" optional="false">
<description>This command SHALL set the relative priorities of the various stream types on the camera.</description>
<description>This command SHALL set the relative priorities of the various stream usages on the camera.</description>
<access op="invoke" privilege="administer"/>
<arg id="0" name="StreamPriorities" array="true" type="StreamTypeEnum"/>
<arg id="0" name="StreamPriorities" array="true" type="StreamUsageEnum"/>
</command>

<command code="0x0B" source="client" name="CaptureSnapshot" optional="true">
<command code="0x0B" source="client" name="CaptureSnapshot" optional="true" response="CaptureSnapshotResponse">
<description>This command SHALL return a Snapshot from the camera.</description>
<quality largeMessage="true"/>
<arg id="0" name="SnapshotStreamID" type="int16u"/>
Expand All @@ -588,7 +593,7 @@ Git: 1.3-3830-g1f08d6f40

<event code="0x0000" name="VideoStreamChanged" priority="info" side="server" optional="true">
<field id="0" name="VideoStreamID" type="int16u"/>
<field id="1" name="StreamType" type="StreamTypeEnum" optional="true" min="0x00" max="0x03"/>
<field id="1" name="StreamUsage" type="StreamUsageEnum" optional="true" min="0x00" max="0x03"/>
<field id="2" name="VideoCodec" type="VideoCodecEnum" optional="true" min="0x00" max="0x03"/>
<field id="3" name="MinFrameRate" type="int16u" optional="true" min="1"/>
<field id="4" name="MaxFrameRate" type="int16u" optional="true" min="1"/>
Expand All @@ -606,7 +611,7 @@ Git: 1.3-3830-g1f08d6f40

<event code="0x0001" name="AudioStreamChanged" priority="info" side="server" optional="true">
<field id="0" name="AudioStreamID" type="int16u"/>
<field id="1" name="StreamType" type="StreamTypeEnum" optional="true" min="0x00" max="0x03"/>
<field id="1" name="StreamUsage" type="StreamUsageEnum" optional="true" min="0x00" max="0x03"/>
<field id="2" name="AudioCodec" type="AudioCodecEnum" optional="true" min="0x00" max="0x01"/>
<field id="3" name="ChannelCount" type="int8u" optional="true" min="1" max="8"/>
<field id="4" name="SampleRate" type="int32u" optional="true" min="1"/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap-templates/zcl/data-model/chip/global-enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TODO: Make these structures global rather than defining them for each cluster.
<item name="Automatic" value="0x03"/>
</enum>

<enum name="StreamTypeEnum" type="enum8">
<enum name="StreamUsageEnum" type="enum8">
<cluster code="0x0551"/>
<cluster code="0x0553"/>
<cluster code="0x0554"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Git: 0.9-fall2024-234-gf4d359001
<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="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<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="WebRTCMetadataOptions" default="0x00" min="0x00" max="0x01"/>
Expand All @@ -79,7 +79,7 @@ Git: 0.9-fall2024-234-gf4d359001
<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">
<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>
<arg id="1" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<arg id="1" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<arg id="2" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="3" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="4" name="ICEServers" array="true" type="ICEServerStruct" optional="true"/>
Expand All @@ -99,7 +99,7 @@ Git: 0.9-fall2024-234-gf4d359001
<description>This command allows an SDP Offer to be set and start a new session.</description>
<arg id="1" name="WebRTCSessionID" type="int16u" isNullable="true"/>
<arg id="2" name="SDP" type="char_string"/>
<arg id="3" name="StreamType" type="StreamTypeEnum" min="0x00" max="0x03"/>
<arg id="3" name="StreamUsage" type="StreamUsageEnum" min="0x00" max="0x03"/>
<arg id="4" name="VideoStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="5" name="AudioStreamID" type="int16u" optional="true" isNullable="true"/>
<arg id="6" name="ICEServers" array="true" type="ICEServerStruct" optional="true"/>
Expand Down
39 changes: 19 additions & 20 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -9541,7 +9541,7 @@ provisional cluster CameraAvStreamManagement = 1361 {
kJPEG = 0;
}

enum StreamTypeEnum : enum8 {
enum StreamUsageEnum : enum8 {
kInternal = 0;
kRecording = 1;
kAnalysis = 2;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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 {
Expand All @@ -9804,7 +9803,7 @@ provisional cluster CameraAvStreamManagement = 1361 {
}

request struct SetStreamPrioritiesRequest {
StreamTypeEnum streamPriorities[] = 0;
StreamUsageEnum streamPriorities[] = 0;
}

request struct CaptureSnapshotRequest {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit fa45b40

Please sign in to comment.