testing/gstreamermm: build fix for gstreamer-1.12

This commit is contained in:
Natanael Copa 2017-07-24 11:23:56 +00:00
parent e1f8288690
commit 5193e59c61
2 changed files with 60 additions and 4 deletions

View File

@ -2,16 +2,18 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gstreamermm
pkgver=1.8.0
pkgrel=0
pkgrel=1
pkgdesc="C++ interface for GStreamer"
url="http://gstreamer.freedesktop.org/bindings/cplusplus.html"
arch="all"
license="LGPL"
makedepends="glibmm-dev gst-plugins-base1-dev"
makedepends="glibmm-dev gst-plugins-base-dev"
checkdepends="gtest-dev"
options="!check"
subpackages="$pkgname-dev $pkgname-doc"
source="http://ftp.gnome.org/pub/GNOME/sources/gstreamermm/${pkgver%.[0-9]*}/$pkgname-$pkgver.tar.xz"
source="http://ftp.gnome.org/pub/GNOME/sources/gstreamermm/${pkgver%.[0-9]*}/$pkgname-$pkgver.tar.xz
gst-audioclock.patch
"
builddir="$srcdir/$pkgname-$pkgver"
build() {
@ -30,4 +32,5 @@ check() {
cd "$builddir"
make check
}
sha512sums="4d458c8a2efde683dabd00308ddde6fbf732788fb9282cb2eeab9f3a01dc9b4a03bfbbe9991cd50ef3092cec861034b3a34a6c5e364582dbfc6b1a0d5bb935fe gstreamermm-1.8.0.tar.xz"
sha512sums="4d458c8a2efde683dabd00308ddde6fbf732788fb9282cb2eeab9f3a01dc9b4a03bfbbe9991cd50ef3092cec861034b3a34a6c5e364582dbfc6b1a0d5bb935fe gstreamermm-1.8.0.tar.xz
6c0db61bbfe849b5829663b7caccb883bba698c89350003dba6a020b83a8491cafecff1c444d85e4f27c91f8106dfa503e02aed4c61a19e7aed3fdc2e62b6b74 gst-audioclock.patch"

View File

@ -0,0 +1,53 @@
From: Marcin Kolny <marcin.kolny@gmail.com>
Date: Sat, 10 Jun 2017 15:11:22 +0100
Subject: Gst::AudioClock: auto generate some audioclock methods
Those methods used to have object of GstClock type as a
first argument, so had to be wrapped manually. It has been
fixed inGStreamer (https://bugzilla.gnome.org/show_bug.cgi?id=756628)
in version 1.12.0
https://bugzilla.gnome.org/show_bug.cgi?id=783628
Index: gstreamermm-1.8.0/gstreamer/gstreamermm/audioclock.cc
===================================================================
--- gstreamermm-1.8.0.orig/gstreamer/gstreamermm/audioclock.cc
+++ gstreamermm-1.8.0/gstreamer/gstreamermm/audioclock.cc
@@ -2,6 +2,7 @@
#include <glibmm.h>
+#include <gst/gstversion.h>
#include <gstreamermm/audioclock.h>
#include <gstreamermm/private/audioclock_p.h>
@@ -76,17 +77,29 @@ AudioClock::AudioClock(const Glib::ustri
Gst::ClockTime AudioClock::adjust(Gst::ClockTime time)
{
+#if GST_VERSION_MAJOR == 1 && GST_VERSION_MINOR >= 12
+ return ((Gst::ClockTime)(gst_audio_clock_adjust(gobj(), ((GstClockTime)(time)))));
+#else
return static_cast<Gst::ClockTime>(gst_audio_clock_adjust(GST_CLOCK_CAST(gobj()), static_cast<GstClockTime>(time)));
+#endif
}
Gst::ClockTime AudioClock::get_time() const
{
+#if GST_VERSION_MAJOR == 1 && GST_VERSION_MINOR >= 12
+ return ((Gst::ClockTime)(gst_audio_clock_get_time(const_cast<GstAudioClock*>(gobj()))));
+#else
return static_cast<Gst::ClockTime>(gst_audio_clock_get_time(GST_CLOCK_CAST(gobj())));
+#endif
}
void AudioClock::invalidate()
{
+#if GST_VERSION_MAJOR == 1 && GST_VERSION_MINOR >= 12
+ gst_audio_clock_invalidate(gobj());
+#else
gst_audio_clock_invalidate(GST_CLOCK_CAST(gobj()));
+#endif
}
} //namespace Gst