// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst.Video {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public partial struct VideoAffineTransformationMeta : IEquatable<VideoAffineTransformationMeta> {

		public Gst.Meta Meta;
		[MarshalAs (UnmanagedType.ByValArray, SizeConst=16)]
		public float[] Matrix;

		public static Gst.Video.VideoAffineTransformationMeta Zero = new Gst.Video.VideoAffineTransformationMeta ();

		public static Gst.Video.VideoAffineTransformationMeta New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return Gst.Video.VideoAffineTransformationMeta.Zero;
			return (Gst.Video.VideoAffineTransformationMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoAffineTransformationMeta));
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_video_affine_transformation_meta_apply_matrix(IntPtr raw, [MarshalAs(UnmanagedType.LPArray, SizeConst=16)]float[] matrix);

		public void ApplyMatrix(float[] matrix) {
			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_affine_transformation_meta_apply_matrix(this_as_native, matrix);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_video_affine_transformation_meta_get_info();

		public static Gst.MetaInfo Info { 
			get {
				IntPtr raw_ret = gst_video_affine_transformation_meta_get_info();
				Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
				return ret;
			}
		}

		static void ReadNative (IntPtr native, ref Gst.Video.VideoAffineTransformationMeta target)
		{
			target = New (native);
		}

		public bool Equals (VideoAffineTransformationMeta other)
		{
			return true && Meta.Equals (other.Meta) && Matrix.Equals (other.Matrix);
		}

		public override bool Equals (object other)
		{
			return other is VideoAffineTransformationMeta && Equals ((VideoAffineTransformationMeta) other);
		}

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ Matrix.GetHashCode ();
		}

		private static GLib.GType GType {
			get { return GLib.GType.Pointer; }
		}
#endregion
	}
}
