Call the _get_type() functions of some types on Init() to make sure they're registred by Gtk#

This commit is contained in:
Sebastian Dröge 2009-04-21 19:27:05 +02:00
parent a23154fc2f
commit d835a93153

View file

@ -19,6 +19,7 @@ namespace Gst {
int argc = 0;
gst_init (ref argc, ref argv);
RegisterManagedTypes ();
}
public static void Init (string progname, ref string [] args) {
@ -33,6 +34,23 @@ namespace Gst {
gst_deinit();
}
private static void RegisterManagedTypes() {
GLib.GType t;
t = Gst.Fraction.GType;
t = Gst.DoubleRange.GType;
t = Gst.IntRange.GType;
t = Gst.FractionRange.GType;
t = Gst.Fourcc.GType;
t = Gst.Date.GType;
t = Gst.List.GType;
t = Gst.Array.GType;
t = Gst.Caps.GType;
t = Gst.Structure.GType;
t = Gst.TagList.GType;
t = Gst.MiniObject.GType;
}
private static void FullInit (string progname, ref string [] args, bool check) {
string [] progargs = new string[args.Length + 1];
@ -68,6 +86,7 @@ namespace Gst {
args = new string[argc - 1];
System.Array.Copy (progargs, 1, args, 0, argc - 1);
}
RegisterManagedTypes ();
}
[DllImport ("gstreamer-0.10.dll") ]