blob: 7ccf31ae744391238fe05e9a54458cf2b3a85662 [file] [log] [blame]
Hongguang600a6ae2021-07-08 18:51:51 -07001/*
2 * Copyright 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <android-base/logging.h>
20#include <android_media_tuner_testing_configuration_V1_0.h>
21#include <android_media_tuner_testing_configuration_V1_0_enums.h>
22
23#include <aidl/android/hardware/tv/tuner/DataFormat.h>
24#include <aidl/android/hardware/tv/tuner/DemuxAlpFilterType.h>
25#include <aidl/android/hardware/tv/tuner/DemuxFilterAvSettings.h>
26#include <aidl/android/hardware/tv/tuner/DemuxFilterEvent.h>
27#include <aidl/android/hardware/tv/tuner/DemuxFilterMainType.h>
28#include <aidl/android/hardware/tv/tuner/DemuxFilterRecordSettings.h>
29#include <aidl/android/hardware/tv/tuner/DemuxFilterSectionSettings.h>
30#include <aidl/android/hardware/tv/tuner/DemuxFilterSettings.h>
31#include <aidl/android/hardware/tv/tuner/DemuxFilterType.h>
32#include <aidl/android/hardware/tv/tuner/DemuxIpAddress.h>
33#include <aidl/android/hardware/tv/tuner/DemuxIpFilterSettings.h>
34#include <aidl/android/hardware/tv/tuner/DemuxIpFilterType.h>
35#include <aidl/android/hardware/tv/tuner/DemuxMmtpFilterType.h>
36#include <aidl/android/hardware/tv/tuner/DemuxRecordScIndexType.h>
37#include <aidl/android/hardware/tv/tuner/DemuxTlvFilterType.h>
38#include <aidl/android/hardware/tv/tuner/DemuxTsFilterType.h>
39#include <aidl/android/hardware/tv/tuner/DvrSettings.h>
40#include <aidl/android/hardware/tv/tuner/DvrType.h>
41#include <aidl/android/hardware/tv/tuner/FrontendDvbsSettings.h>
42#include <aidl/android/hardware/tv/tuner/FrontendDvbtBandwidth.h>
43#include <aidl/android/hardware/tv/tuner/FrontendDvbtCoderate.h>
44#include <aidl/android/hardware/tv/tuner/FrontendDvbtConstellation.h>
45#include <aidl/android/hardware/tv/tuner/FrontendDvbtGuardInterval.h>
46#include <aidl/android/hardware/tv/tuner/FrontendDvbtHierarchy.h>
47#include <aidl/android/hardware/tv/tuner/FrontendDvbtPlpMode.h>
48#include <aidl/android/hardware/tv/tuner/FrontendDvbtSettings.h>
49#include <aidl/android/hardware/tv/tuner/FrontendDvbtStandard.h>
50#include <aidl/android/hardware/tv/tuner/FrontendDvbtTransmissionMode.h>
51#include <aidl/android/hardware/tv/tuner/FrontendSettings.h>
52#include <aidl/android/hardware/tv/tuner/FrontendStatus.h>
53#include <aidl/android/hardware/tv/tuner/FrontendStatusType.h>
54#include <aidl/android/hardware/tv/tuner/FrontendType.h>
55#include <aidl/android/hardware/tv/tuner/LnbPosition.h>
56#include <aidl/android/hardware/tv/tuner/LnbTone.h>
57#include <aidl/android/hardware/tv/tuner/LnbVoltage.h>
58#include <aidl/android/hardware/tv/tuner/PlaybackSettings.h>
59#include <aidl/android/hardware/tv/tuner/RecordSettings.h>
60
61using namespace std;
62using namespace aidl::android::hardware::tv::tuner;
63using namespace android::media::tuner::testing::configuration::V1_0;
64
65const string emptyHardwareId = "";
66
67static string mConfigFilePath;
68
69#define PROVISION_STR \
70 "{ " \
71 " \"id\": 21140844, " \
72 " \"name\": \"Test Title\", " \
73 " \"lowercase_organization_name\": \"Android\", " \
74 " \"asset_key\": { " \
75 " \"encryption_key\": \"nezAr3CHFrmBR9R8Tedotw==\" " \
76 " }, " \
77 " \"cas_type\": 1, " \
78 " \"track_types\": [ ] " \
79 "} "
80
81struct FrontendConfig {
82 bool isSoftwareFe;
83 FrontendType type;
84 bool canConnectToCiCam;
85 int32_t ciCamId;
86 FrontendSettings settings;
87 vector<FrontendStatusType> tuneStatusTypes;
88 vector<FrontendStatus> expectTuneStatuses;
89};
90
91struct FilterConfig {
92 int32_t bufferSize;
93 DemuxFilterType type;
94 DemuxFilterSettings settings;
95 bool getMqDesc;
96 AvStreamType streamType;
97 int32_t ipCid;
98 int32_t monitorEventTypes;
99
100 bool operator<(const FilterConfig& /*c*/) const { return false; }
101};
102
103struct DvrConfig {
104 DvrType type;
105 int32_t bufferSize;
106 DvrSettings settings;
107 string playbackInputFile;
108};
109
110struct LnbConfig {
111 string name;
112 LnbVoltage voltage;
113 LnbTone tone;
114 LnbPosition position;
115};
116
117struct TimeFilterConfig {
118 int64_t timeStamp;
119};
120
121struct DescramblerConfig {
122 int32_t casSystemId;
123 string provisionStr;
124 vector<uint8_t> hidlPvtData;
125};
126
127struct LiveBroadcastHardwareConnections {
128 bool hasFrontendConnection;
129 string frontendId;
130 string dvrSoftwareFeId;
131 string audioFilterId;
132 string videoFilterId;
133 string sectionFilterId;
134 string ipFilterId;
135 string pcrFilterId;
136 /* list string of extra filters; */
137};
138
139struct ScanHardwareConnections {
140 bool hasFrontendConnection;
141 string frontendId;
142};
143
144struct DvrPlaybackHardwareConnections {
145 bool support;
146 string frontendId;
147 string dvrId;
148 string audioFilterId;
149 string videoFilterId;
150 string sectionFilterId;
151 /* list string of extra filters; */
152};
153
154struct DvrRecordHardwareConnections {
155 bool support;
156 bool hasFrontendConnection;
157 string frontendId;
158 string dvrRecordId;
159 string dvrSoftwareFeId;
160 string recordFilterId;
161 string dvrSourceId;
162};
163
164struct DescramblingHardwareConnections {
165 bool support;
166 bool hasFrontendConnection;
167 string frontendId;
168 string dvrSoftwareFeId;
169 string audioFilterId;
170 string videoFilterId;
171 string descramblerId;
172 string dvrSourceId;
173 /* list string of extra filters; */
174};
175
176struct LnbLiveHardwareConnections {
177 bool support;
178 string frontendId;
179 string audioFilterId;
180 string videoFilterId;
181 string lnbId;
182 vector<string> diseqcMsgs;
183 /* list string of extra filters; */
184};
185
186struct LnbRecordHardwareConnections {
187 bool support;
188 string frontendId;
189 string dvrRecordId;
190 string recordFilterId;
191 string lnbId;
192 vector<string> diseqcMsgs;
193 /* list string of extra filters; */
194};
195
196struct TimeFilterHardwareConnections {
197 bool support;
198 string timeFilterId;
199};
200
201struct TunerTestingConfigAidlReader1_0 {
202 public:
203 static void setConfigFilePath(string path) { mConfigFilePath = path; }
204
205 static bool checkConfigFileExists() {
206 auto res = read(mConfigFilePath.c_str());
207 if (res == nullopt) {
208 ALOGW("[ConfigReader] Couldn't read %s."
209 "Please check tuner_testing_dynamic_configuration.xsd"
210 "and sample_tuner_vts_config.xml for more details on how to config Tune VTS.",
211 mConfigFilePath.c_str());
212 }
213 return (res != nullopt);
214 }
215
216 static TunerConfiguration getTunerConfig() { return *read(mConfigFilePath.c_str()); }
217
218 static DataFlowConfiguration getDataFlowConfiguration() {
219 return *getTunerConfig().getFirstDataFlowConfiguration();
220 }
221
222 static HardwareConfiguration getHardwareConfig() {
223 return *getTunerConfig().getFirstHardwareConfiguration();
224 }
225
226 static void readFrontendConfig1_0(map<string, FrontendConfig>& frontendMap) {
227 auto hardwareConfig = getHardwareConfig();
228 if (hardwareConfig.hasFrontends()) {
229 // TODO: b/182519645 complete the tune status config
230 vector<FrontendStatusType> types;
231 vector<FrontendStatus> statuses;
232
233 types.push_back(FrontendStatusType::DEMOD_LOCK);
234 types.push_back(FrontendStatusType::UEC);
235 types.push_back(FrontendStatusType::IS_MISO);
236
237 FrontendStatus status;
238 status.set<FrontendStatus::Tag::isDemodLocked>(true);
239 statuses.push_back(status);
240 status.set<FrontendStatus::Tag::uec>(4);
241 statuses.push_back(status);
242 status.set<FrontendStatus::Tag::isMiso>(true);
243 statuses.push_back(status);
244
245 auto frontends = *hardwareConfig.getFirstFrontends();
246 for (auto feConfig : frontends.getFrontend()) {
247 string id = feConfig.getId();
248 if (id.compare(string("FE_DEFAULT")) == 0) {
249 // overrid default
250 frontendMap.erase(string("FE_DEFAULT"));
251 }
252 FrontendType type;
253 switch (feConfig.getType()) {
254 case FrontendTypeEnum::UNDEFINED:
255 type = FrontendType::UNDEFINED;
256 break;
257 // TODO: b/182519645 finish all other frontend settings
258 case FrontendTypeEnum::ANALOG:
259 type = FrontendType::ANALOG;
260 break;
261 case FrontendTypeEnum::ATSC:
262 type = FrontendType::ATSC;
263 break;
264 case FrontendTypeEnum::ATSC3:
265 type = FrontendType::ATSC3;
266 break;
267 case FrontendTypeEnum::DVBC:
268 type = FrontendType::DVBC;
269 break;
270 case FrontendTypeEnum::DVBS:
271 type = FrontendType::DVBS;
272 frontendMap[id].settings.set<FrontendSettings::Tag::dvbs>(
273 readDvbsFrontendSettings(feConfig));
274 break;
275 case FrontendTypeEnum::DVBT: {
276 type = FrontendType::DVBT;
277 frontendMap[id].settings.set<FrontendSettings::Tag::dvbt>(
278 readDvbtFrontendSettings(feConfig));
279 break;
280 }
281 case FrontendTypeEnum::ISDBS:
282 type = FrontendType::ISDBS;
283 break;
284 case FrontendTypeEnum::ISDBS3:
285 type = FrontendType::ISDBS3;
286 break;
287 case FrontendTypeEnum::ISDBT:
288 type = FrontendType::ISDBT;
289 break;
290 case FrontendTypeEnum::DTMB:
291 type = FrontendType::DTMB;
292 break;
293 case FrontendTypeEnum::UNKNOWN:
294 ALOGW("[ConfigReader] invalid frontend type");
295 return;
296 default:
297 ALOGW("[ConfigReader] fe already handled in 1_0 reader.");
298 break;
299 }
300 frontendMap[id].type = type;
301 frontendMap[id].isSoftwareFe = feConfig.getIsSoftwareFrontend();
302 // TODO: b/182519645 complete the tune status config
303 frontendMap[id].tuneStatusTypes = types;
304 frontendMap[id].expectTuneStatuses = statuses;
305 getCiCamInfo(feConfig, frontendMap[id].canConnectToCiCam, frontendMap[id].ciCamId);
306 }
307 }
308 }
309
310 static void readFilterConfig1_0(map<string, FilterConfig>& filterMap) {
311 auto hardwareConfig = getHardwareConfig();
312 if (hardwareConfig.hasFilters()) {
313 auto filters = *hardwareConfig.getFirstFilters();
314 for (auto filterConfig : filters.getFilter()) {
315 string id = filterConfig.getId();
316 if (id.compare(string("FILTER_AUDIO_DEFAULT")) == 0) {
317 // overrid default
318 filterMap.erase(string("FILTER_AUDIO_DEFAULT"));
319 }
320 if (id.compare(string("FILTER_VIDEO_DEFAULT")) == 0) {
321 // overrid default
322 filterMap.erase(string("FILTER_VIDEO_DEFAULT"));
323 }
324
325 DemuxFilterType type;
326 DemuxFilterSettings settings;
327 if (!readFilterTypeAndSettings(filterConfig, type, settings)) {
328 ALOGW("[ConfigReader] invalid filter type");
329 return;
330 }
331 filterMap[id].type = type;
332 filterMap[id].bufferSize = filterConfig.getBufferSize();
333 filterMap[id].getMqDesc = filterConfig.getUseFMQ();
334 filterMap[id].settings = settings;
335
336 if (filterConfig.hasMonitorEventTypes()) {
Hongguang11da2cb2021-08-05 19:05:12 -0700337 filterMap[id].monitorEventTypes = (int32_t)filterConfig.getMonitorEventTypes();
Hongguang600a6ae2021-07-08 18:51:51 -0700338 }
339 if (filterConfig.hasAvFilterSettings_optional()) {
340 auto av = filterConfig.getFirstAvFilterSettings_optional();
341 if (av->hasAudioStreamType_optional()) {
342 filterMap[id].streamType.set<AvStreamType::Tag::audio>(
343 static_cast<AudioStreamType>(av->getAudioStreamType_optional()));
344 }
345 if (av->hasVideoStreamType_optional()) {
346 filterMap[id].streamType.set<AvStreamType::Tag::video>(
347 static_cast<VideoStreamType>(av->getVideoStreamType_optional()));
348 }
349 }
350 if (filterConfig.hasIpFilterConfig_optional()) {
351 auto ip = filterConfig.getFirstIpFilterConfig_optional();
352 if (ip->hasIpCid()) {
353 filterMap[id].ipCid = ip->getIpCid();
354 }
355 }
356 }
357 }
358 }
359
360 static void readDvrConfig1_0(map<string, DvrConfig>& dvrMap) {
361 auto hardwareConfig = getHardwareConfig();
362 if (hardwareConfig.hasDvrs()) {
363 auto dvrs = *hardwareConfig.getFirstDvrs();
364 for (auto dvrConfig : dvrs.getDvr()) {
365 string id = dvrConfig.getId();
366 DvrType type;
367 switch (dvrConfig.getType()) {
368 case DvrTypeEnum::PLAYBACK:
369 type = DvrType::PLAYBACK;
370 dvrMap[id].settings.set<DvrSettings::Tag::playback>(
371 readPlaybackSettings(dvrConfig));
372 break;
373 case DvrTypeEnum::RECORD:
374 type = DvrType::RECORD;
375 dvrMap[id].settings.set<DvrSettings::Tag::record>(
376 readRecordSettings(dvrConfig));
377 break;
378 case DvrTypeEnum::UNKNOWN:
379 ALOGW("[ConfigReader] invalid DVR type");
380 return;
381 }
382 dvrMap[id].type = type;
Hongguang11da2cb2021-08-05 19:05:12 -0700383 dvrMap[id].bufferSize = static_cast<int32_t>(dvrConfig.getBufferSize());
Hongguang600a6ae2021-07-08 18:51:51 -0700384 if (dvrConfig.hasInputFilePath()) {
385 dvrMap[id].playbackInputFile = dvrConfig.getInputFilePath();
386 }
387 }
388 }
389 }
390
391 static void readLnbConfig1_0(map<string, LnbConfig>& lnbMap) {
392 auto hardwareConfig = getHardwareConfig();
393 if (hardwareConfig.hasLnbs()) {
394 auto lnbs = *hardwareConfig.getFirstLnbs();
395 for (auto lnbConfig : lnbs.getLnb()) {
396 string id = lnbConfig.getId();
397 if (lnbConfig.hasName()) {
398 lnbMap[id].name = lnbConfig.getName();
399 } else {
400 lnbMap[id].name = emptyHardwareId;
401 }
402 lnbMap[id].voltage = static_cast<LnbVoltage>(lnbConfig.getVoltage());
403 lnbMap[id].tone = static_cast<LnbTone>(lnbConfig.getTone());
404 lnbMap[id].position = static_cast<LnbPosition>(lnbConfig.getPosition());
405 }
406 }
407 }
408
409 static void readDescramblerConfig1_0(map<string, DescramblerConfig>& descramblerMap) {
410 auto hardwareConfig = getHardwareConfig();
411 if (hardwareConfig.hasDescramblers()) {
412 auto descramblers = *hardwareConfig.getFirstDescramblers();
413 for (auto descramblerConfig : descramblers.getDescrambler()) {
414 string id = descramblerConfig.getId();
415 descramblerMap[id].casSystemId =
Hongguang11da2cb2021-08-05 19:05:12 -0700416 static_cast<int32_t>(descramblerConfig.getCasSystemId());
Hongguang600a6ae2021-07-08 18:51:51 -0700417 if (descramblerConfig.hasProvisionStr()) {
418 descramblerMap[id].provisionStr = descramblerConfig.getProvisionStr();
419 } else {
420 descramblerMap[id].provisionStr = PROVISION_STR;
421 }
422 if (descramblerConfig.hasSesstionPrivatData()) {
423 auto privateData = descramblerConfig.getSesstionPrivatData();
424 int size = privateData.size();
425 descramblerMap[id].hidlPvtData.resize(size);
426 memcpy(descramblerMap[id].hidlPvtData.data(), privateData.data(), size);
427 } else {
428 descramblerMap[id].hidlPvtData.resize(256);
429 }
430 }
431 }
432 }
433
434 static void readDiseqcMessages(map<string, vector<uint8_t>>& diseqcMsgMap) {
435 auto hardwareConfig = getHardwareConfig();
436 if (hardwareConfig.hasDiseqcMessages()) {
437 auto msgs = *hardwareConfig.getFirstDiseqcMessages();
438 for (auto msgConfig : msgs.getDiseqcMessage()) {
439 string name = msgConfig.getMsgName();
440 for (uint8_t atom : msgConfig.getMsgBody()) {
441 diseqcMsgMap[name].push_back(atom);
442 }
443 }
444 }
445 }
446
447 static void readTimeFilterConfig1_0(map<string, TimeFilterConfig>& timeFilterMap) {
448 auto hardwareConfig = getHardwareConfig();
449 if (hardwareConfig.hasTimeFilters()) {
450 auto timeFilters = *hardwareConfig.getFirstTimeFilters();
451 for (auto timeFilterConfig : timeFilters.getTimeFilter()) {
452 string id = timeFilterConfig.getId();
Hongguang11da2cb2021-08-05 19:05:12 -0700453 timeFilterMap[id].timeStamp = static_cast<int64_t>(timeFilterConfig.getTimeStamp());
Hongguang600a6ae2021-07-08 18:51:51 -0700454 }
455 }
456 }
457
458 static void connectLiveBroadcast(LiveBroadcastHardwareConnections& live) {
459 auto dataFlow = getDataFlowConfiguration();
460 if (dataFlow.hasClearLiveBroadcast()) {
461 live.hasFrontendConnection = true;
462 } else {
463 live.hasFrontendConnection = false;
464 return;
465 }
466 auto liveConfig = *dataFlow.getFirstClearLiveBroadcast();
467 live.frontendId = liveConfig.getFrontendConnection();
468
469 live.audioFilterId = liveConfig.getAudioFilterConnection();
470 live.videoFilterId = liveConfig.getVideoFilterConnection();
471 if (liveConfig.hasPcrFilterConnection()) {
472 live.pcrFilterId = liveConfig.getPcrFilterConnection();
473 } else {
474 live.pcrFilterId = emptyHardwareId;
475 }
476 if (liveConfig.hasSectionFilterConnection()) {
477 live.sectionFilterId = liveConfig.getSectionFilterConnection();
478 } else {
479 live.sectionFilterId = emptyHardwareId;
480 }
481 if (liveConfig.hasDvrSoftwareFeConnection()) {
482 live.dvrSoftwareFeId = liveConfig.getDvrSoftwareFeConnection();
483 }
484 if (liveConfig.hasIpFilterConnection()) {
485 live.ipFilterId = liveConfig.getIpFilterConnection();
486 } else {
487 live.ipFilterId = emptyHardwareId;
488 }
489 }
490
491 static void connectScan(ScanHardwareConnections& scan) {
492 auto dataFlow = getDataFlowConfiguration();
493 if (dataFlow.hasScan()) {
494 scan.hasFrontendConnection = true;
495 } else {
496 scan.hasFrontendConnection = false;
497 return;
498 }
499 auto scanConfig = *dataFlow.getFirstScan();
500 scan.frontendId = scanConfig.getFrontendConnection();
501 }
502
503 static void connectDvrPlayback(DvrPlaybackHardwareConnections& playback) {
504 auto dataFlow = getDataFlowConfiguration();
505 if (dataFlow.hasDvrPlayback()) {
506 playback.support = true;
507 } else {
508 playback.support = false;
509 return;
510 }
511 auto playbackConfig = *dataFlow.getFirstDvrPlayback();
512 playback.dvrId = playbackConfig.getDvrConnection();
513 playback.audioFilterId = playbackConfig.getAudioFilterConnection();
514 playback.videoFilterId = playbackConfig.getVideoFilterConnection();
515 if (playbackConfig.hasSectionFilterConnection()) {
516 playback.sectionFilterId = playbackConfig.getSectionFilterConnection();
517 } else {
518 playback.sectionFilterId = emptyHardwareId;
519 }
520 }
521
522 static void connectDvrRecord(DvrRecordHardwareConnections& record) {
523 auto dataFlow = getDataFlowConfiguration();
524 if (dataFlow.hasDvrRecord()) {
525 record.support = true;
526 } else {
527 record.support = false;
528 return;
529 }
530 auto recordConfig = *dataFlow.getFirstDvrRecord();
531 record.recordFilterId = recordConfig.getRecordFilterConnection();
532 record.dvrRecordId = recordConfig.getDvrRecordConnection();
533 if (recordConfig.hasDvrSoftwareFeConnection()) {
534 record.dvrSoftwareFeId = recordConfig.getDvrSoftwareFeConnection();
535 }
536 if (recordConfig.getHasFrontendConnection()) {
537 record.hasFrontendConnection = true;
538 record.dvrSourceId = emptyHardwareId;
539 record.frontendId = recordConfig.getFrontendConnection();
540 } else {
541 record.hasFrontendConnection = false;
542 record.dvrSourceId = recordConfig.getDvrSourceConnection();
543 }
544 }
545
546 static void connectDescrambling(DescramblingHardwareConnections& descrambling) {
547 auto dataFlow = getDataFlowConfiguration();
548 if (dataFlow.hasDescrambling()) {
549 descrambling.support = true;
550 } else {
551 descrambling.support = false;
552 return;
553 }
554 auto descConfig = *dataFlow.getFirstDescrambling();
555 descrambling.descramblerId = descConfig.getDescramblerConnection();
556 descrambling.audioFilterId = descConfig.getAudioFilterConnection();
557 descrambling.videoFilterId = descConfig.getVideoFilterConnection();
558 if (descConfig.hasDvrSoftwareFeConnection()) {
559 descrambling.dvrSoftwareFeId = descConfig.getDvrSoftwareFeConnection();
560 }
561 if (descConfig.getHasFrontendConnection()) {
562 descrambling.hasFrontendConnection = true;
563 descrambling.dvrSourceId = emptyHardwareId;
564 descrambling.frontendId = descConfig.getFrontendConnection();
565 } else {
566 descrambling.hasFrontendConnection = false;
567 descrambling.dvrSourceId = descConfig.getDvrSourceConnection();
568 }
569 }
570
571 static void connectLnbLive(LnbLiveHardwareConnections& lnbLive) {
572 auto dataFlow = getDataFlowConfiguration();
573 if (dataFlow.hasLnbLive()) {
574 lnbLive.support = true;
575 } else {
576 lnbLive.support = false;
577 return;
578 }
579 auto lnbLiveConfig = *dataFlow.getFirstLnbLive();
580 lnbLive.frontendId = lnbLiveConfig.getFrontendConnection();
581 lnbLive.audioFilterId = lnbLiveConfig.getAudioFilterConnection();
582 lnbLive.videoFilterId = lnbLiveConfig.getVideoFilterConnection();
583 lnbLive.lnbId = lnbLiveConfig.getLnbConnection();
584 if (lnbLiveConfig.hasDiseqcMsgSender()) {
585 for (auto msgName : lnbLiveConfig.getDiseqcMsgSender()) {
586 lnbLive.diseqcMsgs.push_back(msgName);
587 }
588 }
589 }
590
591 static void connectLnbRecord(LnbRecordHardwareConnections& lnbRecord) {
592 auto dataFlow = getDataFlowConfiguration();
593 if (dataFlow.hasLnbRecord()) {
594 lnbRecord.support = true;
595 } else {
596 lnbRecord.support = false;
597 return;
598 }
599 auto lnbRecordConfig = *dataFlow.getFirstLnbRecord();
600 lnbRecord.frontendId = lnbRecordConfig.getFrontendConnection();
601 lnbRecord.recordFilterId = lnbRecordConfig.getRecordFilterConnection();
602 lnbRecord.dvrRecordId = lnbRecordConfig.getDvrRecordConnection();
603 lnbRecord.lnbId = lnbRecordConfig.getLnbConnection();
604 if (lnbRecordConfig.hasDiseqcMsgSender()) {
605 for (auto msgName : lnbRecordConfig.getDiseqcMsgSender()) {
606 lnbRecord.diseqcMsgs.push_back(msgName);
607 }
608 }
609 }
610
611 static void connectTimeFilter(TimeFilterHardwareConnections& timeFilter) {
612 auto dataFlow = getDataFlowConfiguration();
613 if (dataFlow.hasTimeFilter()) {
614 timeFilter.support = true;
615 } else {
616 timeFilter.support = false;
617 return;
618 }
619 auto timeFilterConfig = *dataFlow.getFirstTimeFilter();
620 timeFilter.timeFilterId = timeFilterConfig.getTimeFilterConnection();
621 }
622
623 private:
624 static FrontendDvbtSettings readDvbtFrontendSettings(Frontend feConfig) {
625 ALOGW("[ConfigReader] fe type is dvbt");
626 FrontendDvbtSettings dvbtSettings{
Hongguang11da2cb2021-08-05 19:05:12 -0700627 .frequency = (int64_t)feConfig.getFrequency(),
Hongguang600a6ae2021-07-08 18:51:51 -0700628 };
Hongguang11da2cb2021-08-05 19:05:12 -0700629 if (feConfig.hasEndFrequency()) {
630 dvbtSettings.endFrequency = (int64_t)feConfig.getEndFrequency();
631 }
Hongguang600a6ae2021-07-08 18:51:51 -0700632 if (!feConfig.hasDvbtFrontendSettings_optional()) {
633 ALOGW("[ConfigReader] no more dvbt settings");
634 return dvbtSettings;
635 }
636 auto dvbt = feConfig.getFirstDvbtFrontendSettings_optional();
Hongguang11da2cb2021-08-05 19:05:12 -0700637 int32_t trans = static_cast<int32_t>(dvbt->getTransmissionMode());
Hongguang600a6ae2021-07-08 18:51:51 -0700638 dvbtSettings.transmissionMode = static_cast<FrontendDvbtTransmissionMode>(trans);
639 dvbtSettings.bandwidth = static_cast<FrontendDvbtBandwidth>(dvbt->getBandwidth());
640 dvbtSettings.isHighPriority = dvbt->getIsHighPriority();
641 dvbtSettings.hierarchy = static_cast<FrontendDvbtHierarchy>(dvbt->getHierarchy());
642 dvbtSettings.hpCoderate = static_cast<FrontendDvbtCoderate>(dvbt->getHpCoderate());
643 dvbtSettings.lpCoderate = static_cast<FrontendDvbtCoderate>(dvbt->getLpCoderate());
644 dvbtSettings.guardInterval =
645 static_cast<FrontendDvbtGuardInterval>(dvbt->getGuardInterval());
646 dvbtSettings.standard = static_cast<FrontendDvbtStandard>(dvbt->getStandard());
647 dvbtSettings.isMiso = dvbt->getIsMiso();
648 dvbtSettings.plpMode = static_cast<FrontendDvbtPlpMode>(dvbt->getPlpMode());
649 dvbtSettings.plpId = dvbt->getPlpId();
650 dvbtSettings.plpGroupId = dvbt->getPlpGroupId();
651 if (dvbt->hasConstellation()) {
652 dvbtSettings.constellation =
653 static_cast<FrontendDvbtConstellation>(dvbt->getConstellation());
654 }
655 return dvbtSettings;
656 }
657
658 static FrontendDvbsSettings readDvbsFrontendSettings(Frontend feConfig) {
659 ALOGW("[ConfigReader] fe type is dvbs");
660 FrontendDvbsSettings dvbsSettings{
Hongguang11da2cb2021-08-05 19:05:12 -0700661 .frequency = (int64_t)feConfig.getFrequency(),
Hongguang600a6ae2021-07-08 18:51:51 -0700662 };
Hongguang11da2cb2021-08-05 19:05:12 -0700663 if (feConfig.hasEndFrequency()) {
664 dvbsSettings.endFrequency = (int64_t)feConfig.getEndFrequency();
665 }
Hongguang600a6ae2021-07-08 18:51:51 -0700666 if (!feConfig.hasDvbsFrontendSettings_optional()) {
667 ALOGW("[ConfigReader] no more dvbs settings");
668 return dvbsSettings;
669 }
Hongguang11da2cb2021-08-05 19:05:12 -0700670 dvbsSettings.symbolRate = static_cast<int32_t>(
Hongguang600a6ae2021-07-08 18:51:51 -0700671 feConfig.getFirstDvbsFrontendSettings_optional()->getSymbolRate());
Hongguang11da2cb2021-08-05 19:05:12 -0700672 dvbsSettings.inputStreamId = static_cast<int32_t>(
Hongguang600a6ae2021-07-08 18:51:51 -0700673 feConfig.getFirstDvbsFrontendSettings_optional()->getInputStreamId());
674 auto dvbs = feConfig.getFirstDvbsFrontendSettings_optional();
675 if (dvbs->hasScanType()) {
676 dvbsSettings.scanType = static_cast<FrontendDvbsScanType>(dvbs->getScanType());
677 }
678 if (dvbs->hasIsDiseqcRxMessage()) {
679 dvbsSettings.isDiseqcRxMessage = dvbs->getIsDiseqcRxMessage();
680 }
681 return dvbsSettings;
682 }
683
684 static bool readFilterTypeAndSettings(Filter filterConfig, DemuxFilterType& type,
685 DemuxFilterSettings& settings) {
686 auto mainType = filterConfig.getMainType();
687 auto subType = filterConfig.getSubType();
688
689 switch (mainType) {
690 case FilterMainTypeEnum::TS: {
691 ALOGW("[ConfigReader] filter main type is ts");
692 type.mainType = DemuxFilterMainType::TS;
693 DemuxTsFilterSettings ts;
694 bool isTsSet = false;
695 switch (subType) {
696 case FilterSubTypeEnum::UNDEFINED:
Hongguangce1e30d2021-08-02 21:55:44 -0700697 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700698 DemuxTsFilterType::UNDEFINED);
699 break;
700 case FilterSubTypeEnum::SECTION:
Hongguangce1e30d2021-08-02 21:55:44 -0700701 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700702 DemuxTsFilterType::SECTION);
703 ts.filterSettings.set<DemuxTsFilterSettingsFilterSettings::Tag::section>(
704 readSectionFilterSettings(filterConfig));
705 isTsSet = true;
706 break;
707 case FilterSubTypeEnum::PES:
708 // TODO: b/182519645 support all the filter settings
Hongguangce1e30d2021-08-02 21:55:44 -0700709 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700710 DemuxTsFilterType::PES);
711 break;
712 case FilterSubTypeEnum::TS:
Hongguangce1e30d2021-08-02 21:55:44 -0700713 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700714 DemuxTsFilterType::TS);
715 ts.filterSettings.set<DemuxTsFilterSettingsFilterSettings::Tag::noinit>(
716 true);
717 isTsSet = true;
718 break;
719 case FilterSubTypeEnum::PCR:
Hongguangce1e30d2021-08-02 21:55:44 -0700720 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700721 DemuxTsFilterType::PCR);
722 ts.filterSettings.set<DemuxTsFilterSettingsFilterSettings::Tag::noinit>(
723 true);
724 isTsSet = true;
725 break;
726 case FilterSubTypeEnum::TEMI:
Hongguangce1e30d2021-08-02 21:55:44 -0700727 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700728 DemuxTsFilterType::TEMI);
729 ts.filterSettings.set<DemuxTsFilterSettingsFilterSettings::Tag::noinit>(
730 true);
731 isTsSet = true;
732 break;
733 case FilterSubTypeEnum::AUDIO:
Hongguangce1e30d2021-08-02 21:55:44 -0700734 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700735 DemuxTsFilterType::AUDIO);
736 ts.filterSettings.set<DemuxTsFilterSettingsFilterSettings::Tag::av>(
737 readAvFilterSettings(filterConfig));
738 isTsSet = true;
739 break;
740 case FilterSubTypeEnum::VIDEO:
Hongguangce1e30d2021-08-02 21:55:44 -0700741 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700742 DemuxTsFilterType::VIDEO);
743 ts.filterSettings.set<DemuxTsFilterSettingsFilterSettings::Tag::av>(
744 readAvFilterSettings(filterConfig));
745 isTsSet = true;
746 break;
747 case FilterSubTypeEnum::RECORD:
Hongguangce1e30d2021-08-02 21:55:44 -0700748 type.subType.set<DemuxFilterSubType::Tag::tsFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700749 DemuxTsFilterType::RECORD);
750 ts.filterSettings.set<DemuxTsFilterSettingsFilterSettings::Tag::record>(
751 readRecordFilterSettings(filterConfig));
752 isTsSet = true;
753 break;
754 default:
755 ALOGW("[ConfigReader] ts subtype is not supported");
756 return false;
757 }
758 if (filterConfig.hasPid()) {
759 ts.tpid = static_cast<int32_t>(filterConfig.getPid());
760 isTsSet = true;
761 }
762 if (isTsSet) {
763 settings.set<DemuxFilterSettings::Tag::ts>(ts);
764 }
765 break;
766 }
767 case FilterMainTypeEnum::MMTP: {
768 ALOGW("[ConfigReader] filter main type is mmtp");
769 type.mainType = DemuxFilterMainType::MMTP;
770 DemuxMmtpFilterSettings mmtp;
771 bool isMmtpSet = false;
772 switch (subType) {
773 case FilterSubTypeEnum::UNDEFINED:
Hongguangce1e30d2021-08-02 21:55:44 -0700774 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700775 DemuxMmtpFilterType::UNDEFINED);
776 break;
777 case FilterSubTypeEnum::SECTION:
Hongguangce1e30d2021-08-02 21:55:44 -0700778 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700779 DemuxMmtpFilterType::SECTION);
780 mmtp.filterSettings
781 .set<DemuxMmtpFilterSettingsFilterSettings::Tag::section>(
782 readSectionFilterSettings(filterConfig));
783 isMmtpSet = true;
784 break;
785 case FilterSubTypeEnum::PES:
Hongguangce1e30d2021-08-02 21:55:44 -0700786 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700787 DemuxMmtpFilterType::PES);
788 // TODO: b/182519645 support all the filter settings
789 break;
790 case FilterSubTypeEnum::MMTP:
Hongguangce1e30d2021-08-02 21:55:44 -0700791 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700792 DemuxMmtpFilterType::MMTP);
793 mmtp.filterSettings.set<DemuxMmtpFilterSettingsFilterSettings::Tag::noinit>(
794 true);
795 isMmtpSet = true;
796 break;
797 case FilterSubTypeEnum::AUDIO:
Hongguangce1e30d2021-08-02 21:55:44 -0700798 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700799 DemuxMmtpFilterType::AUDIO);
800 mmtp.filterSettings.set<DemuxMmtpFilterSettingsFilterSettings::Tag::av>(
801 readAvFilterSettings(filterConfig));
802 isMmtpSet = true;
803 break;
804 case FilterSubTypeEnum::VIDEO:
Hongguangce1e30d2021-08-02 21:55:44 -0700805 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700806 DemuxMmtpFilterType::VIDEO);
807 mmtp.filterSettings.set<DemuxMmtpFilterSettingsFilterSettings::Tag::av>(
808 readAvFilterSettings(filterConfig));
809 isMmtpSet = true;
810 break;
811 case FilterSubTypeEnum::RECORD:
Hongguangce1e30d2021-08-02 21:55:44 -0700812 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700813 DemuxMmtpFilterType::RECORD);
814 mmtp.filterSettings.set<DemuxMmtpFilterSettingsFilterSettings::Tag::record>(
815 readRecordFilterSettings(filterConfig));
816 isMmtpSet = true;
817 break;
818 case FilterSubTypeEnum::DOWNLOAD:
Hongguangce1e30d2021-08-02 21:55:44 -0700819 type.subType.set<DemuxFilterSubType::Tag::mmtpFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700820 DemuxMmtpFilterType::DOWNLOAD);
821 // TODO: b/182519645 support all the filter settings
822 break;
823 default:
824 ALOGW("[ConfigReader] mmtp subtype is not supported");
825 return false;
826 }
827 if (filterConfig.hasPid()) {
828 mmtp.mmtpPid = static_cast<int32_t>(filterConfig.getPid());
829 isMmtpSet = true;
830 }
831 if (isMmtpSet) {
832 settings.set<DemuxFilterSettings::Tag::mmtp>(mmtp);
833 }
834 break;
835 }
836 case FilterMainTypeEnum::IP: {
837 ALOGW("[ConfigReader] filter main type is ip");
838 type.mainType = DemuxFilterMainType::IP;
839 DemuxIpFilterSettings ip;
840 switch (subType) {
841 case FilterSubTypeEnum::UNDEFINED:
Hongguangce1e30d2021-08-02 21:55:44 -0700842 type.subType.set<DemuxFilterSubType::Tag::ipFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700843 DemuxIpFilterType::UNDEFINED);
844 break;
845 case FilterSubTypeEnum::SECTION:
Hongguangce1e30d2021-08-02 21:55:44 -0700846 type.subType.set<DemuxFilterSubType::Tag::ipFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700847 DemuxIpFilterType::SECTION);
848 ip.filterSettings.set<DemuxIpFilterSettingsFilterSettings::Tag::section>(
849 readSectionFilterSettings(filterConfig));
850 settings.set<DemuxFilterSettings::Tag::ip>(ip);
851 break;
852 case FilterSubTypeEnum::NTP:
Hongguangce1e30d2021-08-02 21:55:44 -0700853 type.subType.set<DemuxFilterSubType::Tag::ipFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700854 DemuxIpFilterType::NTP);
855 ip.filterSettings.set<DemuxIpFilterSettingsFilterSettings::Tag::noinit>(
856 true);
857 settings.set<DemuxFilterSettings::Tag::ip>(ip);
858 break;
859 case FilterSubTypeEnum::IP: {
860 ip.ipAddr = readIpAddress(filterConfig),
861 ip.filterSettings
862 .set<DemuxIpFilterSettingsFilterSettings::Tag::bPassthrough>(
863 readPassthroughSettings(filterConfig));
864 settings.set<DemuxFilterSettings::Tag::ip>(ip);
865 break;
866 }
867 case FilterSubTypeEnum::IP_PAYLOAD:
Hongguangce1e30d2021-08-02 21:55:44 -0700868 type.subType.set<DemuxFilterSubType::Tag::ipFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700869 DemuxIpFilterType::IP_PAYLOAD);
870 ip.filterSettings.set<DemuxIpFilterSettingsFilterSettings::Tag::noinit>(
871 true);
872 settings.set<DemuxFilterSettings::Tag::ip>(ip);
873 break;
874 case FilterSubTypeEnum::PAYLOAD_THROUGH:
Hongguangce1e30d2021-08-02 21:55:44 -0700875 type.subType.set<DemuxFilterSubType::Tag::ipFilterType>(
Hongguang600a6ae2021-07-08 18:51:51 -0700876 DemuxIpFilterType::PAYLOAD_THROUGH);
877 ip.filterSettings.set<DemuxIpFilterSettingsFilterSettings::Tag::noinit>(
878 true);
879 settings.set<DemuxFilterSettings::Tag::ip>(ip);
880 break;
881 default:
882 ALOGW("[ConfigReader] mmtp subtype is not supported");
883 return false;
884 }
885 break;
886 }
887 default:
888 // TODO: b/182519645 support all the filter configs
889 ALOGW("[ConfigReader] filter main type is not supported in dynamic config");
890 return false;
891 }
892 return true;
893 }
894
895 static DemuxIpAddress readIpAddress(Filter filterConfig) {
896 DemuxIpAddress ipAddress;
897 vector<uint8_t> data;
898 if (!filterConfig.hasIpFilterConfig_optional()) {
899 return ipAddress;
900 }
901 auto ipFilterConfig = filterConfig.getFirstIpFilterConfig_optional();
902 if (ipFilterConfig->hasSrcPort()) {
903 ipAddress.srcPort = ipFilterConfig->getSrcPort();
904 }
905 if (ipFilterConfig->hasDestPort()) {
906 ipAddress.dstPort = ipFilterConfig->getDestPort();
907 }
908 if (ipFilterConfig->getFirstSrcIpAddress()->getIsIpV4()) {
909 data.resize(4);
910 memcpy(data.data(), ipFilterConfig->getFirstSrcIpAddress()->getIp().data(), 4);
911 ipAddress.srcIpAddress.set<DemuxIpAddressIpAddress::Tag::v4>(data);
912 } else {
913 data.resize(6);
914 memcpy(data.data(), ipFilterConfig->getFirstSrcIpAddress()->getIp().data(), 6);
915 ipAddress.srcIpAddress.set<DemuxIpAddressIpAddress::Tag::v6>(data);
916 }
917 if (ipFilterConfig->getFirstDestIpAddress()->getIsIpV4()) {
918 data.resize(4);
919 memcpy(data.data(), ipFilterConfig->getFirstDestIpAddress()->getIp().data(), 4);
920 ipAddress.dstIpAddress.set<DemuxIpAddressIpAddress::Tag::v4>(data);
921 } else {
922 data.resize(6);
923 memcpy(data.data(), ipFilterConfig->getFirstDestIpAddress()->getIp().data(), 6);
924 ipAddress.dstIpAddress.set<DemuxIpAddressIpAddress::Tag::v6>(data);
925 }
926 return ipAddress;
927 }
928
929 static bool readPassthroughSettings(Filter filterConfig) {
930 if (!filterConfig.hasIpFilterConfig_optional()) {
931 return false;
932 }
933 auto ipFilterConfig = filterConfig.getFirstIpFilterConfig_optional();
934 if (ipFilterConfig->hasDataPassthrough()) {
935 return ipFilterConfig->getDataPassthrough();
936 }
937 return false;
938 }
939
940 static DemuxFilterSectionSettings readSectionFilterSettings(Filter filterConfig) {
941 DemuxFilterSectionSettings settings;
942 if (!filterConfig.hasSectionFilterSettings_optional()) {
943 return settings;
944 }
945 auto section = filterConfig.getFirstSectionFilterSettings_optional();
946 settings.isCheckCrc = section->getIsCheckCrc();
947 settings.isRepeat = section->getIsRepeat();
948 settings.isRaw = section->getIsRaw();
949 return settings;
950 }
951
952 static DemuxFilterAvSettings readAvFilterSettings(Filter filterConfig) {
953 DemuxFilterAvSettings settings;
954 if (!filterConfig.hasAvFilterSettings_optional()) {
955 return settings;
956 }
957 auto av = filterConfig.getFirstAvFilterSettings_optional();
958 settings.isPassthrough = av->getIsPassthrough();
Hongguang16dacc12021-11-01 15:51:52 -0700959 settings.isSecureMemory = av->getIsSecureMemory();
Hongguang600a6ae2021-07-08 18:51:51 -0700960 return settings;
961 }
962
963 static DemuxFilterRecordSettings readRecordFilterSettings(Filter filterConfig) {
964 DemuxFilterRecordSettings settings;
965 if (!filterConfig.hasRecordFilterSettings_optional()) {
966 return settings;
967 }
968 auto record = filterConfig.getFirstRecordFilterSettings_optional();
969 settings.tsIndexMask = record->getTsIndexMask();
970 settings.scIndexType = static_cast<DemuxRecordScIndexType>(record->getScIndexType());
971 return settings;
972 }
973
974 static PlaybackSettings readPlaybackSettings(Dvr dvrConfig) {
975 ALOGW("[ConfigReader] dvr type is playback");
976 PlaybackSettings playbackSettings{
Hongguang11da2cb2021-08-05 19:05:12 -0700977 .statusMask = static_cast<int8_t>(dvrConfig.getStatusMask()),
978 .lowThreshold = static_cast<int64_t>(dvrConfig.getLowThreshold()),
979 .highThreshold = static_cast<int64_t>(dvrConfig.getHighThreshold()),
Hongguang600a6ae2021-07-08 18:51:51 -0700980 .dataFormat = static_cast<DataFormat>(dvrConfig.getDataFormat()),
Hongguang11da2cb2021-08-05 19:05:12 -0700981 .packetSize = static_cast<int64_t>(dvrConfig.getPacketSize()),
Hongguang600a6ae2021-07-08 18:51:51 -0700982 };
983 return playbackSettings;
984 }
985
986 static RecordSettings readRecordSettings(Dvr dvrConfig) {
987 ALOGW("[ConfigReader] dvr type is record");
988 RecordSettings recordSettings{
Hongguang11da2cb2021-08-05 19:05:12 -0700989 .statusMask = static_cast<int8_t>(dvrConfig.getStatusMask()),
990 .lowThreshold = static_cast<int64_t>(dvrConfig.getLowThreshold()),
991 .highThreshold = static_cast<int64_t>(dvrConfig.getHighThreshold()),
Hongguang600a6ae2021-07-08 18:51:51 -0700992 .dataFormat = static_cast<DataFormat>(dvrConfig.getDataFormat()),
Hongguang11da2cb2021-08-05 19:05:12 -0700993 .packetSize = static_cast<int64_t>(dvrConfig.getPacketSize()),
Hongguang600a6ae2021-07-08 18:51:51 -0700994 };
995 return recordSettings;
996 }
997
998 static void getCiCamInfo(Frontend feConfig, bool& canConnectToCiCam, int32_t& ciCamId) {
999 if (!feConfig.hasConnectToCicamId()) {
1000 canConnectToCiCam = false;
1001 ciCamId = -1;
Gareth Fenn53ae3832021-10-15 17:19:00 +01001002 return;
Hongguang600a6ae2021-07-08 18:51:51 -07001003 }
1004 canConnectToCiCam = true;
1005 ciCamId = static_cast<int32_t>(feConfig.getConnectToCicamId());
1006 }
1007};