Release 1.20.0
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.PbUtils / EncodingTarget.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst.PbUtils {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         public partial class EncodingTarget : GLib.Object {
13
14                 public EncodingTarget (IntPtr raw) : base(raw) {}
15
16                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
17                 static extern IntPtr gst_encoding_target_new(IntPtr name, IntPtr category, IntPtr description, IntPtr profiles);
18
19                 public EncodingTarget (string name, string category, string description, GLib.List profiles) : base (IntPtr.Zero)
20                 {
21                         if (GetType () != typeof (EncodingTarget)) {
22                                 var vals = new List<GLib.Value> ();
23                                 var names = new List<string> ();
24                                 CreateNativeObject (names.ToArray (), vals.ToArray ());
25                                 return;
26                         }
27                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
28                         IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category);
29                         IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description);
30                         Raw = gst_encoding_target_new(native_name, native_category, native_description, profiles == null ? IntPtr.Zero : profiles.Handle);
31                         GLib.Marshaller.Free (native_name);
32                         GLib.Marshaller.Free (native_category);
33                         GLib.Marshaller.Free (native_description);
34                 }
35
36                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
37                 static extern IntPtr gst_encoding_target_get_type();
38
39                 public static new GLib.GType GType { 
40                         get {
41                                 IntPtr raw_ret = gst_encoding_target_get_type();
42                                 GLib.GType ret = new GLib.GType(raw_ret);
43                                 return ret;
44                         }
45                 }
46
47                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
48                 static extern unsafe IntPtr gst_encoding_target_load(IntPtr name, IntPtr category, out IntPtr error);
49
50                 public static unsafe Gst.PbUtils.EncodingTarget Load(string name, string category) {
51                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
52                         IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category);
53                         IntPtr error = IntPtr.Zero;
54                         IntPtr raw_ret = gst_encoding_target_load(native_name, native_category, out error);
55                         Gst.PbUtils.EncodingTarget ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingTarget;
56                         GLib.Marshaller.Free (native_name);
57                         GLib.Marshaller.Free (native_category);
58                         if (error != IntPtr.Zero) throw new GLib.GException (error);
59                         return ret;
60                 }
61
62                 public static Gst.PbUtils.EncodingTarget Load(string name) {
63                         return Load (name, null);
64                 }
65
66                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
67                 static extern unsafe IntPtr gst_encoding_target_load_from_file(IntPtr filepath, out IntPtr error);
68
69                 public static unsafe Gst.PbUtils.EncodingTarget LoadFromFile(string filepath) {
70                         IntPtr native_filepath = GLib.Marshaller.StringToFilenamePtr (filepath);
71                         IntPtr error = IntPtr.Zero;
72                         IntPtr raw_ret = gst_encoding_target_load_from_file(native_filepath, out error);
73                         Gst.PbUtils.EncodingTarget ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingTarget;
74                         GLib.Marshaller.Free (native_filepath);
75                         if (error != IntPtr.Zero) throw new GLib.GException (error);
76                         return ret;
77                 }
78
79                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
80                 static extern bool gst_encoding_target_add_profile(IntPtr raw, IntPtr profile);
81
82                 public bool AddProfile(Gst.PbUtils.EncodingProfile profile) {
83                         bool raw_ret = gst_encoding_target_add_profile(Handle, profile == null ? IntPtr.Zero : profile.OwnedHandle);
84                         bool ret = raw_ret;
85                         return ret;
86                 }
87
88                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
89                 static extern IntPtr gst_encoding_target_get_category(IntPtr raw);
90
91                 public string Category { 
92                         get {
93                                 IntPtr raw_ret = gst_encoding_target_get_category(Handle);
94                                 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
95                                 return ret;
96                         }
97                 }
98
99                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
100                 static extern IntPtr gst_encoding_target_get_description(IntPtr raw);
101
102                 public string Description { 
103                         get {
104                                 IntPtr raw_ret = gst_encoding_target_get_description(Handle);
105                                 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
106                                 return ret;
107                         }
108                 }
109
110                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
111                 static extern IntPtr gst_encoding_target_get_name(IntPtr raw);
112
113                 public string Name { 
114                         get {
115                                 IntPtr raw_ret = gst_encoding_target_get_name(Handle);
116                                 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
117                                 return ret;
118                         }
119                 }
120
121                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
122                 static extern IntPtr gst_encoding_target_get_path(IntPtr raw);
123
124                 public string Path { 
125                         get {
126                                 IntPtr raw_ret = gst_encoding_target_get_path(Handle);
127                                 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
128                                 return ret;
129                         }
130                 }
131
132                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
133                 static extern IntPtr gst_encoding_target_get_profile(IntPtr raw, IntPtr name);
134
135                 public Gst.PbUtils.EncodingProfile GetProfile(string name) {
136                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
137                         IntPtr raw_ret = gst_encoding_target_get_profile(Handle, native_name);
138                         Gst.PbUtils.EncodingProfile ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingProfile;
139                         GLib.Marshaller.Free (native_name);
140                         return ret;
141                 }
142
143                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
144                 static extern IntPtr gst_encoding_target_get_profiles(IntPtr raw);
145
146                 public Gst.PbUtils.EncodingProfile[] Profiles { 
147                         get {
148                                 IntPtr raw_ret = gst_encoding_target_get_profiles(Handle);
149                                 Gst.PbUtils.EncodingProfile[] ret = (Gst.PbUtils.EncodingProfile[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gst.PbUtils.EncodingProfile));
150                                 return ret;
151                         }
152                 }
153
154                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
155                 static extern unsafe bool gst_encoding_target_save(IntPtr raw, out IntPtr error);
156
157                 public unsafe bool Save() {
158                         IntPtr error = IntPtr.Zero;
159                         bool raw_ret = gst_encoding_target_save(Handle, out error);
160                         bool ret = raw_ret;
161                         if (error != IntPtr.Zero) throw new GLib.GException (error);
162                         return ret;
163                 }
164
165                 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
166                 static extern unsafe bool gst_encoding_target_save_to_file(IntPtr raw, IntPtr filepath, out IntPtr error);
167
168                 public unsafe bool SaveToFile(string filepath) {
169                         IntPtr native_filepath = GLib.Marshaller.StringToFilenamePtr (filepath);
170                         IntPtr error = IntPtr.Zero;
171                         bool raw_ret = gst_encoding_target_save_to_file(Handle, native_filepath, out error);
172                         bool ret = raw_ret;
173                         GLib.Marshaller.Free (native_filepath);
174                         if (error != IntPtr.Zero) throw new GLib.GException (error);
175                         return ret;
176                 }
177
178
179                 static EncodingTarget ()
180                 {
181                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
182                 }
183 #endregion
184         }
185 }