Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
55 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
281c6ff
Address review comments
sayondeep May 28, 2025
a459df7
Restyled by clang-format
restyled-commits May 28, 2025
890e11f
update all-cluster-app.matter
sayondeep May 28, 2025
b973744
Address Review Comments
sayondeep May 29, 2025
f9d4c73
Restyled by clang-format
restyled-commits May 29, 2025
264e7ea
Merge branch 'master' into pr/camera/pushav
sayondeep May 30, 2025
d4aff26
[ESP32]: Optimize flash usage for all-clusters-app
sayondeep May 30, 2025
8394c3a
zap_generate for updated push_av_stream_transport xml
sayondeep May 30, 2025
763b1ee
Update Push AV server implementation for fabric-scoped transportConfi…
sayondeep May 30, 2025
1da03d3
Address review comments
sayondeep Jun 3, 2025
dd5a8ef
Restyled by clang-format
restyled-commits Jun 3, 2025
2a11c3b
Common method for validation of incoming TransportOpions
sayondeep Jun 4, 2025
4dac2d9
Merge branch 'master' into pr/camera/pushav
sayondeep Jun 12, 2025
7b93e26
Fix CI failure
sayondeep Jun 12, 2025
69bf3ac
Codegen Integration for Push AV Cluster
sayondeep Jun 26, 2025
fe0a198
Restyled by clang-format
restyled-commits Jun 26, 2025
f0c0fd8
Merge branch 'master' into pr/camera/pushav
sayondeep Jun 26, 2025
c2c4a04
Add unit tests for push av
sayondeep Jun 26, 2025
eb4f90d
Restyled by gn
restyled-commits Jun 26, 2025
f25de39
make push av logic type safe
sayondeep Jun 27, 2025
a37853d
update push av cluster unit tests
sayondeep Jun 30, 2025
c756397
Merge branch 'master' into pr/camera/pushav
sayondeep Jun 30, 2025
421822e
Correct namespaces
sayondeep Jul 2, 2025
ee3de07
Update PushAVStreamTransport Storage tests
sayondeep Jul 3, 2025
8c4f86e
Split Storage tests to reduce stack usage
sayondeep Jul 4, 2025
116598b
Merge branch 'master' into pr/camera/pushav
marktrayer Jul 11, 2025
d2cdbe6
Command Handling fixes
sayondeep Jul 18, 2025
974afed
Merge branch 'master' into pr/camera/pushav
sayondeep Jul 20, 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
385 changes: 385 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

Large diffs are not rendered by default.

280 changes: 280 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -21432,6 +21432,286 @@
}
]
},
{
"name": "Push AV Stream Transport",
"code": 1365,
"mfgCode": null,
"define": "PUSH_AV_STREAM_TRANSPORT_CLUSTER",
"side": "client",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "AllocatePushTransport",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "AllocatePushTransportResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "DeallocatePushTransport",
"code": 2,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "ModifyPushTransport",
"code": 3,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "SetTransportStatus",
"code": 4,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "ManuallyTriggerTransport",
"code": 5,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "FindTransport",
"code": 6,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "FindTransportResponse",
"code": 7,
"mfgCode": null,
"source": "server",
"isIncoming": 1,
"isEnabled": 1
}
]
},
{
"name": "Push AV Stream Transport",
"code": 1365,
"mfgCode": null,
"define": "PUSH_AV_STREAM_TRANSPORT_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "AllocatePushTransport",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "AllocatePushTransportResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "DeallocatePushTransport",
"code": 2,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "ModifyPushTransport",
"code": 3,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SetTransportStatus",
"code": 4,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "ManuallyTriggerTransport",
"code": 5,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "FindTransport",
"code": 6,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "FindTransportResponse",
"code": 7,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
}
],
"attributes": [
{
"name": "SupportedContainerFormats",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "SupportedContainerFormatsBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportedIngestMethods",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "SupportedIngestMethodsBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CurrentConnections",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Chime",
"code": 1366,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
*
* Copyright (c) 2025 Project CHIP Authors
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include <app/clusters/push-av-stream-transport-server/push-av-stream-transport-server.h>
#include <app/util/config.h>
#include <vector>

namespace chip {
namespace app {
namespace Clusters {
namespace PushAvStreamTransport {

struct PushAvStream
{
uint16_t id;
TransportConfigurationStruct transportConfig;
PushAvStreamTransportStatusEnum status;
};

/**
* The application delegate to define the options & implement commands.
*/
class PushAvStreamTransportManager : public PushAvStreamTransportDelegate
{
public:
Protocols::InteractionModel::Status AllocatePushTransport(const TransportOptionsDecodeableStruct & transportOptions,
TransportConfigurationStruct & outTransporConfiguration);
Protocols::InteractionModel::Status DeallocatePushTransport(const uint16_t connectionID);
Protocols::InteractionModel::Status ModifyPushTransport(const uint16_t connectionID,
const TransportOptionsDecodeableStruct & transportOptions);
Protocols::InteractionModel::Status SetTransportStatus(const std::vector<uint16_t> connectionIDList,
TransportStatusEnum transportStatus);

Protocols::InteractionModel::Status
ManuallyTriggerTransport(const uint16_t connectionID, TriggerActivationReasonEnum activationReason,
const Optional<Structs::TransportMotionTriggerTimeControlStruct::DecodableType> & timeControl);
Protocols::InteractionModel::Status FindTransport(const Optional<DataModel::Nullable<uint16_t>> & connectionID);

CHIP_ERROR ValidateStreamUsage(StreamUsageEnum streamUsage, const Optional<DataModel::Nullable<uint16_t>> & videoStreamId,
const Optional<DataModel::Nullable<uint16_t>> & audioStreamId);
CHIP_ERROR ValidateBandwidthLimit(StreamUsageEnum streamUsage, const Optional<DataModel::Nullable<uint16_t>> & videoStreamId,
const Optional<DataModel::Nullable<uint16_t>> & audioStreamId);
PushAvStreamTransportStatusEnum GetTransportStatus(const uint16_t connectionID);

void OnAttributeChanged(AttributeId attributeId);
CHIP_ERROR LoadCurrentConnections(std::vector<TransportConfigurationStructWithFabricIndex> & currentConnections);
CHIP_ERROR PersistentAttributesLoadedCallback();

void Init();
PushAvStreamTransportManager() = default;

~PushAvStreamTransportManager() = default;

private:
std::vector<PushAvStream> pushavStreams;
std::vector<TransportConfigurationStruct> configList;
};

} // namespace PushAvStreamTransport
} // namespace Clusters
} // namespace app
} // namespace chip
Loading
Loading