From b24a603570ff368faa4b28e6986e5864288f01ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 15 Apr 2009 13:26:54 +0200 Subject: [PATCH] Drop StaticCaps bindings and let the StaticPadTemplate bindings be autogenerated Also fix some reference ownership issues in the StaticPadTemplate bindings and make them a read-only container without any way to create new instances. We don't need StaticCaps anywhere and StaticPadTemplates only for reading the static pad templates of an element factory. --- doc/en/Gst/StaticCaps.xml | 33 ---------------- doc/en/Gst/StaticPadTemplate.xml | 2 +- doc/en/index.xml | 1 - gstreamer-sharp/Gstreamer.metadata | 11 +++--- gstreamer-sharp/Makefile.am | 2 - gstreamer-sharp/StaticCaps.custom | 48 ------------------------ gstreamer-sharp/StaticPadTemplate.custom | 40 -------------------- gstreamer-sharp/glue/Makefile.am | 2 - gstreamer-sharp/glue/staticcaps.c | 17 --------- gstreamer-sharp/glue/staticpadtemplate.c | 35 ----------------- 10 files changed, 7 insertions(+), 184 deletions(-) delete mode 100644 doc/en/Gst/StaticCaps.xml delete mode 100644 gstreamer-sharp/StaticCaps.custom delete mode 100644 gstreamer-sharp/StaticPadTemplate.custom delete mode 100644 gstreamer-sharp/glue/staticcaps.c delete mode 100644 gstreamer-sharp/glue/staticpadtemplate.c diff --git a/doc/en/Gst/StaticCaps.xml b/doc/en/Gst/StaticCaps.xml deleted file mode 100644 index 5c27683483..0000000000 --- a/doc/en/Gst/StaticCaps.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - gstreamer-sharp - 0.9.5.99 - - - GLib.Opaque - - - - To be added. - To be added. - - - - Constructor0.9.5.99To be added.To be added.To be added.Constructor0.9.5.99To be added.To be added.To be added.Constructor0.9.5.99To be added.To be added.To be added.Property0.9.5.99Gst.StaticCapsTo be added.To be added.To be added. - - Property - Gst.Caps - To be added.To be added.To be added. - 0.9.5.99Property0.9.5.99Gst.StaticCapsTo be added.To be added.To be added. - - Property - GLib.GType - To be added.To be added.To be added. - 0.9.5.99Property0.9.5.99System.StringTo be added.To be added.To be added. - - - - - - diff --git a/doc/en/Gst/StaticPadTemplate.xml b/doc/en/Gst/StaticPadTemplate.xml index 676f374f37..13dbaa6c6f 100644 --- a/doc/en/Gst/StaticPadTemplate.xml +++ b/doc/en/Gst/StaticPadTemplate.xml @@ -17,7 +17,7 @@ - Constructor0.9.5.99To be added.To be added.To be added.Constructor0.9.5.99To be added.To be added.To be added.To be added.To be added.To be added. + Constructor0.9.5.99To be added.To be added.To be added. Property Gst.Caps diff --git a/doc/en/index.xml b/doc/en/index.xml index 0179f400b9..91b6ada638 100644 --- a/doc/en/index.xml +++ b/doc/en/index.xml @@ -167,7 +167,6 @@ - diff --git a/gstreamer-sharp/Gstreamer.metadata b/gstreamer-sharp/Gstreamer.metadata index 9f00f1b922..654dc406f6 100644 --- a/gstreamer-sharp/Gstreamer.metadata +++ b/gstreamer-sharp/Gstreamer.metadata @@ -356,15 +356,16 @@ (State.Paused << 3) | State.Ready (State.Ready << 3) | State.Null - boxed - true - GetCaps - true + 1 boxed true GetPadTemplate - true + true + true + public + public + public true 1 diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index c3bff2d9b8..5c7db40f36 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am @@ -65,8 +65,6 @@ customs = \ Object.custom \ MiniObject.custom \ Registry.custom \ - StaticCaps.custom \ - StaticPadTemplate.custom \ Structure.custom diff --git a/gstreamer-sharp/StaticCaps.custom b/gstreamer-sharp/StaticCaps.custom deleted file mode 100644 index 3652fb1594..0000000000 --- a/gstreamer-sharp/StaticCaps.custom +++ /dev/null @@ -1,48 +0,0 @@ -[DllImport ("gstreamersharpglue-0.10") ] -static extern IntPtr gstsharp_gst_static_caps_get_string (IntPtr caps); - -public string String { - get { - IntPtr raw_ptr = gstsharp_gst_static_caps_get_string (Handle); - - if (raw_ptr == IntPtr.Zero) - return null; - - return GLib.Marshaller.Utf8PtrToString (raw_ptr); - } -} - -protected override void Free (IntPtr raw) { - GLib.Marshaller.Free (raw); -} - -[DllImport ("gstreamersharpglue-0.10") ] -static extern IntPtr gstsharp_gst_static_caps_new (string caps); - -public StaticCaps (Caps caps) { - Raw = gstsharp_gst_static_caps_new (caps.ToString ()); -} - -public StaticCaps (string caps) { - Raw = gstsharp_gst_static_caps_new (caps.ToString ()); -} - -private static StaticCaps empty = new StaticCaps ("EMPTY"); -private static StaticCaps any = new StaticCaps ("ANY"); - -public static StaticCaps Empty { - get { - return empty; - } -} - -public static StaticCaps Any { - get { - return any; - } -} - -public override string ToString () { - return String; -} - diff --git a/gstreamer-sharp/StaticPadTemplate.custom b/gstreamer-sharp/StaticPadTemplate.custom deleted file mode 100644 index 7078449494..0000000000 --- a/gstreamer-sharp/StaticPadTemplate.custom +++ /dev/null @@ -1,40 +0,0 @@ -[DllImport ("gstreamersharpglue-0.10") ] -static extern IntPtr gstsharp_gst_static_pad_template_get_name_template (IntPtr handle); - -public string NameTemplate { - get { - IntPtr raw_ret = gstsharp_gst_static_pad_template_get_name_template (Handle); - - if (raw_ret == IntPtr.Zero) - return null; - - return GLib.Marshaller.Utf8PtrToString (raw_ret); - } -} - -[DllImport ("gstreamersharpglue-0.10") ] -static extern Gst.PadDirection gstsharp_gst_static_pad_template_get_pad_direction (IntPtr handle); -public Gst.PadDirection Direction { - get { - return gstsharp_gst_static_pad_template_get_pad_direction (Handle); - } -} - -[DllImport ("gstreamersharpglue-0.10") ] -static extern Gst.PadPresence gstsharp_gst_static_pad_template_get_pad_presence (IntPtr handle); -public Gst.PadPresence Presence { - get { - return gstsharp_gst_static_pad_template_get_pad_presence (Handle); - } -} - -[DllImport ("gstreamersharpglue-0.10") ] -static extern IntPtr gstsharp_gst_static_pad_template_new (string name_template, Gst.PadDirection direction, Gst.PadPresence presence, string caps); -public StaticPadTemplate (string name_template, Gst.PadDirection direction, Gst.PadPresence presence, Gst.Caps caps) { - Raw = gstsharp_gst_static_pad_template_new (name_template, direction, presence, caps.ToString ()); -} - -protected override void Free (IntPtr raw) { - GLib.Marshaller.Free (raw); -} - diff --git a/gstreamer-sharp/glue/Makefile.am b/gstreamer-sharp/glue/Makefile.am index 2140ad2bb6..80276a7820 100644 --- a/gstreamer-sharp/glue/Makefile.am +++ b/gstreamer-sharp/glue/Makefile.am @@ -7,8 +7,6 @@ libgstreamersharpglue_0_10_la_SOURCES = \ message.c \ bin.c \ structure.c \ - staticcaps.c \ - staticpadtemplate.c \ gerror.c \ gobject.c diff --git a/gstreamer-sharp/glue/staticcaps.c b/gstreamer-sharp/glue/staticcaps.c deleted file mode 100644 index 2285157a7e..0000000000 --- a/gstreamer-sharp/glue/staticcaps.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -const gchar * -gstsharp_gst_static_caps_get_string (const GstStaticCaps * caps) -{ - return caps->string; -} - -GstStaticCaps * -gstsharp_gst_static_caps_new (const gchar * string) -{ - GstStaticCaps *caps = g_new0 (GstStaticCaps, 1); - - caps->string = g_strdup (string); - - return caps; -} diff --git a/gstreamer-sharp/glue/staticpadtemplate.c b/gstreamer-sharp/glue/staticpadtemplate.c deleted file mode 100644 index c80e0f20c3..0000000000 --- a/gstreamer-sharp/glue/staticpadtemplate.c +++ /dev/null @@ -1,35 +0,0 @@ -#include - -const gchar * -gstsharp_gst_static_pad_template_get_name_template (const GstStaticPadTemplate * - templ) -{ - return templ->name_template; -} - -GstPadDirection -gstsharp_gst_static_pad_template_get_direction (const GstStaticPadTemplate * - templ) -{ - return templ->direction; -} - -GstPadPresence -gstsharp_gst_static_pad_template_get_presence (const GstStaticPadTemplate * - templ) -{ - return templ->presence; -} - -GstStaticPadTemplate * -gstsharp_gst_static_pad_template_new (const gchar * name_template, - GstPadDirection direction, GstPadPresence presence, const gchar * caps) -{ - GstStaticPadTemplate *ret = g_new0 (GstStaticPadTemplate, 1); - ret->name_template = g_strdup (name_template); - ret->direction = direction; - ret->presence = presence; - ret->static_caps.string = g_strdup (caps); - - return ret; -}