From b66d124abc14923e4b4650ff14db995d99fc8688 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 13 Aug 2001 13:46:21 +0000 Subject: [PATCH] taking a first stab at swigging gstreamer for perl Original commit message from CVS: taking a first stab at swigging gstreamer for perl --- swig/Gst.i | 12 ++++++++++++ swig/GstElement.i | 3 +++ swig/GstPipeline.i | 2 ++ swig/Makefile.PL.in | 14 ++++++++++++++ swig/typemap.i | 14 ++++++++++++++ 5 files changed, 45 insertions(+) create mode 100644 swig/Gst.i create mode 100644 swig/GstElement.i create mode 100644 swig/GstPipeline.i create mode 100644 swig/Makefile.PL.in create mode 100644 swig/typemap.i diff --git a/swig/Gst.i b/swig/Gst.i new file mode 100644 index 0000000000..7cb4bc3ff9 --- /dev/null +++ b/swig/Gst.i @@ -0,0 +1,12 @@ + /* File : Gst.i */ +%module Gst + +%include "typemap.i" +%include "GstPipeline.i" +%include "GstElement.i" + +%{ +#include +%} + +%include "gstswig.c" diff --git a/swig/GstElement.i b/swig/GstElement.i new file mode 100644 index 0000000000..51ec915ae0 --- /dev/null +++ b/swig/GstElement.i @@ -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 index 0000000000..536084073c --- /dev/null +++ b/swig/GstPipeline.i @@ -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 index 0000000000..2572eb4a38 --- /dev/null +++ b/swig/Makefile.PL.in @@ -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 index 0000000000..a8aa1a9fbf --- /dev/null +++ b/swig/typemap.i @@ -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); +} +