forked from amkovkov/GranuSightSoftware2
fix: typo in CameraService
This commit is contained in:
@@ -13,7 +13,7 @@ public class CameraService : IDisposable
|
||||
public const int MAP_SHARED = 0x0001;
|
||||
|
||||
[DllImport("libc", SetLastError = true)] public static extern IntPtr mmap(IntPtr address, ulong length, int prot, int flags, int fd, ulong offset);
|
||||
[DllImport("libc", SetLastError = true)] public static extern int mumap(IntPtr address, ulong length);
|
||||
[DllImport("libc", SetLastError = true)] public static extern int munmap(IntPtr address, ulong length);
|
||||
}
|
||||
private sealed class MappedBuffer
|
||||
{
|
||||
@@ -115,9 +115,9 @@ public class CameraService : IDisposable
|
||||
CameraSelect(effectiveCancellationToken);
|
||||
CameraAcquire(effectiveCancellationToken);
|
||||
CameraConfigure(effectiveCancellationToken);
|
||||
CameraStart(effectiveCancellationToken);
|
||||
FrameBuffersAllocate(effectiveCancellationToken);
|
||||
ImageCaptureFrameBuffersMap(effectiveCancellationToken);
|
||||
CameraStart(effectiveCancellationToken);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -244,7 +244,6 @@ public class CameraService : IDisposable
|
||||
|
||||
_frameBufferAllocator = new FrameBufferAllocator(_camera);
|
||||
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
int result = _frameBufferAllocator.Allocate(_viewFinderStream);
|
||||
@@ -443,7 +442,7 @@ public class CameraService : IDisposable
|
||||
if (_state.HasFlag(State.ImageCaptureFrameBuffersMapped) && _mappedBuffers is not null)
|
||||
{
|
||||
foreach (var buffer in _mappedBuffers)
|
||||
LibC.mumap(buffer.Address, buffer.Length);
|
||||
LibC.munmap(buffer.Address, buffer.Length);
|
||||
_mappedBuffers.Clear();
|
||||
}
|
||||
if (_state.HasFlag(State.ViewFinderFrameBufferAllocated) && _viewFinderStream is not null)
|
||||
|
||||
Reference in New Issue
Block a user