mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 05:17:07 +02:00
54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
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
|