[vlc-devel] commit: libvlc: Export libvlc_media_player_get_input_thread(). (Pierre d' Herbemont )

git version control git at videolan.org
Fri Jan 29 11:49:34 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Fri Jan 29 01:42:55 2010 +0100| [714ef56a1682be404888668bd3c1c688cd0d2aeb] | committer: Pierre d'Herbemont 

libvlc: Export libvlc_media_player_get_input_thread().

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

 include/vlc/libvlc_media_player.h |    9 +++++++++
 src/control/media_player.c        |   12 ++++++++++++
 src/libvlc.sym                    |    1 +
 3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 2897f07..452b2ad 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -502,6 +502,15 @@ VLC_PUBLIC_API void    libvlc_media_player_next_frame( libvlc_media_player_t *p_
                                                        libvlc_exception_t *p_e );
 
 
+/**
+ * Access to libvlc core internal structure.
+ *
+ * This enables nasty hack. Use of this method is discouraged.
+ *
+ * \param player the libvlc_media_player_t instance
+ * \return a libvlccore input_thread_t or NULL. The actual behaviour is not specified.
+ */
+VLC_PUBLIC_API struct input_thread_t *libvlc_media_player_get_input_thread( libvlc_media_player_t *player );
 
 /**
  * Release (free) libvlc_track_description_t
diff --git a/src/control/media_player.c b/src/control/media_player.c
index 1be7112..971474b 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -1223,3 +1223,15 @@ void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi, libvlc_excepti
         libvlc_printerr( "No active input" );
     }
 }
+
+/**************************************************************************
+ * get_input_thread (Public API version)
+ **************************************************************************/
+struct input_thread_t *libvlc_media_player_get_input_thread( libvlc_media_player_t *player )
+{
+    libvlc_exception_t e;
+    libvlc_exception_init(&e);
+    input_thread_t *input = libvlc_get_input_thread(player, &e);
+    clear_if_needed(&e);
+    return input;
+}
diff --git a/src/libvlc.sym b/src/libvlc.sym
index b4d2555..305ed5a 100644
--- a/src/libvlc.sym
+++ b/src/libvlc.sym
@@ -133,6 +133,7 @@ libvlc_media_player_get_chapter_count
 libvlc_media_player_get_chapter_count_for_title
 libvlc_media_player_get_fps
 libvlc_media_player_get_hwnd
+libvlc_media_player_get_input_thread
 libvlc_media_player_get_length
 libvlc_media_player_get_media
 libvlc_media_player_get_nsobject




More information about the vlc-devel mailing list