[Gtk-sharp-list] gst-sharp update/problems
John Luke
jluke@users.sourceforge.net
Wed, 29 Oct 2003 14:17:53 -0500
Hello,
I am currently trying to get gst# to work with gstreamer 0.6.4, however
I am stuck with the following small problems/bugs. If anyone wants to
help, please let me know. I have put the diff of the gtk-sharp/gst
directory (not the gtk-sharp/sources) at
http://helios.acomp.usf.edu/~luke/gst.diff so you can try to build it
yourself.
1. Gst.Autoplug should inherit from GstObject, it is in the gst-api.xml
file but not in the generated Autoplug.cs file. Others that inherit from
GstObject work fine.
2. GstSharp.PadQueryFunctionNative and PadConvertFunctionNative both of
these return before assigning the out parameters, like so:
public bool NativeCallback (IntPtr pad, int type, out int format, out
long value)
{
bool ref_owned = false;
Gst.Pad _arg0 = (Gst.Pad) GLib.Object.GetObject(pad, ref_owned);
Gst.QueryType _arg1 = (Gst.QueryType)type;
Gst.Format _arg2;
long _arg3;
return (bool) _managed ( _arg0, _arg1, out _arg2, out _arg3);
format = (int) _arg2;
value = _arg3;
}
changing to the following works (but where do I need to fix this, in the
generator somewhere):
public bool NativeCallback (IntPtr pad, int type, out int format, out
long value)
{
bool ref_owned = false;
Gst.Pad _arg0 = (Gst.Pad) GLib.Object.GetObject(pad, ref_owned);
Gst.QueryType _arg1 = (Gst.QueryType)type;
Gst.Format _arg2;
long _arg3;
bool ret = (bool) _managed ( _arg0, _arg1, out _arg2, out _arg3);
format = (int) _arg2;
value = _arg3;
return ret;
}
3. Gst.Index.cs and Gst.RealPad.cs both have methods that return Gst.*
objects but cannot be casted from GLib.Value, example:
public Gst.Caps Caps {
get {
GLib.Value val = new GLib.Value (Handle, "caps");
GetProperty("caps", val);
Gst.Caps ret = (Gst.Caps) val;
return ret;
}
}