@@ -58,11 +58,11 @@ CHIP_ERROR WebRTCManager::SetRemoteDescription(uint16_t webRTCSessionID, const s
5858{
5959 if (!mPeerConnection )
6060 {
61- ChipLogError (NotSpecified , " Cannot set remote description: mPeerConnection is null" );
61+ ChipLogError (Camera , " Cannot set remote description: mPeerConnection is null" );
6262 return CHIP_ERROR_INCORRECT_STATE;
6363 }
6464
65- ChipLogProgress (NotSpecified , " WebRTCManager::SetRemoteDescription" );
65+ ChipLogProgress (Camera , " WebRTCManager::SetRemoteDescription" );
6666 mPeerConnection ->setRemoteDescription (sdp);
6767
6868 // Schedule the ProvideICECandidates() call to run asynchronously.
@@ -73,15 +73,15 @@ CHIP_ERROR WebRTCManager::SetRemoteDescription(uint16_t webRTCSessionID, const s
7373
7474CHIP_ERROR WebRTCManager::Connnect (Controller::DeviceCommissioner & commissioner, NodeId nodeId, EndpointId endpointId)
7575{
76- ChipLogProgress (NotSpecified , " Attempting to establish WebRTC connection to node 0x" ChipLogFormatX64 " on endpoint 0x%x" ,
76+ ChipLogProgress (Camera , " Attempting to establish WebRTC connection to node 0x" ChipLogFormatX64 " on endpoint 0x%x" ,
7777 ChipLogValueX64 (nodeId), endpointId);
7878
7979 FabricIndex fabricIndex = commissioner.GetFabricIndex ();
8080 const FabricInfo * fabricInfo = commissioner.GetFabricTable ()->FindFabricWithIndex (fabricIndex);
8181 VerifyOrReturnError (fabricInfo != nullptr , CHIP_ERROR_INCORRECT_STATE);
8282
8383 uint64_t fabricId = fabricInfo->GetFabricId ();
84- ChipLogProgress (NotSpecified , " Commissioner is on Fabric ID 0x" ChipLogFormatX64, ChipLogValueX64 (fabricId));
84+ ChipLogProgress (Camera , " Commissioner is on Fabric ID 0x" ChipLogFormatX64, ChipLogValueX64 (fabricId));
8585
8686 chip::ScopedNodeId peerId (nodeId, fabricIndex);
8787
@@ -95,42 +95,40 @@ CHIP_ERROR WebRTCManager::Connnect(Controller::DeviceCommissioner & commissioner
9595
9696 mPeerConnection ->onLocalDescription ([this ](rtc::Description description) {
9797 mLocalDescription = std::string (description);
98- ChipLogProgress (NotSpecified , " Local Description:" );
99- ChipLogProgress (NotSpecified , " %s" , mLocalDescription .c_str ());
98+ ChipLogProgress (Camera , " Local Description:" );
99+ ChipLogProgress (Camera , " %s" , mLocalDescription .c_str ());
100100 });
101101
102102 mPeerConnection ->onLocalCandidate ([this ](rtc::Candidate candidate) {
103103 std::string candidateStr = std::string (candidate);
104104 mLocalCandidates .push_back (candidateStr);
105- ChipLogProgress (NotSpecified , " Local Candidate:" );
106- ChipLogProgress (NotSpecified , " %s" , candidateStr.c_str ());
105+ ChipLogProgress (Camera , " Local Candidate:" );
106+ ChipLogProgress (Camera , " %s" , candidateStr.c_str ());
107107 });
108108
109- mPeerConnection ->onStateChange ([](rtc::PeerConnection::State state) {
110- ChipLogProgress (NotSpecified, " [PeerConnection State: %d]" , static_cast <int >(state));
111- });
109+ mPeerConnection ->onStateChange (
110+ [](rtc::PeerConnection::State state) { ChipLogProgress (Camera, " [PeerConnection State: %d]" , static_cast <int >(state)); });
112111
113112 mPeerConnection ->onGatheringStateChange ([](rtc::PeerConnection::GatheringState state) {
114- ChipLogProgress (NotSpecified , " [Gathering State: %d]" , static_cast <int >(state));
113+ ChipLogProgress (Camera , " [Gathering State: %d]" , static_cast <int >(state));
115114 });
116115
117116 // Create a data channel for this offerer
118117 mDataChannel = mPeerConnection ->createDataChannel (" test" );
119118
120119 if (mDataChannel )
121120 {
122- mDataChannel ->onOpen ([&]() {
123- ChipLogProgress (NotSpecified, " [DataChannel open: %s]" , mDataChannel ? mDataChannel ->label ().c_str () : " unknown" );
124- });
121+ mDataChannel ->onOpen (
122+ [&]() { ChipLogProgress (Camera, " [DataChannel open: %s]" , mDataChannel ? mDataChannel ->label ().c_str () : " unknown" ); });
125123
126124 mDataChannel ->onClosed ([&]() {
127- ChipLogProgress (NotSpecified , " [DataChannel closed: %s]" , mDataChannel ? mDataChannel ->label ().c_str () : " unknown" );
125+ ChipLogProgress (Camera , " [DataChannel closed: %s]" , mDataChannel ? mDataChannel ->label ().c_str () : " unknown" );
128126 });
129127
130128 mDataChannel ->onMessage ([](auto data) {
131129 if (std::holds_alternative<std::string>(data))
132130 {
133- ChipLogProgress (NotSpecified , " [Received: %s]" , std::get<std::string>(data).c_str ());
131+ ChipLogProgress (Camera , " [Received: %s]" , std::get<std::string>(data).c_str ());
134132 }
135133 });
136134 }
@@ -141,7 +139,7 @@ CHIP_ERROR WebRTCManager::Connnect(Controller::DeviceCommissioner & commissioner
141139CHIP_ERROR WebRTCManager::ProvideOffer (DataModel::Nullable<uint16_t > webRTCSessionID,
142140 Clusters::WebRTCTransportProvider::StreamUsageEnum streamUsage)
143141{
144- ChipLogProgress (NotSpecified , " Sending ProvideOffer command to the peer device" );
142+ ChipLogProgress (Camera , " Sending ProvideOffer command to the peer device" );
145143
146144 CHIP_ERROR err =
147145 mWebRTCProviderClient .ProvideOffer (webRTCSessionID, mLocalDescription , streamUsage, kWebRTCRequesterDynamicEndpointId ,
@@ -153,19 +151,19 @@ CHIP_ERROR WebRTCManager::ProvideOffer(DataModel::Nullable<uint16_t> webRTCSessi
153151
154152 if (err != CHIP_NO_ERROR)
155153 {
156- ChipLogError (NotSpecified , " Failed to send ProvideOffer: %" CHIP_ERROR_FORMAT, err.Format ());
154+ ChipLogError (Camera , " Failed to send ProvideOffer: %" CHIP_ERROR_FORMAT, err.Format ());
157155 }
158156
159157 return err;
160158}
161159
162160CHIP_ERROR WebRTCManager::ProvideICECandidates (uint16_t webRTCSessionID)
163161{
164- ChipLogProgress (NotSpecified , " Sending ProvideICECandidates command to the peer device" );
162+ ChipLogProgress (Camera , " Sending ProvideICECandidates command to the peer device" );
165163
166164 if (mLocalCandidates .empty ())
167165 {
168- ChipLogError (NotSpecified , " No local ICE candidates to send" );
166+ ChipLogError (Camera , " No local ICE candidates to send" );
169167 return CHIP_ERROR_INVALID_ARGUMENT;
170168 }
171169
@@ -183,20 +181,20 @@ CHIP_ERROR WebRTCManager::ProvideICECandidates(uint16_t webRTCSessionID)
183181
184182 if (err != CHIP_NO_ERROR)
185183 {
186- ChipLogError (NotSpecified , " Failed to send ProvideICECandidates: %" CHIP_ERROR_FORMAT, err.Format ());
184+ ChipLogError (Camera , " Failed to send ProvideICECandidates: %" CHIP_ERROR_FORMAT, err.Format ());
187185 }
188186
189187 return err;
190188}
191189
192190void WebRTCManager::HandleProvideOfferResponse (TLV::TLVReader & data)
193191{
194- ChipLogProgress (NotSpecified , " WebRTCManager::HandleProvideOfferResponse." );
192+ ChipLogProgress (Camera , " WebRTCManager::HandleProvideOfferResponse." );
195193}
196194
197195void WebRTCManager::HandleCommandResponse (const ConcreteCommandPath & path, TLV::TLVReader & data)
198196{
199- ChipLogProgress (NotSpecified , " Command Response received." );
197+ ChipLogProgress (Camera , " Command Response received." );
200198
201199 // TODO: Upon receiving, the client SHALL create a new WebRTCSessionStruct populated with the values from this command, along
202200 // with the accessing Peer Node ID and Local Fabric Index entries stored in the Secure Session Context, as the PeerNodeID and
0 commit comments