Struct bindings are broken when they iinclude a boxed type or a struct mapped to a GLib.Opaque
GstVideoFrame's first field is a GstVideoInfo. VideoFrame is bindinded like a struct and it's first field is generated as an IntPtr, because VideoInfo is binded using a GLib.Opaque class.
StructLayout(LayoutKind.Sequential)]
public partial struct VideoFrame : IEquatable<VideoFrame> {
private IntPtr _info;
public Gst.Video.VideoInfo Info {
get {
return _info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Video.VideoInfo), false);
}
set {
_info = value == null ? IntPtr.Zero : value.Handle;
}
}
The memory layout of the VideoFrame class does not matches the one of GstVideoFrame, the first field will has the size of a pointer and not the one of a VideoInfo.