diff --git a/Core/Camera/LumixData/CameraMode.cs b/Core/Camera/LumixData/CameraMode.cs index 4f36484..f1a48cf 100644 --- a/Core/Camera/LumixData/CameraMode.cs +++ b/Core/Camera/LumixData/CameraMode.cs @@ -34,6 +34,8 @@ public enum CameraMode [EnumValue(CameraModeFlags.Aperture | CameraModeFlags.Shutter | CameraModeFlags.Photo)] M = 04, + VideoRecording = 05, + [EnumValue(CameraModeFlags.Video)] vP = 0x3c, diff --git a/Core/Camera/OffFrameProcessor.cs b/Core/Camera/OffFrameProcessor.cs index e3d3d56..de7e232 100644 --- a/Core/Camera/OffFrameProcessor.cs +++ b/Core/Camera/OffFrameProcessor.cs @@ -25,7 +25,7 @@ public OffFrameProcessor(string deviceName, CameraParser parser, LumixState lumi public event Action LensChanged; - public bool OffframeBytesSupported { get; } = true; + public bool OffFrameBytesSupported { get; } = true; public int CalcImageStart(Slice slice) { @@ -38,7 +38,7 @@ public void Process(Slice slice, IntPoint size) { var state = new ProcessState(slice, GetMultiplier(slice)); - if (!OffframeBytesSupported || slice.Length < 130) + if (!OffFrameBytesSupported || slice.Length < 130) { return; } @@ -50,7 +50,11 @@ public void Process(Slice slice, IntPoint size) lumixState.Aperture = GetFromShort(state.Main, 56, parser.ApertureBinary); - lumixState.CameraMode = state.Main[92].ToEnum(CameraMode.Unknown); + var newmode = state.Main[92].ToEnum(CameraMode.Unknown); + if (newmode != CameraMode.VideoRecording) + { + lumixState.CameraMode = newmode; + } lumixState.Orientation = state.Original[42].ToEnum(CameraOrientation.Undefined);