Add Gst.StaticPadTemplate.Free() and fix indention

This commit is contained in:
Sebastian Dröge 2009-04-14 17:58:28 +02:00
parent 79931bf601
commit 65b728234f
4 changed files with 27 additions and 14 deletions

View file

@ -30,8 +30,11 @@ public Gst.PadPresence Presence {
[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);
}

View file

@ -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);

View file

@ -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;