Skip to content

Commit ef6ec1b

Browse files
committed
Restyle fixes.
1 parent 0968da0 commit ef6ec1b

File tree

2 files changed

+19
-34
lines changed

2 files changed

+19
-34
lines changed

src/app/clusters/camera-av-stream-management-server/camera-av-stream-management-server.cpp

+13-16
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ CHIP_ERROR CameraAVStreamMgmtServer::Init()
121121
"CameraAVStreamMgmt: Feature configuration error. if MicrophoneAGCEnabled, then Audio feature required"));
122122
}
123123

124-
if (SupportsOptAttr(OptionalAttribute::kImageFlipHorizontal) ||
125-
SupportsOptAttr(OptionalAttribute::kImageFlipVertical) ||
124+
if (SupportsOptAttr(OptionalAttribute::kImageFlipHorizontal) || SupportsOptAttr(OptionalAttribute::kImageFlipVertical) ||
126125
SupportsOptAttr(OptionalAttribute::kImageRotation))
127126
{
128127
VerifyOrReturnError(HasFeature(Feature::kImageControl), CHIP_ERROR_INVALID_ARGUMENT,
@@ -466,8 +465,7 @@ CHIP_ERROR CameraAVStreamMgmtServer::Read(const ConcreteReadAttributePath & aPat
466465
ReturnErrorOnFailure(aEncoder.Encode(mSoftLivestreamPrivacyModeEnabled));
467466
break;
468467
case HardPrivacyModeOn::Id:
469-
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kHardPrivacyModeOn),
470-
CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
468+
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kHardPrivacyModeOn), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
471469
ChipLogError(Zcl, "CameraAVStreamMgmt: can not get HardPrivacyModeOn, feature is not supported"));
472470
ReturnErrorOnFailure(aEncoder.Encode(mHardPrivacyModeOn));
473471
break;
@@ -571,14 +569,12 @@ CHIP_ERROR CameraAVStreamMgmtServer::Read(const ConcreteReadAttributePath & aPat
571569
ReturnErrorOnFailure(aEncoder.Encode(mLocalSnapshotRecordingEnabled));
572570
break;
573571
case StatusLightEnabled::Id:
574-
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightEnabled),
575-
CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
572+
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightEnabled), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
576573
ChipLogError(Zcl, "CameraAVStreamMgmt: can not get StatusLightEnabled, feature is not supported"));
577574
ReturnErrorOnFailure(aEncoder.Encode(mStatusLightEnabled));
578575
break;
579576
case StatusLightBrightness::Id:
580-
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightBrightness),
581-
CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
577+
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightBrightness), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
582578
ChipLogError(Zcl, "CameraAVStreamMgmt: can not get StatusLightBrightness, feature is not supported"));
583579
ReturnErrorOnFailure(aEncoder.Encode(mStatusLightBrightness));
584580
break;
@@ -727,16 +723,14 @@ CHIP_ERROR CameraAVStreamMgmtServer::Write(const ConcreteDataAttributePath & aPa
727723
return SetLocalSnapshotRecordingEnabled(localSnapshotRecEnabled);
728724
}
729725
case StatusLightEnabled::Id: {
730-
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightEnabled),
731-
CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
726+
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightEnabled), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
732727
ChipLogError(Zcl, "CameraAVStreamMgmt: can not set StatusLightEnabled, feature is not supported"));
733728
bool statusLightEnabled;
734729
ReturnErrorOnFailure(aDecoder.Decode(statusLightEnabled));
735730
return SetStatusLightEnabled(statusLightEnabled);
736731
}
737732
case StatusLightBrightness::Id: {
738-
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightBrightness),
739-
CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
733+
VerifyOrReturnError(SupportsOptAttr(OptionalAttribute::kStatusLightBrightness), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute),
740734
ChipLogError(Zcl, "CameraAVStreamMgmt: can not set StatusLightBrightness, feature is not supported"));
741735
Globals::ThreeLevelAutoEnum statusLightBrightness;
742736
ReturnErrorOnFailure(aDecoder.Decode(statusLightBrightness));
@@ -1504,11 +1498,14 @@ void CameraAVStreamMgmtServer::HandleVideoStreamAllocate(HandlerContext & ctx,
15041498
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::InvalidCommand);
15051499
});
15061500

1507-
VerifyOrReturn(minFrameRate >= 1 && minFrameRate <= maxFrameRate && maxFrameRate >= 1, ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError));
1501+
VerifyOrReturn(minFrameRate >= 1 && minFrameRate <= maxFrameRate && maxFrameRate >= 1,
1502+
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError));
15081503

1509-
VerifyOrReturn(minBitRate >= 1 && minBitRate <= maxBitRate && maxBitRate >= 1, ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError));
1504+
VerifyOrReturn(minBitRate >= 1 && minBitRate <= maxBitRate && maxBitRate >= 1,
1505+
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError));
15101506

1511-
VerifyOrReturn(minFragmentLen <= maxFragmentLen && maxFragmentLen <= kMaxFragmentLenMaxValue, ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError));
1507+
VerifyOrReturn(minFragmentLen <= maxFragmentLen && maxFragmentLen <= kMaxFragmentLenMaxValue,
1508+
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError));
15121509

15131510
// Call the delegate
15141511
status =
@@ -1605,7 +1602,7 @@ void CameraAVStreamMgmtServer::HandleAudioStreamAllocate(HandlerContext & ctx,
16051602
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError);
16061603
});
16071604

1608-
VerifyOrReturn(channelCount >=1 && channelCount <= kMaxChannelCount, {
1605+
VerifyOrReturn(channelCount >= 1 && channelCount <= kMaxChannelCount, {
16091606
ChipLogError(Zcl, "CameraAVStreamMgmt: Invalid channel count");
16101607
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError);
16111608
});

src/app/clusters/camera-av-stream-management-server/camera-av-stream-management-server.h

+6-18
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ class CameraAVStreamMgmtServer : public CommandHandlerInterface, public Attribut
342342
* full-duplex, etc.
343343
* @param aSupportedSnapshotParams Indicates the set of supported snapshot parameters by the device, e.g., the image
344344
* codec, the resolution and the maximum frame rate.
345-
* @param aMaxNetworkBandwidth Indicates the maximum network bandwidth ( in mbps ) that the device would consume for
346-
* the transmission of its media streams.
345+
* @param aMaxNetworkBandwidth Indicates the maximum network bandwidth ( in mbps ) that the device would consume
346+
* for the transmission of its media streams.
347347
*
348348
*/
349349
CameraAVStreamMgmtServer(CameraAVStreamMgmtDelegate & aDelegate, EndpointId aEndpointId, const BitFlags<Feature> aFeature,
@@ -603,25 +603,13 @@ class CameraAVStreamMgmtServer : public CommandHandlerInterface, public Attribut
603603
return CHIP_NO_ERROR;
604604
}
605605

606-
bool IsAudioCodecValid(AudioCodecEnum audioCodec)
607-
{
608-
return (audioCodec != AudioCodecEnum::kUnknownEnumValue);
609-
}
606+
bool IsAudioCodecValid(AudioCodecEnum audioCodec) { return (audioCodec != AudioCodecEnum::kUnknownEnumValue); }
610607

611-
bool IsVideoCodecValid(VideoCodecEnum videoCodec)
612-
{
613-
return (videoCodec != VideoCodecEnum::kUnknownEnumValue);
614-
}
608+
bool IsVideoCodecValid(VideoCodecEnum videoCodec) { return (videoCodec != VideoCodecEnum::kUnknownEnumValue); }
615609

616-
bool IsImageCodecValid(ImageCodecEnum imageCodec)
617-
{
618-
return (imageCodec != ImageCodecEnum::kUnknownEnumValue);
619-
}
610+
bool IsImageCodecValid(ImageCodecEnum imageCodec) { return (imageCodec != ImageCodecEnum::kUnknownEnumValue); }
620611

621-
bool IsStreamUsageValid(StreamUsageEnum streamUsage)
622-
{
623-
return (streamUsage != StreamUsageEnum::kUnknownEnumValue);
624-
}
612+
bool IsStreamUsageValid(StreamUsageEnum streamUsage) { return (streamUsage != StreamUsageEnum::kUnknownEnumValue); }
625613

626614
bool IsBitDepthValid(uint8_t bitDepth) { return (bitDepth == 8 || bitDepth == 16 || bitDepth == 24 || bitDepth == 32); }
627615

0 commit comments

Comments
 (0)