aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gstreamermm/gst-audioclock.patch
blob: 66d680150f2b9cea6b91fab31ce0aafc5a817907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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