void-packages/srcpkgs/gstreamermm/patches/fix-build-with-gstreamer1.12.patch
2017-08-16 20:14:55 +02:00

45 lines
1.3 KiB
Diff

Author: Marcin Kolny <marcin.kolny@gmail.com>
Description: Gst::AudioClock: auto generate some audioclock methods
Origin: https://bugzilla.gnome.org/show_bug.cgi?id=783628
Last-update: 2017-07-01
--- gstreamer/gstreamermm/audioclock.cc
+++ 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