1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
4 namespace Gst.PbUtils {
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class EncodingTarget : GLib.Object {
14 public EncodingTarget (IntPtr raw) : base(raw) {}
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);
19 public EncodingTarget (string name, string category, string description, GLib.List profiles) : base (IntPtr.Zero)
21 if (GetType () != typeof (EncodingTarget)) {
22 var vals = new List<GLib.Value> ();
23 var names = new List<string> ();
24 CreateNativeObject (names.ToArray (), vals.ToArray ());
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);
36 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
37 static extern IntPtr gst_encoding_target_get_type();
39 public static new GLib.GType GType {
41 IntPtr raw_ret = gst_encoding_target_get_type();
42 GLib.GType ret = new GLib.GType(raw_ret);
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);
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);
62 public static Gst.PbUtils.EncodingTarget Load(string name) {
63 return Load (name, null);
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);
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);
79 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
80 static extern bool gst_encoding_target_add_profile(IntPtr raw, IntPtr profile);
82 public bool AddProfile(Gst.PbUtils.EncodingProfile profile) {
83 bool raw_ret = gst_encoding_target_add_profile(Handle, profile == null ? IntPtr.Zero : profile.OwnedHandle);
88 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
89 static extern IntPtr gst_encoding_target_get_category(IntPtr raw);
91 public string Category {
93 IntPtr raw_ret = gst_encoding_target_get_category(Handle);
94 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
99 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
100 static extern IntPtr gst_encoding_target_get_description(IntPtr raw);
102 public string Description {
104 IntPtr raw_ret = gst_encoding_target_get_description(Handle);
105 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
110 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
111 static extern IntPtr gst_encoding_target_get_name(IntPtr raw);
115 IntPtr raw_ret = gst_encoding_target_get_name(Handle);
116 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
121 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
122 static extern IntPtr gst_encoding_target_get_path(IntPtr raw);
126 IntPtr raw_ret = gst_encoding_target_get_path(Handle);
127 string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
132 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
133 static extern IntPtr gst_encoding_target_get_profile(IntPtr raw, IntPtr name);
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);
143 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
144 static extern IntPtr gst_encoding_target_get_profiles(IntPtr raw);
146 public Gst.PbUtils.EncodingProfile[] Profiles {
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));
154 [DllImport("gstpbutils-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
155 static extern unsafe bool gst_encoding_target_save(IntPtr raw, out IntPtr error);
157 public unsafe bool Save() {
158 IntPtr error = IntPtr.Zero;
159 bool raw_ret = gst_encoding_target_save(Handle, out error);
161 if (error != IntPtr.Zero) throw new GLib.GException (error);
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);
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);
173 GLib.Marshaller.Free (native_filepath);
174 if (error != IntPtr.Zero) throw new GLib.GException (error);
179 static EncodingTarget ()
181 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();