Skip to content

Commit cdada88

Browse files
Update CameraManager.windows.cs
1 parent a249817 commit cdada88

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/CommunityToolkit.Maui.Camera/CameraManager.windows.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private partial void PlatformStopCameraPreview()
155155
IsInitialized = false;
156156
}
157157

158-
protected async Task PlatformUpdateResolution(Size resolution, CancellationToken token)
158+
async Task PlatformUpdateResolution(Size resolution, CancellationToken token)
159159
{
160160
if (!IsInitialized || mediaCapture is null)
161161
{
@@ -192,9 +192,10 @@ private async partial Task PlatformStartVideoRecording(Stream stream, Cancellati
192192
var profile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Auto);
193193
mediaRecording = await mediaCapture.PrepareLowLagRecordToStreamAsync(profile, stream.AsRandomAccessStream());
194194

195-
frameSource = mediaCapture.FrameSources.FirstOrDefault(source =>
196-
source.Value.Info.MediaStreamType == MediaStreamType.VideoRecord &&
197-
source.Value.Info.SourceKind == MediaFrameSourceKind.Color).Value;
195+
frameSource = mediaCapture.FrameSources
196+
.FirstOrDefault(static source => source.Value.Info.MediaStreamType is MediaStreamType.VideoRecord && source.Value.Info.SourceKind is MediaFrameSourceKind.Color)
197+
.Value;
198+
198199
if (frameSource is not null)
199200
{
200201
var frameFormat = frameSource.SupportedFormats

0 commit comments

Comments
 (0)