taking a first stab at swigging gstreamer for perl

Original commit message from CVS:
taking a first stab at swigging gstreamer for perl
This commit is contained in:
Thomas Vander Stichele 2001-08-13 13:46:21 +00:00
parent 6de8994811
commit b66d124abc
5 changed files with 45 additions and 0 deletions

12
swig/Gst.i Normal file
View file

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

3
swig/GstElement.i Normal file
View file

@ -0,0 +1,3 @@
GstElement*
gst_elementfactory_make (const gchar *factoryname, const gchar *name);

2
swig/GstPipeline.i Normal file
View file

@ -0,0 +1,2 @@
GstElement* gst_pipeline_new (const guchar *name);

14
swig/Makefile.PL.in Normal file
View file

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

14
swig/typemap.i Normal file
View file

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