@@ -98,32 +98,32 @@ CHIP_ERROR CameraAVStreamMgmtServer::Init()
98
98
}
99
99
100
100
// Ensure Optional attribute bits have been correctly passed.
101
- if (SupportsOptAttr (OptionalAttribute::kSupportsHDRModeEnabled ))
101
+ if (SupportsOptAttr (OptionalAttribute::kHDRModeEnabled ))
102
102
{
103
103
VerifyOrReturnError (
104
104
HasFeature (Feature::kVideo ), CHIP_ERROR_INVALID_ARGUMENT,
105
105
ChipLogError (Zcl, " CameraAVStreamMgmt: Feature configuration error. if HDRModeEnabled, then Video feature required" ));
106
106
}
107
107
108
- if (SupportsOptAttr (OptionalAttribute::kSupportsNightVision ) || SupportsOptAttr (OptionalAttribute::kSupportsNightVisionIllum ))
108
+ if (SupportsOptAttr (OptionalAttribute::kNightVision ) || SupportsOptAttr (OptionalAttribute::kNightVisionIllum ))
109
109
{
110
110
VerifyOrReturnError (HasFeature (Feature::kVideo ) || HasFeature (Feature::kSnapshot ), CHIP_ERROR_INVALID_ARGUMENT,
111
111
ChipLogError (Zcl,
112
112
" CameraAVStreamMgmt: Feature configuration error. if NIghtVision is enabled, then "
113
113
" Video|Snapshot feature required" ));
114
114
}
115
115
116
- if (SupportsOptAttr (OptionalAttribute::kSupportsMicrophoneAGCEnabled ))
116
+ if (SupportsOptAttr (OptionalAttribute::kMicrophoneAGCEnabled ))
117
117
{
118
118
VerifyOrReturnError (
119
119
HasFeature (Feature::kAudio ), CHIP_ERROR_INVALID_ARGUMENT,
120
120
ChipLogError (Zcl,
121
121
" CameraAVStreamMgmt: Feature configuration error. if MicrophoneAGCEnabled, then Audio feature required" ));
122
122
}
123
123
124
- if (SupportsOptAttr (OptionalAttribute::kSupportsImageFlipHorizontal ) ||
125
- SupportsOptAttr (OptionalAttribute::kSupportsImageFlipVertical ) ||
126
- SupportsOptAttr (OptionalAttribute::kSupportsImageRotation ))
124
+ if (SupportsOptAttr (OptionalAttribute::kImageFlipHorizontal ) ||
125
+ SupportsOptAttr (OptionalAttribute::kImageFlipVertical ) ||
126
+ SupportsOptAttr (OptionalAttribute::kImageRotation ))
127
127
{
128
128
VerifyOrReturnError (HasFeature (Feature::kImageControl ), CHIP_ERROR_INVALID_ARGUMENT,
129
129
ChipLogError (Zcl,
@@ -412,7 +412,7 @@ CHIP_ERROR CameraAVStreamMgmtServer::Read(const ConcreteReadAttributePath & aPat
412
412
ReturnErrorOnFailure (aEncoder.Encode (mCurrentFrameRate ));
413
413
break ;
414
414
case HDRModeEnabled::Id:
415
- VerifyOrReturnError (HasFeature (Feature::kVideo ) && SupportsOptAttr (OptionalAttribute::kSupportsHDRModeEnabled ),
415
+ VerifyOrReturnError (HasFeature (Feature::kVideo ) && SupportsOptAttr (OptionalAttribute::kHDRModeEnabled ),
416
416
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
417
417
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get HDRModeEnabled, feature is not supported" ));
418
418
ReturnErrorOnFailure (aEncoder.Encode (mHDRModeEnabled ));
@@ -466,21 +466,21 @@ CHIP_ERROR CameraAVStreamMgmtServer::Read(const ConcreteReadAttributePath & aPat
466
466
ReturnErrorOnFailure (aEncoder.Encode (mSoftLivestreamPrivacyModeEnabled ));
467
467
break ;
468
468
case HardPrivacyModeOn::Id:
469
- VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kSupportsHardPrivacyModeOn ),
469
+ VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kHardPrivacyModeOn ),
470
470
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
471
471
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get HardPrivacyModeOn, feature is not supported" ));
472
472
ReturnErrorOnFailure (aEncoder.Encode (mHardPrivacyModeOn ));
473
473
break ;
474
474
case NightVision::Id:
475
475
VerifyOrReturnError ((HasFeature (Feature::kVideo ) || HasFeature (Feature::kSnapshot )) &&
476
- SupportsOptAttr (OptionalAttribute::kSupportsNightVision ),
476
+ SupportsOptAttr (OptionalAttribute::kNightVision ),
477
477
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
478
478
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get NightVision, feature is not supported" ));
479
479
ReturnErrorOnFailure (aEncoder.Encode (mNightVision ));
480
480
break ;
481
481
case NightVisionIllum::Id:
482
482
VerifyOrReturnError ((HasFeature (Feature::kVideo ) || HasFeature (Feature::kSnapshot )) &&
483
- SupportsOptAttr (OptionalAttribute::kSupportsNightVisionIllum ),
483
+ SupportsOptAttr (OptionalAttribute::kNightVisionIllum ),
484
484
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
485
485
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get NightVisionIllumination, feature is not supported" ));
486
486
ReturnErrorOnFailure (aEncoder.Encode (mNightVisionIllum ));
@@ -535,25 +535,25 @@ CHIP_ERROR CameraAVStreamMgmtServer::Read(const ConcreteReadAttributePath & aPat
535
535
ReturnErrorOnFailure (aEncoder.Encode (mMicrophoneMinLevel ));
536
536
break ;
537
537
case MicrophoneAGCEnabled::Id:
538
- VerifyOrReturnError (HasFeature (Feature::kAudio ) && SupportsOptAttr (OptionalAttribute::kSupportsMicrophoneAGCEnabled ),
538
+ VerifyOrReturnError (HasFeature (Feature::kAudio ) && SupportsOptAttr (OptionalAttribute::kMicrophoneAGCEnabled ),
539
539
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
540
540
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get MicrophoneAGCEnabled, feature is not supported" ));
541
541
ReturnErrorOnFailure (aEncoder.Encode (mMicrophoneAGCEnabled ));
542
542
break ;
543
543
case ImageRotation::Id:
544
- VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kSupportsImageRotation ),
544
+ VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kImageRotation ),
545
545
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
546
546
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get ImageRotation, feature is not supported" ));
547
547
ReturnErrorOnFailure (aEncoder.Encode (mImageRotation ));
548
548
break ;
549
549
case ImageFlipHorizontal::Id:
550
- VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kSupportsImageFlipHorizontal ),
550
+ VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kImageFlipHorizontal ),
551
551
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
552
552
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get ImageFlipHorizontal, feature is not supported" ));
553
553
ReturnErrorOnFailure (aEncoder.Encode (mImageFlipHorizontal ));
554
554
break ;
555
555
case ImageFlipVertical::Id:
556
- VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kSupportsImageFlipVertical ),
556
+ VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kImageFlipVertical ),
557
557
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
558
558
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get ImageFlipHorizontal, feature is not supported" ));
559
559
ReturnErrorOnFailure (aEncoder.Encode (mImageFlipVertical ));
@@ -571,13 +571,13 @@ CHIP_ERROR CameraAVStreamMgmtServer::Read(const ConcreteReadAttributePath & aPat
571
571
ReturnErrorOnFailure (aEncoder.Encode (mLocalSnapshotRecordingEnabled ));
572
572
break ;
573
573
case StatusLightEnabled::Id:
574
- VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kSupportsStatusLightEnabled ),
574
+ VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kStatusLightEnabled ),
575
575
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
576
576
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get StatusLightEnabled, feature is not supported" ));
577
577
ReturnErrorOnFailure (aEncoder.Encode (mStatusLightEnabled ));
578
578
break ;
579
579
case StatusLightBrightness::Id:
580
- VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kSupportsStatusLightBrightness ),
580
+ VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kStatusLightBrightness ),
581
581
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
582
582
ChipLogError (Zcl, " CameraAVStreamMgmt: can not get StatusLightBrightness, feature is not supported" ));
583
583
ReturnErrorOnFailure (aEncoder.Encode (mStatusLightBrightness ));
@@ -595,7 +595,7 @@ CHIP_ERROR CameraAVStreamMgmtServer::Write(const ConcreteDataAttributePath & aPa
595
595
{
596
596
case HDRModeEnabled::Id: {
597
597
// Optional Attribute if Video is supported
598
- VerifyOrReturnError (HasFeature (Feature::kVideo ) && SupportsOptAttr (OptionalAttribute::kSupportsHDRModeEnabled ),
598
+ VerifyOrReturnError (HasFeature (Feature::kVideo ) && SupportsOptAttr (OptionalAttribute::kHDRModeEnabled ),
599
599
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
600
600
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set HDRModeEnabled, feature is not supported" ));
601
601
@@ -623,7 +623,7 @@ CHIP_ERROR CameraAVStreamMgmtServer::Write(const ConcreteDataAttributePath & aPa
623
623
}
624
624
case NightVision::Id: {
625
625
VerifyOrReturnError ((HasFeature (Feature::kVideo ) || HasFeature (Feature::kSnapshot )) &&
626
- SupportsOptAttr (OptionalAttribute::kSupportsNightVision ),
626
+ SupportsOptAttr (OptionalAttribute::kNightVision ),
627
627
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
628
628
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set NightVision, feature is not supported" ));
629
629
@@ -633,7 +633,7 @@ CHIP_ERROR CameraAVStreamMgmtServer::Write(const ConcreteDataAttributePath & aPa
633
633
}
634
634
case NightVisionIllum::Id: {
635
635
VerifyOrReturnError ((HasFeature (Feature::kVideo ) || HasFeature (Feature::kSnapshot )) &&
636
- SupportsOptAttr (OptionalAttribute::kSupportsNightVisionIllum ),
636
+ SupportsOptAttr (OptionalAttribute::kNightVisionIllum ),
637
637
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
638
638
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set NightVisionIllumination, feature is not supported" ));
639
639
@@ -679,31 +679,31 @@ CHIP_ERROR CameraAVStreamMgmtServer::Write(const ConcreteDataAttributePath & aPa
679
679
return SetMicrophoneVolumeLevel (micVolLevel);
680
680
}
681
681
case MicrophoneAGCEnabled::Id: {
682
- VerifyOrReturnError (HasFeature (Feature::kAudio ) && SupportsOptAttr (OptionalAttribute::kSupportsMicrophoneAGCEnabled ),
682
+ VerifyOrReturnError (HasFeature (Feature::kAudio ) && SupportsOptAttr (OptionalAttribute::kMicrophoneAGCEnabled ),
683
683
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
684
684
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set MicrophoneAGCEnabled, feature is not supported" ));
685
685
bool micAGCEnabled;
686
686
ReturnErrorOnFailure (aDecoder.Decode (micAGCEnabled));
687
687
return SetMicrophoneAGCEnabled (micAGCEnabled);
688
688
}
689
689
case ImageRotation::Id: {
690
- VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kSupportsImageRotation ),
690
+ VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kImageRotation ),
691
691
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
692
692
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set ImageRotation, feature is not supported" ));
693
693
uint16_t imageRotation;
694
694
ReturnErrorOnFailure (aDecoder.Decode (imageRotation));
695
695
return SetImageRotation (imageRotation);
696
696
}
697
697
case ImageFlipHorizontal::Id: {
698
- VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kSupportsImageFlipHorizontal ),
698
+ VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kImageFlipHorizontal ),
699
699
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
700
700
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set ImageFlipHorizontal, feature is not supported" ));
701
701
bool imageFlipHorizontal;
702
702
ReturnErrorOnFailure (aDecoder.Decode (imageFlipHorizontal));
703
703
return SetImageFlipHorizontal (imageFlipHorizontal);
704
704
}
705
705
case ImageFlipVertical::Id: {
706
- VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kSupportsImageFlipVertical ),
706
+ VerifyOrReturnError (HasFeature (Feature::kImageControl ) && SupportsOptAttr (OptionalAttribute::kImageFlipVertical ),
707
707
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
708
708
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set ImageFlipVertical, feature is not supported" ));
709
709
bool imageFlipVertical;
@@ -727,15 +727,15 @@ CHIP_ERROR CameraAVStreamMgmtServer::Write(const ConcreteDataAttributePath & aPa
727
727
return SetLocalSnapshotRecordingEnabled (localSnapshotRecEnabled);
728
728
}
729
729
case StatusLightEnabled::Id: {
730
- VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kSupportsStatusLightEnabled ),
730
+ VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kStatusLightEnabled ),
731
731
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
732
732
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set StatusLightEnabled, feature is not supported" ));
733
733
bool statusLightEnabled;
734
734
ReturnErrorOnFailure (aDecoder.Decode (statusLightEnabled));
735
735
return SetStatusLightEnabled (statusLightEnabled);
736
736
}
737
737
case StatusLightBrightness::Id: {
738
- VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kSupportsStatusLightBrightness ),
738
+ VerifyOrReturnError (SupportsOptAttr (OptionalAttribute::kStatusLightBrightness ),
739
739
CHIP_IM_GLOBAL_STATUS (UnsupportedAttribute),
740
740
ChipLogError (Zcl, " CameraAVStreamMgmt: can not set StatusLightBrightness, feature is not supported" ));
741
741
Globals::ThreeLevelAutoEnum statusLightBrightness;
0 commit comments