mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-07 04:11:26 +00:00
Add Object.HasProperty()
This commit is contained in:
parent
b08ca4a640
commit
f37850249d
1 changed files with 10 additions and 0 deletions
|
@ -31,6 +31,16 @@ public PropertyInfo GetPropertyInfo (string property) {
|
||||||
return new PropertyInfo (pspec);
|
return new PropertyInfo (pspec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasProperty (string property) {
|
||||||
|
IntPtr klass = Marshal.ReadIntPtr (Handle);
|
||||||
|
|
||||||
|
IntPtr native_property = Gst.GLib.Marshaller.StringToPtrGStrdup (property);
|
||||||
|
IntPtr pspec = g_object_class_find_property (klass, native_property);
|
||||||
|
Gst.GLib.Marshaller.Free (native_property);
|
||||||
|
|
||||||
|
return pspec != IntPtr.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
public PropertyInfo[] Properties {
|
public PropertyInfo[] Properties {
|
||||||
get {
|
get {
|
||||||
uint n_properties;
|
uint n_properties;
|
||||||
|
|
Loading…
Reference in a new issue