[vlc-devel] commit: Added vout_GetSpu to retreive the spu_t object from the vout. ( Laurent Aimar )

git version control git at videolan.org
Sun May 31 02:13:42 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun May 31 02:00:28 2009 +0200| [fd584ea3aea2d53f08ff05b47ea393012531cb85] | committer: Laurent Aimar 

Added vout_GetSpu to retreive the spu_t object from the vout.

It will allow hiding vout_thread_t fields.

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

 include/vlc_vout.h              |    9 +++++++++
 src/libvlccore.sym              |    1 +
 src/video_output/video_output.c |    5 +++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/vlc_vout.h b/include/vlc_vout.h
index 4a706fc..0d64ccb 100644
--- a/include/vlc_vout.h
+++ b/include/vlc_vout.h
@@ -310,6 +310,15 @@ VLC_EXPORT( void,            vout_LinkPicture,    ( vout_thread_t *, picture_t *
 VLC_EXPORT( void,            vout_UnlinkPicture,  ( vout_thread_t *, picture_t * ) );
 VLC_EXPORT( void,            vout_PlacePicture,   ( const vout_thread_t *, unsigned int, unsigned int, unsigned int *, unsigned int *, unsigned int *, unsigned int * ) );
 
+/**
+ * Return the spu_t object associated to a vout_thread_t.
+ *
+ * The return object is valid only as long as the vout is. You must not
+ * release the spu_t object returned.
+ * It cannot return NULL so no need to check.
+ */
+VLC_EXPORT( spu_t *, vout_GetSpu, ( vout_thread_t * ) );
+
 void vout_IntfInit( vout_thread_t * );
 VLC_EXPORT( void, vout_EnableFilter, ( vout_thread_t *, char *,bool , bool  ) );
 
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 53eaee3..48f0a32 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -542,6 +542,7 @@ vout_DestroyPicture
 vout_DisplayPicture
 vout_EnableFilter
 vout_GetSnapshot
+vout_GetSpu
 vout_LinkPicture
 vout_OSDIcon
 __vout_OSDMessage
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 7555d83..864ba00 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -800,6 +800,11 @@ void vout_DisplayTitle( vout_thread_t *p_vout, const char *psz_title )
     vlc_mutex_unlock( &p_vout->change_lock );
 }
 
+spu_t *vout_GetSpu( vout_thread_t *p_vout )
+{
+    return p_vout->p_spu;
+}
+
 /*****************************************************************************
  * InitThread: initialize video output thread
  *****************************************************************************




More information about the vlc-devel mailing list