diff options
Diffstat (limited to 'sources/generated/Gst.Video/VideoOverlayComposition.cs')
-rw-r--r-- | sources/generated/Gst.Video/VideoOverlayComposition.cs | 109 |
1 files changed, 34 insertions, 75 deletions
diff --git a/sources/generated/Gst.Video/VideoOverlayComposition.cs b/sources/generated/Gst.Video/VideoOverlayComposition.cs index 4142d6b..d6f6b9d 100644 --- a/sources/generated/Gst.Video/VideoOverlayComposition.cs +++ b/sources/generated/Gst.Video/VideoOverlayComposition.cs @@ -9,26 +9,7 @@ namespace Gst.Video { using System.Runtime.InteropServices; #region Autogenerated code - [StructLayout(LayoutKind.Sequential)] - public partial struct VideoOverlayComposition : IEquatable<VideoOverlayComposition> { - - - public static Gst.Video.VideoOverlayComposition Zero = new Gst.Video.VideoOverlayComposition (); - - public static Gst.Video.VideoOverlayComposition New(IntPtr raw) { - if (raw == IntPtr.Zero) - return Gst.Video.VideoOverlayComposition.Zero; - return (Gst.Video.VideoOverlayComposition) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoOverlayComposition)); - } - - [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gst_video_overlay_composition_new(IntPtr rectangle); - - public static VideoOverlayComposition New(Gst.Video.VideoOverlayRectangle rectangle) - { - VideoOverlayComposition result = VideoOverlayComposition.New (gst_video_overlay_composition_new(rectangle == null ? IntPtr.Zero : rectangle.Handle)); - return result; - } + public partial class VideoOverlayComposition : Gst.MiniObject { [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_video_overlay_composition_get_type(); @@ -45,38 +26,35 @@ namespace Gst.Video { static extern void gst_video_overlay_composition_add_rectangle(IntPtr raw, IntPtr rectangle); public void AddRectangle(Gst.Video.VideoOverlayRectangle rectangle) { - IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); - System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); - gst_video_overlay_composition_add_rectangle(this_as_native, rectangle == null ? IntPtr.Zero : rectangle.Handle); - ReadNative (this_as_native, ref this); - System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + gst_video_overlay_composition_add_rectangle(Handle, rectangle == null ? IntPtr.Zero : rectangle.Handle); } [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gst_video_overlay_composition_blend(IntPtr raw, IntPtr video_buf); public bool Blend(Gst.Video.VideoFrame video_buf) { - IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); - System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); IntPtr native_video_buf = GLib.Marshaller.StructureToPtrAlloc (video_buf); - bool raw_ret = gst_video_overlay_composition_blend(this_as_native, native_video_buf); + bool raw_ret = gst_video_overlay_composition_blend(Handle, native_video_buf); bool ret = raw_ret; - ReadNative (this_as_native, ref this); - System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); Marshal.FreeHGlobal (native_video_buf); return ret; } [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_copy(IntPtr raw); + + public Gst.Video.VideoOverlayComposition Copy() { + IntPtr raw_ret = gst_video_overlay_composition_copy(Handle); + Gst.Video.VideoOverlayComposition ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoOverlayComposition) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoOverlayComposition), true); + return ret; + } + + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_video_overlay_composition_get_rectangle(IntPtr raw, uint n); public Gst.Video.VideoOverlayRectangle GetRectangle(uint n) { - IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); - System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); - IntPtr raw_ret = gst_video_overlay_composition_get_rectangle(this_as_native, n); + IntPtr raw_ret = gst_video_overlay_composition_get_rectangle(Handle, n); Gst.Video.VideoOverlayRectangle ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoOverlayRectangle) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoOverlayRectangle), false); - ReadNative (this_as_native, ref this); - System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } @@ -85,12 +63,8 @@ namespace Gst.Video { public uint Seqnum { get { - IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); - System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); - uint raw_ret = gst_video_overlay_composition_get_seqnum(this_as_native); + uint raw_ret = gst_video_overlay_composition_get_seqnum(Handle); uint ret = raw_ret; - ReadNative (this_as_native, ref this); - System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } } @@ -99,12 +73,8 @@ namespace Gst.Video { static extern IntPtr gst_video_overlay_composition_make_writable(IntPtr raw); public Gst.Video.VideoOverlayComposition MakeWritable() { - IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); - System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); - IntPtr raw_ret = gst_video_overlay_composition_make_writable(this_as_native); - Gst.Video.VideoOverlayComposition ret = Gst.Video.VideoOverlayComposition.New (raw_ret); - ReadNative (this_as_native, ref this); - System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + IntPtr raw_ret = gst_video_overlay_composition_make_writable(Handle); + Gst.Video.VideoOverlayComposition ret = raw_ret == IntPtr.Zero ? null : (Gst.Video.VideoOverlayComposition) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Video.VideoOverlayComposition), true); return ret; } @@ -112,47 +82,36 @@ namespace Gst.Video { static extern uint gst_video_overlay_composition_n_rectangles(IntPtr raw); public uint NRectangles() { - IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); - System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); - uint raw_ret = gst_video_overlay_composition_n_rectangles(this_as_native); + uint raw_ret = gst_video_overlay_composition_n_rectangles(Handle); uint ret = raw_ret; - ReadNative (this_as_native, ref this); - System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } - static void ReadNative (IntPtr native, ref Gst.Video.VideoOverlayComposition target) - { - target = New (native); - } + public VideoOverlayComposition(IntPtr raw) : base(raw) {} - public bool Equals (VideoOverlayComposition other) - { - return true; - } + [DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_overlay_composition_new(IntPtr rectangle); - public override bool Equals (object other) + public VideoOverlayComposition (Gst.Video.VideoOverlayRectangle rectangle) { - return other is VideoOverlayComposition && Equals ((VideoOverlayComposition) other); + Raw = gst_video_overlay_composition_new(rectangle == null ? IntPtr.Zero : rectangle.Handle); } - public override int GetHashCode () - { - return this.GetType ().FullName.GetHashCode (); - } - public static explicit operator GLib.Value (Gst.Video.VideoOverlayComposition boxed) - { - GLib.Value val = GLib.Value.Empty; - val.Init (Gst.Video.VideoOverlayComposition.GType); - val.Val = boxed; - return val; - } + // Internal representation of the wrapped structure ABI. + static GLib.AbiStruct _abi_info = null; + static public new GLib.AbiStruct abi_info { + get { + if (_abi_info == null) + _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields); - public static explicit operator Gst.Video.VideoOverlayComposition (GLib.Value val) - { - return (Gst.Video.VideoOverlayComposition) val.Val; + return _abi_info; + } } + + + // End of the ABI representation. + #endregion } } |