taking a first stab at swigging gstreamer for perl
authorThomas Vander Stichele <thomas@apestaart.org>
Mon, 13 Aug 2001 13:46:21 +0000 (13:46 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Mon, 13 Aug 2001 13:46:21 +0000 (13:46 +0000)
Original commit message from CVS:
taking a first stab at swigging gstreamer for perl

swig/Gst.i [new file with mode: 0644]
swig/GstElement.i [new file with mode: 0644]
swig/GstPipeline.i [new file with mode: 0644]
swig/Makefile.PL.in [new file with mode: 0644]
swig/typemap.i [new file with mode: 0644]

diff --git a/swig/Gst.i b/swig/Gst.i
new file mode 100644 (file)
index 0000000..7cb4bc3
--- /dev/null
@@ -0,0 +1,12 @@
+ /* File : Gst.i */
+%module Gst
+
+%include "typemap.i"
+%include "GstPipeline.i"
+%include "GstElement.i"
+
+%{
+#include <gst/gst.h>
+%}
+
+%include "gstswig.c"
diff --git a/swig/GstElement.i b/swig/GstElement.i
new file mode 100644 (file)
index 0000000..51ec915
--- /dev/null
@@ -0,0 +1,3 @@
+GstElement* 
+gst_elementfactory_make (const gchar *factoryname, const gchar *name);
+
diff --git a/swig/GstPipeline.i b/swig/GstPipeline.i
new file mode 100644 (file)
index 0000000..5360840
--- /dev/null
@@ -0,0 +1,2 @@
+GstElement*     gst_pipeline_new                (const guchar *name);
+
diff --git a/swig/Makefile.PL.in b/swig/Makefile.PL.in
new file mode 100644 (file)
index 0000000..2572eb4
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/perl -w
+use ExtUtils::MakeMaker;
+WriteMakefile(
+       'NAME'  =>      'Gst',
+# FIXME : I hardcoded my lib path here
+       'LIBS'  =>      '@GLIB_LIBS@ @GTK_LIBS@ @XML_LIBS@ '.
+                       '-L../gst/.libs/ -lgst '
+                       ,
+       'INC'   =>      '@GLIB_CFLAGS@ @GTK_CFLAGS@ @XML_CFLAGS@ '.
+                       '-DHAVE_CPU_I386 -D_GNU_SOURCE -DHAVE_CONFIG '.
+                       '-I.. ' 
+                       ,
+       'OBJECT' =>     'Gst_wrap.o gstswig.o'
+);
diff --git a/swig/typemap.i b/swig/typemap.i
new file mode 100644 (file)
index 0000000..a8aa1a9
--- /dev/null
@@ -0,0 +1,14 @@
+%include "typemap.i"
+
+%typemap(perl5,in) const guchar *
+{
+  int len;
+  $target = (guchar *) SvPV ($source, len);
+}
+
+%typemap(perl5,in) const gchar *
+{
+  int len;
+  $target = (gchar *) SvPV ($source, len);
+}
+