[vlc-commits] Add vlc_pa_rttime_free()

Rémi Denis-Courmont git at videolan.org
Mon Oct 3 19:20:27 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Oct  3 19:47:10 2011 +0300| [36928f4c2df22d931c14ceebe2aa44b20d88ab7d] | committer: Rémi Denis-Courmont

Add vlc_pa_rttime_free()

This makes up for the lack of pa_context_rttime_free() in libpulse.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=36928f4c2df22d931c14ceebe2aa44b20d88ab7d
---

 include/vlc_pulse.h  |    2 ++
 src/pulse/mainloop.c |   11 +++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/vlc_pulse.h b/include/vlc_pulse.h
index 48e2ce8..e23c840 100644
--- a/include/vlc_pulse.h
+++ b/include/vlc_pulse.h
@@ -35,6 +35,8 @@ VLC_API void vlc_pa_disconnect (vlc_object_t *obj, pa_context *ctx);
 VLC_API void vlc_pa_error (vlc_object_t *, const char *msg, pa_context *);
 #define vlc_pa_error(o, m, c) vlc_pa_error(VLC_OBJECT(o), m, c)
 
+VLC_API void vlc_pa_rttime_free (pa_time_event *);
+
 # ifdef __cplusplus
 }
 # endif
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 1303216..0cb43d8 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -255,3 +255,14 @@ void vlc_pa_disconnect (vlc_object_t *obj, pa_context *ctx)
     vlc_pa_mainloop_deinit ();
     (void) obj;
 }
+
+/**
+ * Frees a timer event.
+ * \note Timer events can be created with pa_context_rttime_new().
+ * \warning This function must be called from the mainloop,
+ * or with the mainloop lock held.
+ */
+void vlc_pa_rttime_free(pa_time_event *e)
+{
+    (pa_threaded_mainloop_get_api (vlc_pa_mainloop))->time_free (e);
+}



More information about the vlc-commits mailing list