[perl-GStreamer-Interfaces] Add version checking facilities
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-GStreamer-Interfaces] Add version checking facilities
- Date: Sat, 20 Mar 2010 13:02:26 +0000 (UTC)
commit 8444604a22f2c913240b36b847fa3b6e3972aae0
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sat Mar 20 13:48:10 2010 +0100
Add version checking facilities
Generate version checking macro GST_INTERFACES_CHECK_VERSION and wrap it
as GStreamer::Interfaces->CHECK_VERSION.
Makefile.PL | 5 +++++
gstinterfacesperl.h | 1 +
xs/GstInterfaces.xs | 12 ++++++++++++
3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.PL b/Makefile.PL
index 1ff590f..9a97645 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -57,6 +57,11 @@ mkdir 'build', 0777;
Glib::CodeGen->parse_maps('gstinterfacesperl');
Glib::CodeGen->write_boot(ignore => qr/^GStreamer::Interfaces$/);
+ExtUtils::PkgConfig->write_version_macros (
+ "build/gstinterfacesperl-version.h",
+ "gstreamer-plugins-base-0.10" => "GST_INTERFACES",
+);
+
my $gst = ExtUtils::Depends->new('GStreamer::Interfaces', 'GStreamer');
$gst->set_inc($pkgcfg{cflags});
$gst->set_libs($pkgcfg{libs} . ' -lgstinterfaces-0.10');
diff --git a/gstinterfacesperl.h b/gstinterfacesperl.h
index c466699..71422e6 100644
--- a/gstinterfacesperl.h
+++ b/gstinterfacesperl.h
@@ -26,6 +26,7 @@
#include <gst/interfaces/propertyprobe.h>
#include <gst/interfaces/xoverlay.h>
+#include "gstinterfacesperl-version.h"
#include "gstinterfacesperl-autogen.h"
#endif /* _GSTINTERFACES2PERL_H_ */
diff --git a/xs/GstInterfaces.xs b/xs/GstInterfaces.xs
index c796af4..fb5009d 100644
--- a/xs/GstInterfaces.xs
+++ b/xs/GstInterfaces.xs
@@ -25,3 +25,15 @@ MODULE = GStreamer::Interfaces PACKAGE = GStreamer::Interfaces
BOOT:
#include "register.xsh"
#include "boot.xsh"
+
+=for apidoc __hide__
+=cut
+bool
+CHECK_VERSION (class, major, minor, micro)
+ int major
+ int minor
+ int micro
+ CODE:
+ RETVAL = GST_INTERFACES_CHECK_VERSION (major, minor, micro);
+ OUTPUT:
+ RETVAL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]