diff --git a/FlashCap.Core/Devices/V4L2Devices.cs b/FlashCap.Core/Devices/V4L2Devices.cs index 3701523..c9388a1 100644 --- a/FlashCap.Core/Devices/V4L2Devices.cs +++ b/FlashCap.Core/Devices/V4L2Devices.cs @@ -63,11 +63,11 @@ static IEnumerable EnumerateStepWise( NativeMethods.DefactoStandardResolutions. Where(r => r.Width >= stepwise.min_width && - r.Width <= stepwise.max_height && - (r.Width - stepwise.min_width % stepwise.step_width) == 0 && + r.Width <= stepwise.max_width && + ((r.Width - stepwise.min_width) % stepwise.step_width) == 0 && r.Height >= stepwise.min_height && r.Height <= stepwise.max_height && - (r.Height - stepwise.min_height % stepwise.step_height) == 0). + ((r.Height - stepwise.min_height) % stepwise.step_height) == 0). OrderByDescending(r => r). Select(r => new FrameSize { Width = r.Width, Height = r.Height, IsDiscrete = false, }); @@ -77,7 +77,7 @@ static IEnumerable EnumerateContinuous( NativeMethods.DefactoStandardResolutions. Where(r => r.Width >= stepwise.min_width && - r.Width <= stepwise.max_height && + r.Width <= stepwise.max_width && r.Height >= stepwise.min_height && r.Height <= stepwise.max_height). OrderByDescending(r => r). diff --git a/FlashCap.Core/Internal/NativeMethods.cs b/FlashCap.Core/Internal/NativeMethods.cs index 5d909c3..1374e1f 100644 --- a/FlashCap.Core/Internal/NativeMethods.cs +++ b/FlashCap.Core/Internal/NativeMethods.cs @@ -357,68 +357,73 @@ public override string ToString() => { Resolution.Create(10240, 4320), Resolution.Create(7680, 4800), - Resolution.Create(7680, 4320), + Resolution.Create(7680, 4320), // 8K Resolution.Create(7680, 3200), Resolution.Create(6400, 4800), Resolution.Create(6400, 4096), Resolution.Create(5120, 4096), Resolution.Create(5120, 3200), - Resolution.Create(5120, 2880), + Resolution.Create(5120, 2880), // 5K Resolution.Create(5120, 2160), Resolution.Create(4500, 3000), Resolution.Create(4096, 3072), - Resolution.Create(4096, 2160), + Resolution.Create(4096, 2160), // 4K + Resolution.Create(4000, 3000), // 12MP Resolution.Create(3840, 2400), - Resolution.Create(3840, 2160), + Resolution.Create(3840, 2160), // 8MP Resolution.Create(3840, 1600), Resolution.Create(3440, 1440), Resolution.Create(3200, 2400), Resolution.Create(3200, 2048), + Resolution.Create(3072, 2048), Resolution.Create(3000, 2000), Resolution.Create(2960, 1440), Resolution.Create(2880, 1800), Resolution.Create(2880, 1440), + Resolution.Create(2688, 1520), // 4MP + Resolution.Create(2592, 1944), // 5MP Resolution.Create(2560, 2048), Resolution.Create(2560, 1600), Resolution.Create(2560, 1440), Resolution.Create(2560, 1080), Resolution.Create(2160, 1440), - Resolution.Create(2048, 1536), + Resolution.Create(2048, 1536), // 3MP Resolution.Create(2048, 1152), - Resolution.Create(2048, 1080), + Resolution.Create(2048, 1080), // 2K Resolution.Create(1920, 1440), Resolution.Create(1920, 1280), Resolution.Create(1920, 1200), - Resolution.Create(1920, 1080), + Resolution.Create(1920, 1080), // 1080p Resolution.Create(1680, 1050), - Resolution.Create(1600, 1200), + Resolution.Create(1600, 1200), // 2MP Resolution.Create(1600, 900), Resolution.Create(1440, 900), Resolution.Create(1400, 1050), Resolution.Create(1366, 768), Resolution.Create(1360, 768), - Resolution.Create(1280, 1024), - Resolution.Create(1280, 960), - Resolution.Create(1280, 720), + Resolution.Create(1280, 1024), // 1.3MP + Resolution.Create(1280, 960), // 960p + Resolution.Create(1280, 720), // 720p Resolution.Create(1152, 900), Resolution.Create(1152, 870), Resolution.Create(1152, 864), Resolution.Create(1056, 400), Resolution.Create(1024, 768), + Resolution.Create(960, 480), // 960H Resolution.Create(832, 624), Resolution.Create(800, 600), Resolution.Create(720, 576), - Resolution.Create(720, 480), + Resolution.Create(720, 480), // D1 Resolution.Create(720, 400), Resolution.Create(720, 350), - Resolution.Create(640, 480), + Resolution.Create(640, 480), // VGA Resolution.Create(640, 400), Resolution.Create(640, 350), Resolution.Create(640, 200), Resolution.Create(512, 384), Resolution.Create(480, 272), Resolution.Create(480, 720), - Resolution.Create(320, 240), + Resolution.Create(320, 240), // QVGA Resolution.Create(320, 200), Resolution.Create(240, 160), Resolution.Create(160, 200), @@ -445,6 +450,7 @@ public override string ToString() => Fraction.Create(12000, 1001), Fraction.Create(10), Fraction.Create(5), + Fraction.Create(1), }; ////////////////////////////////////////////////////////////////////////