[gstreamermm] Gst::Clock: implement destroy callback for wait_async()
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Gst::Clock: implement destroy callback for wait_async()
- Date: Sun, 28 Aug 2016 18:50:44 +0000 (UTC)
commit a44277017bc2b0afc04f110df1274eb05e143d9a
Author: Marcin Kolny <marcin kolny gmail com>
Date: Sat Aug 27 15:20:07 2016 +0200
Gst::Clock: implement destroy callback for wait_async()
gstreamer/src/clock.ccg | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gstreamer/src/clock.ccg b/gstreamer/src/clock.ccg
index e629927..8b1c6fe 100644
--- a/gstreamer/src/clock.ccg
+++ b/gstreamer/src/clock.ccg
@@ -47,6 +47,12 @@ static gboolean ClockID_Clock_gstreamermm_callback(GstClock* clock, GstClockTime
return false;
}
+
+static void ClockID_Clock_gstreamermm_callback_destroy(void* data)
+{
+ delete static_cast<Gst::ClockID::SlotClock*>(data);
+}
+
} // extern "C"
} // anonymous namespace
@@ -57,7 +63,7 @@ namespace Gst
ClockReturn ClockID::wait_async(const SlotClock& slot)
{
SlotClock* slot_copy = new SlotClock(slot);
- return static_cast<ClockReturn>(gst_clock_id_wait_async(gobj(), &ClockID_Clock_gstreamermm_callback,
slot_copy, nullptr)); // TODO temporary NULL value
+ return static_cast<ClockReturn>(gst_clock_id_wait_async(gobj(), &ClockID_Clock_gstreamermm_callback,
slot_copy, &ClockID_Clock_gstreamermm_callback_destroy));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]