1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class Registry : Gst.Object {
14 public Registry (IntPtr raw) : base(raw) {}
16 protected Registry() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 [GLib.Signal("plugin-added")]
22 public event Gst.PluginAddedHandler PluginAdded {
24 this.AddSignalHandler ("plugin-added", value, typeof (Gst.PluginAddedArgs));
27 this.RemoveSignalHandler ("plugin-added", value);
31 [GLib.Signal("feature-added")]
32 public event Gst.FeatureAddedHandler FeatureAdded {
34 this.AddSignalHandler ("feature-added", value, typeof (Gst.FeatureAddedArgs));
37 this.RemoveSignalHandler ("feature-added", value);
41 static FeatureAddedNativeDelegate FeatureAdded_cb_delegate;
42 static FeatureAddedNativeDelegate FeatureAddedVMCallback {
44 if (FeatureAdded_cb_delegate == null)
45 FeatureAdded_cb_delegate = new FeatureAddedNativeDelegate (FeatureAdded_cb);
46 return FeatureAdded_cb_delegate;
50 static void OverrideFeatureAdded (GLib.GType gtype)
52 OverrideFeatureAdded (gtype, FeatureAddedVMCallback);
55 static void OverrideFeatureAdded (GLib.GType gtype, FeatureAddedNativeDelegate callback)
57 OverrideVirtualMethod (gtype, "feature-added", callback);
59 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
60 delegate void FeatureAddedNativeDelegate (IntPtr inst, IntPtr feature);
62 static void FeatureAdded_cb (IntPtr inst, IntPtr feature)
65 Registry __obj = GLib.Object.GetObject (inst, false) as Registry;
66 __obj.OnFeatureAdded (GLib.Object.GetObject(feature) as Gst.PluginFeature);
67 } catch (Exception e) {
68 GLib.ExceptionManager.RaiseUnhandledException (e, false);
72 [GLib.DefaultSignalHandler(Type=typeof(Gst.Registry), ConnectionMethod="OverrideFeatureAdded")]
73 protected virtual void OnFeatureAdded (Gst.PluginFeature feature)
75 InternalFeatureAdded (feature);
78 private void InternalFeatureAdded (Gst.PluginFeature feature)
80 GLib.Value ret = GLib.Value.Empty;
81 GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
82 GLib.Value[] vals = new GLib.Value [2];
83 vals [0] = new GLib.Value (this);
84 inst_and_params.Append (vals [0]);
85 vals [1] = new GLib.Value (feature);
86 inst_and_params.Append (vals [1]);
87 g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
88 foreach (GLib.Value v in vals)
92 static PluginAddedNativeDelegate PluginAdded_cb_delegate;
93 static PluginAddedNativeDelegate PluginAddedVMCallback {
95 if (PluginAdded_cb_delegate == null)
96 PluginAdded_cb_delegate = new PluginAddedNativeDelegate (PluginAdded_cb);
97 return PluginAdded_cb_delegate;
101 static void OverridePluginAdded (GLib.GType gtype)
103 OverridePluginAdded (gtype, PluginAddedVMCallback);
106 static void OverridePluginAdded (GLib.GType gtype, PluginAddedNativeDelegate callback)
108 OverrideVirtualMethod (gtype, "plugin-added", callback);
110 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
111 delegate void PluginAddedNativeDelegate (IntPtr inst, IntPtr plugin);
113 static void PluginAdded_cb (IntPtr inst, IntPtr plugin)
116 Registry __obj = GLib.Object.GetObject (inst, false) as Registry;
117 __obj.OnPluginAdded (GLib.Object.GetObject(plugin) as Gst.Plugin);
118 } catch (Exception e) {
119 GLib.ExceptionManager.RaiseUnhandledException (e, false);
123 [GLib.DefaultSignalHandler(Type=typeof(Gst.Registry), ConnectionMethod="OverridePluginAdded")]
124 protected virtual void OnPluginAdded (Gst.Plugin plugin)
126 InternalPluginAdded (plugin);
129 private void InternalPluginAdded (Gst.Plugin plugin)
131 GLib.Value ret = GLib.Value.Empty;
132 GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
133 GLib.Value[] vals = new GLib.Value [2];
134 vals [0] = new GLib.Value (this);
135 inst_and_params.Append (vals [0]);
136 vals [1] = new GLib.Value (plugin);
137 inst_and_params.Append (vals [1]);
138 g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
139 foreach (GLib.Value v in vals)
144 // Internal representation of the wrapped structure ABI.
145 static GLib.AbiStruct _class_abi = null;
146 static public new GLib.AbiStruct class_abi {
148 if (_class_abi == null)
149 _class_abi = new GLib.AbiStruct (Gst.Object.class_abi.Fields);
156 // End of the ABI representation.
158 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
159 static extern IntPtr gst_registry_get_type();
161 public static new GLib.GType GType {
163 IntPtr raw_ret = gst_registry_get_type();
164 GLib.GType ret = new GLib.GType(raw_ret);
169 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
170 static extern bool gst_registry_fork_is_enabled();
172 public static bool ForkIsEnabled() {
173 bool raw_ret = gst_registry_fork_is_enabled();
178 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
179 static extern void gst_registry_fork_set_enabled(bool enabled);
181 public static void ForkSetEnabled(bool enabled) {
182 gst_registry_fork_set_enabled(enabled);
185 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
186 static extern IntPtr gst_registry_get();
188 public static Gst.Registry Get() {
189 IntPtr raw_ret = gst_registry_get();
190 Gst.Registry ret = GLib.Object.GetObject(raw_ret) as Gst.Registry;
194 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
195 static extern bool gst_registry_add_feature(IntPtr raw, IntPtr feature);
197 public bool AddFeature(Gst.PluginFeature feature) {
198 bool raw_ret = gst_registry_add_feature(Handle, feature == null ? IntPtr.Zero : feature.Handle);
203 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
204 static extern bool gst_registry_add_plugin(IntPtr raw, IntPtr plugin);
206 public bool AddPlugin(Gst.Plugin plugin) {
207 bool raw_ret = gst_registry_add_plugin(Handle, plugin == null ? IntPtr.Zero : plugin.Handle);
212 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
213 static extern bool gst_registry_check_feature_version(IntPtr raw, IntPtr feature_name, uint min_major, uint min_minor, uint min_micro);
215 public bool CheckFeatureVersion(string feature_name, uint min_major, uint min_minor, uint min_micro) {
216 IntPtr native_feature_name = GLib.Marshaller.StringToPtrGStrdup (feature_name);
217 bool raw_ret = gst_registry_check_feature_version(Handle, native_feature_name, min_major, min_minor, min_micro);
219 GLib.Marshaller.Free (native_feature_name);
223 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
224 static extern IntPtr gst_registry_feature_filter(IntPtr raw, GstSharp.PluginFeatureFilterNative filter, bool first, IntPtr user_data);
226 public Gst.PluginFeature[] FeatureFilter(Gst.PluginFeatureFilter filter, bool first) {
227 GstSharp.PluginFeatureFilterWrapper filter_wrapper = new GstSharp.PluginFeatureFilterWrapper (filter);
228 IntPtr raw_ret = gst_registry_feature_filter(Handle, filter_wrapper.NativeDelegate, first, IntPtr.Zero);
229 Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature));
233 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
234 static extern IntPtr gst_registry_find_feature(IntPtr raw, IntPtr name, IntPtr type);
236 public Gst.PluginFeature FindFeature(string name, GLib.GType type) {
237 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
238 IntPtr raw_ret = gst_registry_find_feature(Handle, native_name, type.Val);
239 Gst.PluginFeature ret = GLib.Object.GetObject(raw_ret, true) as Gst.PluginFeature;
240 GLib.Marshaller.Free (native_name);
244 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
245 static extern IntPtr gst_registry_find_plugin(IntPtr raw, IntPtr name);
247 public Gst.Plugin FindPlugin(string name) {
248 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
249 IntPtr raw_ret = gst_registry_find_plugin(Handle, native_name);
250 Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin;
251 GLib.Marshaller.Free (native_name);
255 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
256 static extern IntPtr gst_registry_get_feature_list(IntPtr raw, IntPtr type);
258 public Gst.PluginFeature[] GetFeatureList(GLib.GType type) {
259 IntPtr raw_ret = gst_registry_get_feature_list(Handle, type.Val);
260 Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature));
264 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
265 static extern IntPtr gst_registry_get_feature_list_by_plugin(IntPtr raw, IntPtr name);
267 public Gst.PluginFeature[] GetFeatureListByPlugin(string name) {
268 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
269 IntPtr raw_ret = gst_registry_get_feature_list_by_plugin(Handle, native_name);
270 Gst.PluginFeature[] ret = (Gst.PluginFeature[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.PluginFeature));
271 GLib.Marshaller.Free (native_name);
275 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
276 static extern uint gst_registry_get_feature_list_cookie(IntPtr raw);
278 public uint FeatureListCookie {
280 uint raw_ret = gst_registry_get_feature_list_cookie(Handle);
286 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
287 static extern IntPtr gst_registry_get_plugin_list(IntPtr raw);
289 public Gst.Plugin[] PluginList {
291 IntPtr raw_ret = gst_registry_get_plugin_list(Handle);
292 Gst.Plugin[] ret = (Gst.Plugin[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Plugin));
297 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
298 static extern IntPtr gst_registry_lookup(IntPtr raw, IntPtr filename);
300 public Gst.Plugin Lookup(string filename) {
301 IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
302 IntPtr raw_ret = gst_registry_lookup(Handle, native_filename);
303 Gst.Plugin ret = GLib.Object.GetObject(raw_ret, true) as Gst.Plugin;
304 GLib.Marshaller.Free (native_filename);
308 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
309 static extern IntPtr gst_registry_lookup_feature(IntPtr raw, IntPtr name);
311 public Gst.PluginFeature LookupFeature(string name) {
312 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
313 IntPtr raw_ret = gst_registry_lookup_feature(Handle, native_name);
314 Gst.PluginFeature ret = GLib.Object.GetObject(raw_ret, true) as Gst.PluginFeature;
315 GLib.Marshaller.Free (native_name);
319 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
320 static extern IntPtr gst_registry_plugin_filter(IntPtr raw, GstSharp.PluginFilterNative filter, bool first, IntPtr user_data);
322 public Gst.Plugin[] PluginFilter(Gst.PluginFilter filter, bool first) {
323 GstSharp.PluginFilterWrapper filter_wrapper = new GstSharp.PluginFilterWrapper (filter);
324 IntPtr raw_ret = gst_registry_plugin_filter(Handle, filter_wrapper.NativeDelegate, first, IntPtr.Zero);
325 Gst.Plugin[] ret = (Gst.Plugin[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Plugin));
329 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
330 static extern void gst_registry_remove_feature(IntPtr raw, IntPtr feature);
332 public void RemoveFeature(Gst.PluginFeature feature) {
333 gst_registry_remove_feature(Handle, feature == null ? IntPtr.Zero : feature.Handle);
336 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
337 static extern void gst_registry_remove_plugin(IntPtr raw, IntPtr plugin);
339 public void RemovePlugin(Gst.Plugin plugin) {
340 gst_registry_remove_plugin(Handle, plugin == null ? IntPtr.Zero : plugin.Handle);
343 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
344 static extern bool gst_registry_scan_path(IntPtr raw, IntPtr path);
346 public bool ScanPath(string path) {
347 IntPtr native_path = GLib.Marshaller.StringToFilenamePtr (path);
348 bool raw_ret = gst_registry_scan_path(Handle, native_path);
350 GLib.Marshaller.Free (native_path);
354 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
355 static extern bool gst_update_registry();
357 public static bool UpdateRegistry() {
358 bool raw_ret = gst_update_registry();
364 // Internal representation of the wrapped structure ABI.
365 static GLib.AbiStruct _abi_info = null;
366 static public new GLib.AbiStruct abi_info {
368 if (_abi_info == null)
369 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
370 new GLib.AbiField("priv"
371 , Gst.Object.abi_info.Fields
372 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
375 , (uint) Marshal.SizeOf(typeof(IntPtr))
385 // End of the ABI representation.