summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-04-14 17:58:28 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-04-14 17:58:28 +0200
commit65b728234f1a74f6f1e00b6287db775e521c5e8e (patch)
tree3657b04486425b5da5e14bae2174c5d66923e2e6
parent79931bf601c1537bb1612d0b6543cf62373a34fe (diff)
Add Gst.StaticPadTemplate.Free() and fix indention
-rw-r--r--gstreamer-sharp/StaticCaps.custom4
-rw-r--r--gstreamer-sharp/StaticPadTemplate.custom15
-rw-r--r--gstreamer-sharp/glue/staticcaps.c6
-rw-r--r--gstreamer-sharp/glue/staticpadtemplate.c16
4 files changed, 27 insertions, 14 deletions
diff --git a/gstreamer-sharp/StaticCaps.custom b/gstreamer-sharp/StaticCaps.custom
index b375485..3652fb1 100644
--- a/gstreamer-sharp/StaticCaps.custom
+++ b/gstreamer-sharp/StaticCaps.custom
@@ -1,4 +1,4 @@
-[DllImport("gstreamersharpglue-0.10")]
+[DllImport ("gstreamersharpglue-0.10") ]
static extern IntPtr gstsharp_gst_static_caps_get_string (IntPtr caps);
public string String {
@@ -16,7 +16,7 @@ protected override void Free (IntPtr raw) {
GLib.Marshaller.Free (raw);
}
-[DllImport("gstreamersharpglue-0.10")]
+[DllImport ("gstreamersharpglue-0.10") ]
static extern IntPtr gstsharp_gst_static_caps_new (string caps);
public StaticCaps (Caps caps) {
diff --git a/gstreamer-sharp/StaticPadTemplate.custom b/gstreamer-sharp/StaticPadTemplate.custom
index 76df07d..7078449 100644
--- a/gstreamer-sharp/StaticPadTemplate.custom
+++ b/gstreamer-sharp/StaticPadTemplate.custom
@@ -1,4 +1,4 @@
-[DllImport("gstreamersharpglue-0.10")]
+[DllImport ("gstreamersharpglue-0.10") ]
static extern IntPtr gstsharp_gst_static_pad_template_get_name_template (IntPtr handle);
public string NameTemplate {
@@ -12,7 +12,7 @@ public string NameTemplate {
}
}
-[DllImport("gstreamersharpglue-0.10")]
+[DllImport ("gstreamersharpglue-0.10") ]
static extern Gst.PadDirection gstsharp_gst_static_pad_template_get_pad_direction (IntPtr handle);
public Gst.PadDirection Direction {
get {
@@ -20,7 +20,7 @@ public Gst.PadDirection Direction {
}
}
-[DllImport("gstreamersharpglue-0.10")]
+[DllImport ("gstreamersharpglue-0.10") ]
static extern Gst.PadPresence gstsharp_gst_static_pad_template_get_pad_presence (IntPtr handle);
public Gst.PadPresence Presence {
get {
@@ -28,10 +28,13 @@ public Gst.PadPresence Presence {
}
}
-[DllImport("gstreamersharpglue-0.10")]
+[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)
-{
+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/staticcaps.c b/gstreamer-sharp/glue/staticcaps.c
index 335b2ae..2285157 100644
--- a/gstreamer-sharp/glue/staticcaps.c
+++ b/gstreamer-sharp/glue/staticcaps.c
@@ -1,12 +1,14 @@
#include <gst/gst.h>
const gchar *
-gstsharp_gst_static_caps_get_string (const GstStaticCaps *caps) {
+gstsharp_gst_static_caps_get_string (const GstStaticCaps * caps)
+{
return caps->string;
}
GstStaticCaps *
-gstsharp_gst_static_caps_new (const gchar *string) {
+gstsharp_gst_static_caps_new (const gchar * string)
+{
GstStaticCaps *caps = g_new0 (GstStaticCaps, 1);
caps->string = g_strdup (string);
diff --git a/gstreamer-sharp/glue/staticpadtemplate.c b/gstreamer-sharp/glue/staticpadtemplate.c
index abcc3e6..c80e0f2 100644
--- a/gstreamer-sharp/glue/staticpadtemplate.c
+++ b/gstreamer-sharp/glue/staticpadtemplate.c
@@ -1,22 +1,30 @@
#include <gst/gst.h>
const gchar *
-gstsharp_gst_static_pad_template_get_name_template (const GstStaticPadTemplate *templ) {
+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) {
+gstsharp_gst_static_pad_template_get_direction (const GstStaticPadTemplate *
+ templ)
+{
return templ->direction;
}
GstPadPresence
-gstsharp_gst_static_pad_template_get_presence (const GstStaticPadTemplate *templ) {
+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) {
+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;