[vlc-commits] Added input_Close() helper.
Laurent Aimar
git at videolan.org
Sun May 22 22:41:04 CEST 2011
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun May 22 21:49:14 2011 +0200| [2176bf42341e802af7c6a9ae26e7d17c882c65d9] | committer: Laurent Aimar
Added input_Close() helper.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2176bf42341e802af7c6a9ae26e7d17c882c65d9
---
include/vlc_input.h | 2 ++
src/input/input.c | 11 +++++++++++
src/libvlccore.sym | 1 +
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/include/vlc_input.h b/include/vlc_input.h
index 7b052e9..455241a 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -543,6 +543,8 @@ VLC_API int input_vaControl( input_thread_t *, int i_query, va_list );
VLC_API int input_Control( input_thread_t *, int i_query, ... );
+VLC_API int input_Close( input_thread_t * );
+
/**
* Get the input item for an input thread
*
diff --git a/src/input/input.c b/src/input/input.c
index 63a1480..cfbe3cc 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -251,6 +251,17 @@ void input_Stop( input_thread_t *p_input, bool b_abort )
}
/**
+ * Close an input
+ *
+ * It does not call input_Stop itself.
+ */
+int input_Close( input_thread_t *p_input )
+{
+ vlc_thread_join( p_input );
+ vlc_object_release( p_input );
+}
+
+/**
* Get the item from an input thread
* FIXME it does not increase ref count of the item.
* if it is used after p_input is destroyed nothing prevent it from
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 8961537..b53b0a0 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -226,6 +226,7 @@ input_SplitMRL
input_Start
input_Stop
input_vaControl
+input_Close
intf_Create
intf_Eject
IsUTF8
More information about the vlc-commits
mailing list