Skip to content

Commit

Permalink
Adjusted some declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Apr 10, 2024
1 parent a95cb34 commit 08c7554
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
34 changes: 27 additions & 7 deletions FlashCap.Core/Internal/V4L2/NativeMethods_V4L2_Interop_i686.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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); } }
}

}
Expand Down Expand Up @@ -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); } }
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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); } }
}

}
Expand Down Expand Up @@ -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); } }
}

}
Expand Down

0 comments on commit 08c7554

Please sign in to comment.