@@ -38,8 +38,8 @@ Commissioner. In the context of the
38
38
[ Matter Video Player architecture] ( https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/app_clusters/media/VideoPlayerArchitecture.adoc ) ,
39
39
a ` CastingPlayer ` would map to
40
40
[ Casting "Video" Player] ( https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/app_clusters/media/VideoPlayerArchitecture.adoc#1-introduction ) .
41
- The ` CastingPlayer ` is expected to be hosting one or more ` Endpoints ` (similar
42
- to
41
+ The ` CastingPlayer ` is expected to be hosting one or more ` Endpoints ` (some of
42
+ which can represent
43
43
[ Content Apps] ( https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/app_clusters/media/VideoPlayerArchitecture.adoc#1-introduction )
44
44
in the Matter Video Player architecture) that support one or more Matter Media
45
45
` Clusters ` .
@@ -73,7 +73,10 @@ The Casting Client is expected to consume the Matter TV Casting library built
73
73
for its respective platform which implements the APIs described in this
74
74
document. Refer to the tv-casting-app READMEs for [ Linux] ( linux/README.md ) ,
75
75
Android and [ iOS] ( darwin/TvCasting/README.md ) to understand how to build and
76
- consume each platform's specific libraries.
76
+ consume each platform's specific libraries. The libraries MUST be built with the
77
+ client's specific values for ` CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID ` and
78
+ ` CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID ` updated in the
79
+ [ CHIPProjectAppConfig.h] ( tv-casting-common/include/CHIPProjectAppConfig.h ) file.
77
80
78
81
### Initialize the Casting Client
79
82
@@ -474,19 +477,33 @@ to a `CastingPlayer`, once the Casting client has been commissioned by it. After
474
477
that, the Casting client is able to skip the full UDC process by establishing
475
478
CASE with the `CastingPlayer ` directly. Once connected, the `CastingPlayer `
476
479
object will contain the list of available Endpoints on that `CastingPlayer `.
480
+ Optionally , the following arguments may also be passed in. The optional
481
+ `commissioningWindowTimeoutSec` indicates how long to keep the commissioning
482
+ window open, if commissioning is required. And `DesiredEndpointFilter ` specifies
483
+ the attributes, such as Vendor ID and Product ID of the `Endpoint `, the Casting
484
+ client desires to interact with after connecting. This forces the Matter TV
485
+ Casting library to go through the full UDC process in search of the desired
486
+ Endpoint , in cases where it is not available in the Casting client' s cache.
477
487
478
488
On Linux, the Casting Client can connect to a `CastingPlayer` by successfully
479
489
calling `VerifyOrEstablishConnection` on it.
480
490
481
491
```c
492
+
493
+ const uint16_t kDesiredEndpointVendorId = 65521;
494
+
482
495
void ConnectionHandler(CHIP_ERROR err, matter::casting::core::CastingPlayer * castingPlayer)
483
496
{
484
497
ChipLogProgress(AppServer, "ConnectionHandler called with %" CHIP_ERROR_FORMAT, err.Format());
485
498
}
486
499
487
500
...
488
501
// targetCastingPlayer is a discovered CastingPlayer
489
- targetCastingPlayer- > VerifyOrEstablishConnection(ConnectionHandler );
502
+ matter::casting::core::EndpointFilter desiredEndpointFilter;
503
+ desiredEndpointFilter.vendorId = kDesiredEndpointVendorId;
504
+ targetCastingPlayer->VerifyOrEstablishConnection(ConnectionHandler,
505
+ matter::casting::core::kCommissioningWindowTimeoutSec,
506
+ desiredEndpointFilter);
490
507
...
491
508
```
492
509
0 commit comments