Skip to content

Commit f5e95d4

Browse files
committed
Add NV12 to supported pixel formats in NativeMethods_V4L2.cs
1 parent 51ac1e4 commit f5e95d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

FlashCap.Core/Internal/NativeMethods_V4L2.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ static NativeMethods_V4L2()
9191
pixelFormats.Add(Interop.V4L2_PIX_FMT_UYVY, PixelFormats.UYVY);
9292
pixelFormats.Add(Interop.V4L2_PIX_FMT_YUYV, PixelFormats.YUYV);
9393
pixelFormats.Add(Interop.V4L2_PIX_FMT_YUY2, PixelFormats.YUYV);
94+
pixelFormats.Add(Interop.V4L2_PIX_FMT_NV12, PixelFormats.NV12);
9495
}
9596

9697
public static bool IsKnownPixelFormat(uint pix_fmt) =>
@@ -324,6 +325,8 @@ public static uint[] GetPixelFormats(
324325
return new[] { Interop.V4L2_PIX_FMT_UYVY };
325326
case PixelFormats.YUYV:
326327
return new[] { Interop.V4L2_PIX_FMT_YUYV, Interop.V4L2_PIX_FMT_YUY2 };
328+
case PixelFormats.NV12:
329+
return new[] { Interop.V4L2_PIX_FMT_NV12 };
327330
case PixelFormats.JPEG:
328331
return new[] { Interop.V4L2_PIX_FMT_MJPEG, Interop.V4L2_PIX_FMT_JPEG, (uint)NativeMethods.Compression.BI_JPEG };
329332
case PixelFormats.PNG:

0 commit comments

Comments
 (0)