caps: Make sure that the empty constructor build an Empty caps
authorThibault Saunier <tsaunier@igalia.com>
Tue, 13 Mar 2018 12:27:01 +0000 (09:27 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Tue, 13 Mar 2018 12:28:01 +0000 (09:28 -0300)
Moving the NewAny variant at the end of the nodes in the API definition
file.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=793054

sources/generated/Gst/Caps.cs
sources/generated/gstreamer-sharp-api.xml
sources/gstreamer-sharp.metadata

index 53bd72b..1a7d97a 100644 (file)
@@ -391,20 +391,11 @@ namespace Gst {
                public Caps(IntPtr raw) : base(raw) {}
 
                [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
-               static extern IntPtr gst_caps_new_any();
-
-               public Caps () 
-               {
-                       Raw = gst_caps_new_any();
-               }
-
-               [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
                static extern IntPtr gst_caps_new_empty();
 
-               public static Caps NewEmpty()
+               public Caps () 
                {
-                       Caps result = new Caps (gst_caps_new_empty());
-                       return result;
+                       Raw = gst_caps_new_empty();
                }
 
                [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
@@ -417,6 +408,15 @@ namespace Gst {
                        GLib.Marshaller.Free (native_media_type);
                }
 
+               [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+               static extern IntPtr gst_caps_new_any();
+
+               public static Caps NewAny()
+               {
+                       Caps result = new Caps (gst_caps_new_any());
+                       return result;
+               }
+
 
                // Internal representation of the wrapped structure ABI.
                static GLib.AbiStruct _abi_info = null;
index 4516332..03d4716 100644 (file)
       <field cname="mini_object" access="public" writeable="true" readable="true" is_callback="false" name="MiniObject" type="GstMiniObject" hidden="true">
         <warning>missing glib:type-name</warning>
       </field>
-      <constructor cname="gst_caps_new_any" disable_void_ctor="" />
       <constructor cname="gst_caps_new_empty" disable_void_ctor="" />
       <constructor cname="gst_caps_new_empty_simple">
         <parameters>
           <parameter name="string" type="const-gchar*" />
         </parameters>
       </method>
+      <constructor cname="gst_caps_new_any" disable_void_ctor="" />
     </boxed>
     <boxed name="CapsFeatures" cname="GstCapsFeatures" opaque="false" hidden="false">
       <method name="GetType" cname="gst_caps_features_get_type" shared="true">
index ab376ad..59fb012 100644 (file)
@@ -48,6 +48,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
        <attr path="/api/namespace/boxed[@cname='GstRTSPMessage']" name="nohash">true</attr> -->
        <attr path="/api/namespace/boxed[@cname='GstRTSPMessage']/field[@cname='body']" name="type">guint8*</attr>
 
+       <!-- GstCaps fixes -->
+       <remove-node path="/api/namespace/boxed[@cname='GstCaps']/constructor[@cname='gst_caps_new_any']"/>
+       <add-node path="/api/namespace/boxed[@cname='GstCaps']">
+               <constructor cname="gst_caps_new_any" disable_void_ctor="" />
+       </add-node>
+
        <!-- Explicitly declare GstSample as a GstMiniObject (the opaque struct definition doesn't have GObject-Introspection
             annotations) to get ref-counting to work.
        -->