[vlc-devel] commit: libvlccore: vlc_thread_cancel() tangled object API ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Aug 27 22:57:27 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Aug 16 11:38:14 2008 +0300| [de359690883766501438435667ae33b976302de3] | committer: Rémi Denis-Courmont 

libvlccore: vlc_thread_cancel() tangled object API

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

 src/libvlc.h       |    4 ++++
 src/misc/threads.c |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/libvlc.h b/src/libvlc.h
index dfcaecf..5e476b2 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -52,6 +52,10 @@ void vlc_refcheck (vlc_object_t *obj);
 # define vlc_refcheck( obj ) (void)0
 #endif
 
+/* Hopefully, no need to export this. There is a new thread API instead. */
+void vlc_thread_cancel (vlc_object_t *);
+
+
 /*
  * CPU capabilities
  */
diff --git a/src/misc/threads.c b/src/misc/threads.c
index 6c94811..af65ddb 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -829,3 +829,10 @@ error:
     p_priv->b_thread = false;
 }
 
+void vlc_thread_cancel (vlc_object_t *obj)
+{
+    vlc_object_internals_t *priv = vlc_internals (obj);
+
+    if (priv->b_thread)
+        vlc_cancel (priv->thread_id);
+}




More information about the vlc-devel mailing list