Skip to content

Commit 1c15ac6

Browse files
authored
Merge branch 'master' into feature/closure_control_cluster_update_xml_with_latest_spec
2 parents b8d125c + 5adee57 commit 1c15ac6

File tree

14 files changed

+1277
-355
lines changed

14 files changed

+1277
-355
lines changed

BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
394394
enable_linux_rvc_app_build =
395395
enable_default_builds && (host_os == "linux" || host_os == "mac")
396396

397+
# TODO: #37983: Add darwin support for libdatachannel and then add host_os == "mac" here.
397398
# Build the Linux Camera app example.
398-
enable_linux_camera_app_build =
399-
enable_default_builds && (host_os == "linux" || host_os == "mac")
399+
enable_linux_camera_app_build = enable_default_builds && host_os == "linux"
400400

401401
# Build the cc13x2x7_26x2x7 lock app example.
402402
enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds

examples/camera-app/camera-common/camera-app.matter

+132
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,121 @@ cluster UserLabel = 65 {
21192119
readonly attribute int16u clusterRevision = 65533;
21202120
}
21212121

2122+
/** The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. */
2123+
provisional cluster WebRTCTransportProvider = 1363 {
2124+
revision 1;
2125+
2126+
enum StreamUsageEnum : enum8 {
2127+
kInternal = 0;
2128+
kRecording = 1;
2129+
kAnalysis = 2;
2130+
kLiveView = 3;
2131+
}
2132+
2133+
enum WebRTCEndReasonEnum : enum8 {
2134+
kIceFailed = 0;
2135+
kIceTimeout = 1;
2136+
kUserHangup = 2;
2137+
kUserBusy = 3;
2138+
kReplaced = 4;
2139+
kNoUserMedia = 5;
2140+
kInviteTimeout = 6;
2141+
kAnsweredElsewhere = 7;
2142+
kOutOfResources = 8;
2143+
kMediaTimeout = 9;
2144+
kLowPower = 10;
2145+
kUnknownReason = 11;
2146+
}
2147+
2148+
bitmap WebRTCMetadataOptionsBitmap : bitmap8 {
2149+
kDataTLV = 0x1;
2150+
}
2151+
2152+
struct ICEServerStruct {
2153+
char_string urls[] = 1;
2154+
optional char_string username = 2;
2155+
optional char_string credential = 3;
2156+
optional int16u caid = 4;
2157+
}
2158+
2159+
fabric_scoped struct WebRTCSessionStruct {
2160+
int16u id = 1;
2161+
node_id peerNodeID = 2;
2162+
StreamUsageEnum streamUsage = 3;
2163+
nullable int16u videoStreamID = 4;
2164+
nullable int16u audioStreamID = 5;
2165+
WebRTCMetadataOptionsBitmap metadataOptions = 6;
2166+
fabric_idx fabricIndex = 254;
2167+
}
2168+
2169+
readonly attribute access(read: manage) WebRTCSessionStruct currentSessions[] = 0;
2170+
readonly attribute command_id generatedCommandList[] = 65528;
2171+
readonly attribute command_id acceptedCommandList[] = 65529;
2172+
readonly attribute event_id eventList[] = 65530;
2173+
readonly attribute attrib_id attributeList[] = 65531;
2174+
readonly attribute bitmap32 featureMap = 65532;
2175+
readonly attribute int16u clusterRevision = 65533;
2176+
2177+
request struct SolicitOfferRequest {
2178+
StreamUsageEnum streamUsage = 0;
2179+
optional nullable int16u videoStreamID = 1;
2180+
optional nullable int16u audioStreamID = 2;
2181+
optional ICEServerStruct ICEServers[] = 3;
2182+
optional char_string ICETransportPolicy = 4;
2183+
optional WebRTCMetadataOptionsBitmap metadataOptions = 5;
2184+
}
2185+
2186+
response struct SolicitOfferResponse = 2 {
2187+
int16u webRTCSessionID = 0;
2188+
boolean deferredOffer = 1;
2189+
optional nullable int16u videoStreamID = 2;
2190+
optional nullable int16u audioStreamID = 3;
2191+
}
2192+
2193+
request struct ProvideOfferRequest {
2194+
nullable int16u webRTCSessionID = 0;
2195+
char_string sdp = 1;
2196+
StreamUsageEnum streamUsage = 2;
2197+
optional nullable int16u videoStreamID = 3;
2198+
optional nullable int16u audioStreamID = 4;
2199+
optional ICEServerStruct ICEServers[] = 5;
2200+
optional char_string ICETransportPolicy = 6;
2201+
optional WebRTCMetadataOptionsBitmap metadataOptions = 7;
2202+
}
2203+
2204+
response struct ProvideOfferResponse = 4 {
2205+
int16u webRTCSessionID = 0;
2206+
optional nullable int16u videoStreamID = 1;
2207+
optional nullable int16u audioStreamID = 2;
2208+
}
2209+
2210+
request struct ProvideAnswerRequest {
2211+
int16u webRTCSessionID = 0;
2212+
char_string sdp = 1;
2213+
}
2214+
2215+
request struct ProvideICECandidatesRequest {
2216+
int16u webRTCSessionID = 0;
2217+
char_string ICECandidates[] = 1;
2218+
}
2219+
2220+
request struct EndSessionRequest {
2221+
int16u webRTCSessionID = 0;
2222+
WebRTCEndReasonEnum reason = 1;
2223+
}
2224+
2225+
/** 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. */
2226+
fabric command SolicitOffer(SolicitOfferRequest): SolicitOfferResponse = 1;
2227+
/** This command allows an SDP Offer to be set and start a new session. */
2228+
fabric command ProvideOffer(ProvideOfferRequest): ProvideOfferResponse = 3;
2229+
/** This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer. */
2230+
fabric command ProvideAnswer(ProvideAnswerRequest): DefaultSuccess = 5;
2231+
/** 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. */
2232+
fabric command ProvideICECandidates(ProvideICECandidatesRequest): DefaultSuccess = 6;
2233+
/** This command instructs the stream provider to end the WebRTC session. */
2234+
fabric command EndSession(EndSessionRequest): DefaultSuccess = 7;
2235+
}
2236+
21222237
/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
21232238
provisional cluster Chime = 1366 {
21242239
revision 1;
@@ -2581,6 +2696,23 @@ endpoint 1 {
25812696
handle command SetDefaultNTP;
25822697
}
25832698

2699+
server cluster WebRTCTransportProvider {
2700+
callback attribute currentSessions;
2701+
callback attribute generatedCommandList;
2702+
callback attribute acceptedCommandList;
2703+
callback attribute attributeList;
2704+
ram attribute featureMap default = 0;
2705+
ram attribute clusterRevision default = 1;
2706+
2707+
handle command SolicitOffer;
2708+
handle command SolicitOfferResponse;
2709+
handle command ProvideOffer;
2710+
handle command ProvideOfferResponse;
2711+
handle command ProvideAnswer;
2712+
handle command ProvideICECandidates;
2713+
handle command EndSession;
2714+
}
2715+
25842716
server cluster Chime {
25852717
callback attribute installedChimeSounds;
25862718
callback attribute selectedChime;

examples/camera-app/camera-common/camera-app.zap

+172-7
Original file line numberDiff line numberDiff line change
@@ -4619,7 +4619,7 @@
46194619
"deviceIdentifiers": [
46204620
322
46214621
],
4622-
"deviceTypeName": "MA-rootdevice",
4622+
"deviceTypeName": "MA-camera",
46234623
"deviceTypeCode": 322,
46244624
"deviceTypeProfileId": 259,
46254625
"clusters": [
@@ -5293,6 +5293,171 @@
52935293
}
52945294
]
52955295
},
5296+
{
5297+
"name": "WebRTC Transport Provider",
5298+
"code": 1363,
5299+
"mfgCode": null,
5300+
"define": "WEB_RTC_TRANSPORT_PROVIDER_CLUSTER",
5301+
"side": "server",
5302+
"enabled": 1,
5303+
"apiMaturity": "provisional",
5304+
"commands": [
5305+
{
5306+
"name": "SolicitOffer",
5307+
"code": 1,
5308+
"mfgCode": null,
5309+
"source": "client",
5310+
"isIncoming": 1,
5311+
"isEnabled": 1
5312+
},
5313+
{
5314+
"name": "SolicitOfferResponse",
5315+
"code": 2,
5316+
"mfgCode": null,
5317+
"source": "server",
5318+
"isIncoming": 0,
5319+
"isEnabled": 1
5320+
},
5321+
{
5322+
"name": "ProvideOffer",
5323+
"code": 3,
5324+
"mfgCode": null,
5325+
"source": "client",
5326+
"isIncoming": 1,
5327+
"isEnabled": 1
5328+
},
5329+
{
5330+
"name": "ProvideOfferResponse",
5331+
"code": 4,
5332+
"mfgCode": null,
5333+
"source": "server",
5334+
"isIncoming": 0,
5335+
"isEnabled": 1
5336+
},
5337+
{
5338+
"name": "ProvideAnswer",
5339+
"code": 5,
5340+
"mfgCode": null,
5341+
"source": "client",
5342+
"isIncoming": 1,
5343+
"isEnabled": 1
5344+
},
5345+
{
5346+
"name": "ProvideICECandidates",
5347+
"code": 6,
5348+
"mfgCode": null,
5349+
"source": "client",
5350+
"isIncoming": 1,
5351+
"isEnabled": 1
5352+
},
5353+
{
5354+
"name": "EndSession",
5355+
"code": 7,
5356+
"mfgCode": null,
5357+
"source": "client",
5358+
"isIncoming": 1,
5359+
"isEnabled": 1
5360+
}
5361+
],
5362+
"attributes": [
5363+
{
5364+
"name": "CurrentSessions",
5365+
"code": 0,
5366+
"mfgCode": null,
5367+
"side": "server",
5368+
"type": "array",
5369+
"included": 1,
5370+
"storageOption": "External",
5371+
"singleton": 0,
5372+
"bounded": 0,
5373+
"defaultValue": "",
5374+
"reportable": 1,
5375+
"minInterval": 1,
5376+
"maxInterval": 65534,
5377+
"reportableChange": 0
5378+
},
5379+
{
5380+
"name": "GeneratedCommandList",
5381+
"code": 65528,
5382+
"mfgCode": null,
5383+
"side": "server",
5384+
"type": "array",
5385+
"included": 1,
5386+
"storageOption": "External",
5387+
"singleton": 0,
5388+
"bounded": 0,
5389+
"defaultValue": "",
5390+
"reportable": 1,
5391+
"minInterval": 1,
5392+
"maxInterval": 65534,
5393+
"reportableChange": 0
5394+
},
5395+
{
5396+
"name": "AcceptedCommandList",
5397+
"code": 65529,
5398+
"mfgCode": null,
5399+
"side": "server",
5400+
"type": "array",
5401+
"included": 1,
5402+
"storageOption": "External",
5403+
"singleton": 0,
5404+
"bounded": 0,
5405+
"defaultValue": "",
5406+
"reportable": 1,
5407+
"minInterval": 1,
5408+
"maxInterval": 65534,
5409+
"reportableChange": 0
5410+
},
5411+
{
5412+
"name": "AttributeList",
5413+
"code": 65531,
5414+
"mfgCode": null,
5415+
"side": "server",
5416+
"type": "array",
5417+
"included": 1,
5418+
"storageOption": "External",
5419+
"singleton": 0,
5420+
"bounded": 0,
5421+
"defaultValue": "",
5422+
"reportable": 1,
5423+
"minInterval": 1,
5424+
"maxInterval": 65534,
5425+
"reportableChange": 0
5426+
},
5427+
{
5428+
"name": "FeatureMap",
5429+
"code": 65532,
5430+
"mfgCode": null,
5431+
"side": "server",
5432+
"type": "bitmap32",
5433+
"included": 1,
5434+
"storageOption": "RAM",
5435+
"singleton": 0,
5436+
"bounded": 0,
5437+
"defaultValue": "0",
5438+
"reportable": 1,
5439+
"minInterval": 1,
5440+
"maxInterval": 65534,
5441+
"reportableChange": 0
5442+
},
5443+
{
5444+
"name": "ClusterRevision",
5445+
"code": 65533,
5446+
"mfgCode": null,
5447+
"side": "server",
5448+
"type": "int16u",
5449+
"included": 1,
5450+
"storageOption": "RAM",
5451+
"singleton": 0,
5452+
"bounded": 0,
5453+
"defaultValue": "1",
5454+
"reportable": 1,
5455+
"minInterval": 1,
5456+
"maxInterval": 65534,
5457+
"reportableChange": 0
5458+
}
5459+
]
5460+
},
52965461
{
52975462
"name": "Chime",
52985463
"code": 1366,
@@ -5322,7 +5487,7 @@
53225487
"storageOption": "External",
53235488
"singleton": 0,
53245489
"bounded": 0,
5325-
"defaultValue": "",
5490+
"defaultValue": null,
53265491
"reportable": 1,
53275492
"minInterval": 1,
53285493
"maxInterval": 65534,
@@ -5338,7 +5503,7 @@
53385503
"storageOption": "External",
53395504
"singleton": 0,
53405505
"bounded": 0,
5341-
"defaultValue": "",
5506+
"defaultValue": null,
53425507
"reportable": 1,
53435508
"minInterval": 1,
53445509
"maxInterval": 65534,
@@ -5354,7 +5519,7 @@
53545519
"storageOption": "External",
53555520
"singleton": 0,
53565521
"bounded": 0,
5357-
"defaultValue": "",
5522+
"defaultValue": null,
53585523
"reportable": 1,
53595524
"minInterval": 1,
53605525
"maxInterval": 65534,
@@ -5370,7 +5535,7 @@
53705535
"storageOption": "External",
53715536
"singleton": 0,
53725537
"bounded": 0,
5373-
"defaultValue": "",
5538+
"defaultValue": null,
53745539
"reportable": 1,
53755540
"minInterval": 1,
53765541
"maxInterval": 65534,
@@ -5386,7 +5551,7 @@
53865551
"storageOption": "External",
53875552
"singleton": 0,
53885553
"bounded": 0,
5389-
"defaultValue": "",
5554+
"defaultValue": null,
53905555
"reportable": 1,
53915556
"minInterval": 1,
53925557
"maxInterval": 65534,
@@ -5402,7 +5567,7 @@
54025567
"storageOption": "External",
54035568
"singleton": 0,
54045569
"bounded": 0,
5405-
"defaultValue": "",
5570+
"defaultValue": null,
54065571
"reportable": 1,
54075572
"minInterval": 1,
54085573
"maxInterval": 65534,

0 commit comments

Comments
 (0)