diff --git a/FlashCap.Core/Internal/IndependentSingleApartmentContext.cs b/FlashCap.Core/Internal/IndependentSingleApartmentContext.cs index e573ccb..14eba82 100644 --- a/FlashCap.Core/Internal/IndependentSingleApartmentContext.cs +++ b/FlashCap.Core/Internal/IndependentSingleApartmentContext.cs @@ -120,7 +120,7 @@ public IndependentSingleApartmentContext() this.thread.SetApartmentState(ApartmentState.STA); // Improved compatibility this.thread.Start(); - this.ready.Wait(); + this.ready!.Wait(); this.ready.Dispose(); this.ready = null; } diff --git a/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_i686.cs b/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_i686.cs index 20e881f..536bd0c 100644 --- a/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_i686.cs +++ b/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_i686.cs @@ -255,7 +255,6 @@ internal sealed class NativeMethods_V4L2_Interop_i686 : NativeMethods_V4L2_Inter public override uint VIDIOC_QUERYMENU => 3224131109U; public override uint VIDIOC_QUERYSTD => 2148030015U; public override uint VIDIOC_REQBUFS => 3222558216U; - public override uint VIDIOC_RESERVED => 22017U; public override uint VIDIOC_S_AUDIO => 1077171746U; public override uint VIDIOC_S_AUDOUT => 1077171762U; public override uint VIDIOC_S_CROP => 1075074620U; @@ -434,6 +433,13 @@ public uint reserved2 set => this.reserved2_ = (uint)value; } + [FieldOffset(64)] private int request_fd_; + public int request_fd + { + get => this.request_fd_; + set => this.request_fd_ = (int)value; + } + [FieldOffset(64)] private uint reserved_; public uint reserved { @@ -557,11 +563,18 @@ public uint pixelformat set => this.pixelformat_ = (uint)value; } - [FieldOffset(48)] private fixed uint reserved_[4]; + [FieldOffset(48)] private uint mbus_code_; + public uint mbus_code + { + get => this.mbus_code_; + set => this.mbus_code_ = (uint)value; + } + + [FieldOffset(52)] private fixed uint reserved_[3]; public uint[] reserved { - get { fixed (uint* p = this.reserved_) { return get(p, 4); } } - set { fixed (uint* p = this.reserved_) { set(p, value, 4); } } + get { fixed (uint* p = this.reserved_) { return get(p, 3); } } + set { fixed (uint* p = this.reserved_) { set(p, value, 3); } } } } @@ -1215,11 +1228,18 @@ public uint memory set => this.memory_ = (uint)value; } - [FieldOffset(12)] private fixed uint reserved_[2]; + [FieldOffset(12)] private uint capabilities_; + public uint capabilities + { + get => this.capabilities_; + set => this.capabilities_ = (uint)value; + } + + [FieldOffset(16)] private fixed uint reserved_[1]; public uint[] reserved { - get { fixed (uint* p = this.reserved_) { return get(p, 2); } } - set { fixed (uint* p = this.reserved_) { set(p, value, 2); } } + get { fixed (uint* p = this.reserved_) { return get(p, 1); } } + set { fixed (uint* p = this.reserved_) { set(p, value, 1); } } } } diff --git a/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_loongarch64.cs b/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_loongarch64.cs index 6d4af9a..bb5f401 100644 --- a/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_loongarch64.cs +++ b/FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_loongarch64.cs @@ -189,6 +189,13 @@ public uint reserved2 set => this.reserved2_ = (uint)value; } + [FieldOffset(80)] private int request_fd_; + public int request_fd + { + get => this.request_fd_; + set => this.request_fd_ = (int)value; + } + [FieldOffset(80)] private uint reserved_; public uint reserved { @@ -312,11 +319,18 @@ public uint pixelformat set => this.pixelformat_ = (uint)value; } - [FieldOffset(48)] private fixed uint reserved_[4]; + [FieldOffset(48)] private uint mbus_code_; + public uint mbus_code + { + get => this.mbus_code_; + set => this.mbus_code_ = (uint)value; + } + + [FieldOffset(52)] private fixed uint reserved_[3]; public uint[] reserved { - get { fixed (uint* p = this.reserved_) { return get(p, 4); } } - set { fixed (uint* p = this.reserved_) { set(p, value, 4); } } + get { fixed (uint* p = this.reserved_) { return get(p, 3); } } + set { fixed (uint* p = this.reserved_) { set(p, value, 3); } } } } @@ -970,11 +984,18 @@ public uint memory set => this.memory_ = (uint)value; } - [FieldOffset(12)] private fixed uint reserved_[2]; + [FieldOffset(12)] private uint capabilities_; + public uint capabilities + { + get => this.capabilities_; + set => this.capabilities_ = (uint)value; + } + + [FieldOffset(16)] private fixed uint reserved_[1]; public uint[] reserved { - get { fixed (uint* p = this.reserved_) { return get(p, 2); } } - set { fixed (uint* p = this.reserved_) { set(p, value, 2); } } + get { fixed (uint* p = this.reserved_) { return get(p, 1); } } + set { fixed (uint* p = this.reserved_) { set(p, value, 1); } } } }