gstreamer/subprojects/gstreamer-sharp/sources/generated/Gst/CustomMeta.cs

80 lines
2.6 KiB
C#

// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct CustomMeta : IEquatable<CustomMeta> {
public Gst.Meta Meta;
public static Gst.CustomMeta Zero = new Gst.CustomMeta ();
public static Gst.CustomMeta New(IntPtr raw) {
if (raw == IntPtr.Zero)
return Gst.CustomMeta.Zero;
return (Gst.CustomMeta) Marshal.PtrToStructure (raw, typeof (Gst.CustomMeta));
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_custom_meta_get_structure(IntPtr raw);
public Gst.Structure Structure {
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);
IntPtr raw_ret = gst_custom_meta_get_structure(this_as_native);
Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_custom_meta_has_name(IntPtr raw, IntPtr name);
public bool HasName(string name) {
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_name = GLib.Marshaller.StringToPtrGStrdup (name);
bool raw_ret = gst_custom_meta_has_name(this_as_native, native_name);
bool ret = raw_ret;
ReadNative (this_as_native, ref this);
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
GLib.Marshaller.Free (native_name);
return ret;
}
static void ReadNative (IntPtr native, ref Gst.CustomMeta target)
{
target = New (native);
}
public bool Equals (CustomMeta other)
{
return true && Meta.Equals (other.Meta);
}
public override bool Equals (object other)
{
return other is CustomMeta && Equals ((CustomMeta) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}