summaryrefslogtreecommitdiff
path: root/sources/generated/Gst.Video/VideoVBIParser.cs
blob: d3cf48d6eacf7faac16ac6220f17b3fc8456ca84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// 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 VideoVBIParser : IEquatable<VideoVBIParser> {


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

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

		[DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_video_vbi_parser_new(int format, uint pixel_width);

		public static VideoVBIParser New(Gst.Video.VideoFormat format, uint pixel_width)
		{
			VideoVBIParser result = VideoVBIParser.New (gst_video_vbi_parser_new((int) format, pixel_width));
			return result;
		}

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

		public static GLib.GType GType { 
			get {
				IntPtr raw_ret = gst_video_vbi_parser_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_video_vbi_parser_add_line(IntPtr raw, byte[] data);

		public void AddLine(byte[] data) {
			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_vbi_parser_add_line(this_as_native, data);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

		[DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_video_vbi_parser_get_ancillary(IntPtr raw, IntPtr anc);

		public Gst.Video.VideoVBIParserResult GetAncillary(out Gst.Video.VideoAncillary anc) {
			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_anc = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Video.VideoAncillary)));
			int raw_ret = gst_video_vbi_parser_get_ancillary(this_as_native, native_anc);
			Gst.Video.VideoVBIParserResult ret = (Gst.Video.VideoVBIParserResult) raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			anc = Gst.Video.VideoAncillary.New (native_anc);
			Marshal.FreeHGlobal (native_anc);
			return ret;
		}

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

		public bool Equals (VideoVBIParser other)
		{
			return true;
		}

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

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

		public static explicit operator GLib.Value (Gst.Video.VideoVBIParser boxed)
		{
			GLib.Value val = GLib.Value.Empty;
			val.Init (Gst.Video.VideoVBIParser.GType);
			val.Val = boxed;
			return val;
		}

		public static explicit operator Gst.Video.VideoVBIParser (GLib.Value val)
		{
			return (Gst.Video.VideoVBIParser) val.Val;
		}
#endregion
	}
}