Skip to content

Initial implementation of PushAV Stream Transport Cluster #37787

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

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
40fee02
initial implementation of pushav server
sayondeep Feb 26, 2025
7f09b47
Restyled by prettier-json
restyled-commits Feb 27, 2025
558b68e
add push av cluster to camera-app and some fixes
sayondeep Mar 4, 2025
c2ff51c
Address review comments
sayondeep Apr 3, 2025
f25fe39
Check cluster specific code
sayondeep Apr 10, 2025
8f22e90
remove conflict to camera example app
sayondeep Apr 10, 2025
14a243d
Restyled by clang-format
restyled-commits Apr 10, 2025
2e0099b
added delegate implementation in all_clusters_app
sayondeep Apr 17, 2025
d6639a5
Merge branch 'master' into pr/camera/pushav
sayondeep Apr 25, 2025
e92ecc2
Restyled by clang-format
restyled-commits Apr 25, 2025
d26464a
Restyled by prettier-json
restyled-commits Apr 25, 2025
2bf0317
all-clusters-app build fix
sayondeep Apr 25, 2025
e6a2060
Restyled by clang-format
restyled-commits Apr 25, 2025
ece1e97
ci fix to include vector
sayondeep Apr 25, 2025
cba51fa
Merge branch 'master' into pr/camera/pushav
sayondeep Apr 26, 2025
d27306d
update all-cluster-app to spec changes
sayondeep Apr 26, 2025
11f781a
Address review comments
sayondeep Apr 27, 2025
e897d8a
Merge branch 'master' into pr/camera/pushav
sayondeep May 1, 2025
1babf8b
Merge branch 'master' into pr/camera/pushav
sayondeep May 7, 2025
592e3f7
Update to latest spec changes
sayondeep May 14, 2025
69d8bde
Restyled by clang-format
sayondeep May 15, 2025
1fdc586
Restyled by clang-format
restyled-commits May 15, 2025
bb9e053
Address review comments
sayondeep May 20, 2025
978f78e
Merge branch 'master' into pr/camera/pushav
sayondeep May 21, 2025
ebfdc4e
Merge branch 'master' into pr/camera/pushav
sayondeep May 21, 2025
f89a7c6
Merge branch 'master' into pr/camera/pushav
sayondeep May 22, 2025
7473cbf
Merge branch 'master' into pr/camera/pushav
sayondeep May 27, 2025
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
372 changes: 372 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -7403,6 +7403,358 @@ provisional cluster CameraAvSettingsUserLevelManagement = 1362 {
command DPTZRelativeMove(DPTZRelativeMoveRequest): DefaultSuccess = 6;
}

/** This cluster implements the upload of Audio and Video streams from the Push AV Stream Transport Cluster using suitable push-based transports. */
provisional cluster PushAvStreamTransport = 1365 {
revision 1;

enum ContainerFormatEnum : enum8 {
kCMAF = 0 [spec_name = "CMAF"];
}

enum IngestMethodsEnum : enum8 {
kCMAFIngest = 0;
}

enum StatusCodeEnum : enum8 {
kInvalidTLSEndpoint = 2;
kInvalidStream = 3;
kInvalidURL = 4;
kInvalidZone = 5;
kInvalidCombination = 6;
kInvalidTriggerType = 7;
kInvalidTransportStatus = 8;
}

shared enum StreamUsageEnum : enum8 {
kInternal = 0;
kRecording = 1;
kAnalysis = 2;
kLiveView = 3;
}

enum TransportStatusEnum : enum8 {
kActive = 0;
kInactive = 1;
}

enum TransportTriggerTypeEnum : enum8 {
kCommand = 0;
kMotion = 1;
kContinuous = 2;
}

enum TriggerActivationReasonEnum : enum8 {
kUserInitiated = 0;
kAutomation = 1;
kEmergency = 2;
}

bitmap Feature : bitmap32 {
kPerZoneSensitivity = 0x1;
kMetadata = 0x2;
}

struct TransportMotionTriggerTimeControlStruct {
int16u initialDuration = 0;
int16u augmentationDuration = 1;
elapsed_s maxDuration = 2;
int16u blindDuration = 3;
}

struct TransportZoneOptionsStruct {
nullable int16u zone = 0;
optional int8u sensitivity = 1;
}

struct TransportTriggerOptionsStruct {
TransportTriggerTypeEnum triggerType = 0;
optional nullable TransportZoneOptionsStruct motionZones[] = 1;
optional nullable int8u motionSensitivity = 2;
optional TransportMotionTriggerTimeControlStruct motionTimeControl = 3;
optional int16u maxPreRollLen = 4;
}

struct CMAFContainerOptionsStruct {
int16u chunkDuration = 0;
optional octet_string<16> CENCKey = 1;
optional boolean metadataEnabled = 2;
optional octet_string<16> CENCKeyID = 3;
}

struct ContainerOptionsStruct {
ContainerFormatEnum containerType = 0;
optional CMAFContainerOptionsStruct CMAFContainerOptions = 1;
}

struct TransportOptionsStruct {
StreamUsageEnum streamUsage = 0;
optional nullable int16u videoStreamID = 1;
optional nullable int16u audioStreamID = 2;
int16u endpointID = 3;
long_char_string<2000> url = 4;
TransportTriggerOptionsStruct triggerOptions = 5;
IngestMethodsEnum ingestMethod = 6;
ContainerOptionsStruct containerOptions = 7;
optional epoch_s expiryTime = 8;
}

struct TransportConfigurationStruct {
int16u connectionID = 0;
TransportStatusEnum transportStatus = 1;
optional TransportOptionsStruct transportOptions = 2;
}

struct SupportedFormatStruct {
ContainerFormatEnum containerFormat = 0;
IngestMethodsEnum ingestMethod = 1;
}

info event PushTransportBegin = 0 {
int16u connectionID = 0;
TransportTriggerTypeEnum triggerType = 1;
optional TriggerActivationReasonEnum activationReason = 2;
}

info event PushTransportEnd = 1 {
int16u connectionID = 0;
TransportTriggerTypeEnum triggerType = 1;
optional TriggerActivationReasonEnum activationReason = 2;
}

readonly attribute SupportedFormatStruct supportedFormats[] = 0;
readonly attribute TransportConfigurationStruct currentConnections[] = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct AllocatePushTransportRequest {
TransportOptionsStruct transportOptions = 0;
}

response struct AllocatePushTransportResponse = 1 {
TransportConfigurationStruct transportConfiguration = 0;
}

request struct DeallocatePushTransportRequest {
int16u connectionID = 0;
}

request struct ModifyPushTransportRequest {
int16u connectionID = 0;
TransportOptionsStruct transportOptions = 1;
}

request struct SetTransportStatusRequest {
nullable int16u connectionID = 0;
TransportStatusEnum transportStatus = 1;
}

request struct ManuallyTriggerTransportRequest {
int16u connectionID = 0;
TriggerActivationReasonEnum activationReason = 1;
optional TransportMotionTriggerTimeControlStruct timeControl = 2;
}

request struct FindTransportRequest {
optional nullable int16u connectionID = 0;
}

response struct FindTransportResponse = 7 {
TransportConfigurationStruct transportConfigurations[] = 0;
}

/** This command SHALL allocate a transport and return a PushTransportConnectionID. */
fabric command access(invoke: manage) AllocatePushTransport(AllocatePushTransportRequest): AllocatePushTransportResponse = 0;
/** This command SHALL be generated to request the Node deallocates the specified transport. */
fabric command access(invoke: manage) DeallocatePushTransport(DeallocatePushTransportRequest): DefaultSuccess = 2;
/** This command is used to request the Node modifies the configuration of the specified push transport. */
fabric command access(invoke: manage) ModifyPushTransport(ModifyPushTransportRequest): DefaultSuccess = 3;
/** This command SHALL be generated to request the Node modifies the Transport Status of a specified transport or all transports. */
fabric command access(invoke: manage) SetTransportStatus(SetTransportStatusRequest): DefaultSuccess = 4;
/** This command SHALL be generated to request the Node to manually start the specified push transport. */
fabric command ManuallyTriggerTransport(ManuallyTriggerTransportRequest): DefaultSuccess = 5;
/** This command SHALL return the Transport Configuration for the specified push transport or all allocated transports for the fabric if null. */
fabric command FindTransport(FindTransportRequest): FindTransportResponse = 6;
}

/** This cluster implements the upload of Audio and Video streams from the Push AV Stream Transport Cluster using suitable push-based transports. */
provisional cluster PushAvStreamTransport = 1365 {
revision 1;

enum ContainerFormatEnum : enum8 {
kCMAF = 0 [spec_name = "CMAF"];
}

enum IngestMethodsEnum : enum8 {
kCMAFIngest = 0;
}

enum StatusCodeEnum : enum8 {
kInvalidTLSEndpoint = 2;
kInvalidStream = 3;
kInvalidURL = 4;
kInvalidZone = 5;
kInvalidCombination = 6;
kInvalidTriggerType = 7;
kInvalidTransportStatus = 8;
}

shared enum StreamUsageEnum : enum8 {
kInternal = 0;
kRecording = 1;
kAnalysis = 2;
kLiveView = 3;
}

enum TransportStatusEnum : enum8 {
kActive = 0;
kInactive = 1;
}

enum TransportTriggerTypeEnum : enum8 {
kCommand = 0;
kMotion = 1;
kContinuous = 2;
}

enum TriggerActivationReasonEnum : enum8 {
kUserInitiated = 0;
kAutomation = 1;
kEmergency = 2;
}

bitmap Feature : bitmap32 {
kPerZoneSensitivity = 0x1;
kMetadata = 0x2;
}

struct TransportMotionTriggerTimeControlStruct {
int16u initialDuration = 0;
int16u augmentationDuration = 1;
elapsed_s maxDuration = 2;
int16u blindDuration = 3;
}

struct TransportZoneOptionsStruct {
nullable int16u zone = 0;
optional int8u sensitivity = 1;
}

struct TransportTriggerOptionsStruct {
TransportTriggerTypeEnum triggerType = 0;
optional nullable TransportZoneOptionsStruct motionZones[] = 1;
optional nullable int8u motionSensitivity = 2;
optional TransportMotionTriggerTimeControlStruct motionTimeControl = 3;
optional int16u maxPreRollLen = 4;
}

struct CMAFContainerOptionsStruct {
int16u chunkDuration = 0;
optional octet_string<16> CENCKey = 1;
optional boolean metadataEnabled = 2;
optional octet_string<16> CENCKeyID = 3;
}

struct ContainerOptionsStruct {
ContainerFormatEnum containerType = 0;
optional CMAFContainerOptionsStruct CMAFContainerOptions = 1;
}

struct TransportOptionsStruct {
StreamUsageEnum streamUsage = 0;
optional nullable int16u videoStreamID = 1;
optional nullable int16u audioStreamID = 2;
int16u endpointID = 3;
long_char_string<2000> url = 4;
TransportTriggerOptionsStruct triggerOptions = 5;
IngestMethodsEnum ingestMethod = 6;
ContainerOptionsStruct containerOptions = 7;
optional epoch_s expiryTime = 8;
}

struct TransportConfigurationStruct {
int16u connectionID = 0;
TransportStatusEnum transportStatus = 1;
optional TransportOptionsStruct transportOptions = 2;
}

struct SupportedFormatStruct {
ContainerFormatEnum containerFormat = 0;
IngestMethodsEnum ingestMethod = 1;
}

info event PushTransportBegin = 0 {
int16u connectionID = 0;
TransportTriggerTypeEnum triggerType = 1;
optional TriggerActivationReasonEnum activationReason = 2;
}

info event PushTransportEnd = 1 {
int16u connectionID = 0;
TransportTriggerTypeEnum triggerType = 1;
optional TriggerActivationReasonEnum activationReason = 2;
}

readonly attribute SupportedFormatStruct supportedFormats[] = 0;
readonly attribute TransportConfigurationStruct currentConnections[] = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct AllocatePushTransportRequest {
TransportOptionsStruct transportOptions = 0;
}

response struct AllocatePushTransportResponse = 1 {
TransportConfigurationStruct transportConfiguration = 0;
}

request struct DeallocatePushTransportRequest {
int16u connectionID = 0;
}

request struct ModifyPushTransportRequest {
int16u connectionID = 0;
TransportOptionsStruct transportOptions = 1;
}

request struct SetTransportStatusRequest {
nullable int16u connectionID = 0;
TransportStatusEnum transportStatus = 1;
}

request struct ManuallyTriggerTransportRequest {
int16u connectionID = 0;
TriggerActivationReasonEnum activationReason = 1;
optional TransportMotionTriggerTimeControlStruct timeControl = 2;
}

request struct FindTransportRequest {
optional nullable int16u connectionID = 0;
}

response struct FindTransportResponse = 7 {
TransportConfigurationStruct transportConfigurations[] = 0;
}

/** This command SHALL allocate a transport and return a PushTransportConnectionID. */
fabric command access(invoke: manage) AllocatePushTransport(AllocatePushTransportRequest): AllocatePushTransportResponse = 0;
/** This command SHALL be generated to request the Node deallocates the specified transport. */
fabric command access(invoke: manage) DeallocatePushTransport(DeallocatePushTransportRequest): DefaultSuccess = 2;
/** This command is used to request the Node modifies the configuration of the specified push transport. */
fabric command access(invoke: manage) ModifyPushTransport(ModifyPushTransportRequest): DefaultSuccess = 3;
/** This command SHALL be generated to request the Node modifies the Transport Status of a specified transport or all transports. */
fabric command access(invoke: manage) SetTransportStatus(SetTransportStatusRequest): DefaultSuccess = 4;
/** This command SHALL be generated to request the Node to manually start the specified push transport. */
fabric command ManuallyTriggerTransport(ManuallyTriggerTransportRequest): DefaultSuccess = 5;
/** This command SHALL return the Transport Configuration for the specified push transport or all allocated transports for the fabric if null. */
fabric command FindTransport(FindTransportRequest): FindTransportResponse = 6;
}

/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
provisional cluster Chime = 1366 {
revision 1;
Expand Down Expand Up @@ -8502,6 +8854,7 @@ endpoint 1 {
device type ma_onofflight = 256, version 1;

binding cluster OnOff;
binding cluster PushAvStreamTransport;

server cluster Identify {
ram attribute identifyTime default = 0x0000;
Expand Down Expand Up @@ -9768,6 +10121,25 @@ endpoint 1 {
handle command DPTZRelativeMove;
}

server cluster PushAvStreamTransport {
callback attribute supportedFormats;
callback attribute currentConnections;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

handle command AllocatePushTransport;
handle command AllocatePushTransportResponse;
handle command DeallocatePushTransport;
handle command ModifyPushTransport;
handle command SetTransportStatus;
handle command ManuallyTriggerTransport;
handle command FindTransport;
handle command FindTransportResponse;
}

server cluster Chime {
callback attribute installedChimeSounds;
callback attribute selectedChime;
Expand Down
Loading
Loading