Commit 179dde54 authored by Marcin Kolny's avatar Marcin Kolny

Fix build with gstreamer < 1.12

Revert "Gst::AudioClock: auto generate some audioclock methods"

This reverts commit 167eeba7.
parent 81561132
......@@ -21,6 +21,13 @@
_PINCLUDE(gstreamermm/private/systemclock_p.h)
// TODO: remove this check after we require at least gstreamer 1.12
#if GST_VERSION_MINOR < 12
#define GSTMM_AUDIO_CLOCK_CAST(obj) GST_CLOCK(obj)
#else
#define GSTMM_AUDIO_CLOCK_CAST(obj) GST_AUDIO_CLOCK(obj)
#endif
namespace
{
......@@ -64,4 +71,19 @@ AudioClock::AudioClock(const Glib::ustring& name, const SlotGetTime& time_slot)
gobj()->user_data = m_slot.get();
}
Gst::ClockTime AudioClock::adjust(Gst::ClockTime time)
{
return static_cast<Gst::ClockTime>(gst_audio_clock_adjust(GSTMM_AUDIO_CLOCK_CAST(gobj()), static_cast<GstClockTime>(time)));
}
Gst::ClockTime AudioClock::get_time() const
{
return static_cast<Gst::ClockTime>(gst_audio_clock_get_time(GSTMM_AUDIO_CLOCK_CAST(gobj())));
}
void AudioClock::invalidate()
{
gst_audio_clock_invalidate(GSTMM_AUDIO_CLOCK_CAST(gobj()));
}
} //namespace Gst
......@@ -66,11 +66,18 @@ public:
_WRAP_METHOD(void reset(Gst::ClockTime time), gst_audio_clock_reset)
_WRAP_METHOD(Gst::ClockTime adjust(Gst::ClockTime time), gst_audio_clock_adjust)
// TODO methods below get GstClock as a first argument,
// so have to be wrapped manually. It has been fixed in
// GStreamer (https://bugzilla.gnome.org/show_bug.cgi?id=756628)
// but patch is not available in 1.8.0 version.
_WRAP_METHOD_DOCS_ONLY(gst_audio_clock_adjust)
Gst::ClockTime adjust(Gst::ClockTime time);
_WRAP_METHOD(Gst::ClockTime get_time() const, gst_audio_clock_get_time)
_WRAP_METHOD_DOCS_ONLY(gst_audio_clock_get_time)
Gst::ClockTime get_time() const;
_WRAP_METHOD(void invalidate(), gst_audio_clock_invalidate)
_WRAP_METHOD_DOCS_ONLY(gst_audio_clock_invalidate)
void invalidate();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment