[vlc-devel] commit: Move kept sout instance to playlist private data ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Aug 31 11:18:27 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Aug 31 12:21:18 2008 +0300| [138c463bc99d8a6b43aefdf7efb2d487c22b0987] | committer: Rémi Denis-Courmont 

Move kept sout instance to playlist private data

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

 src/libvlc.h                     |    3 ---
 src/playlist/control.c           |    2 +-
 src/playlist/engine.c            |    5 ++---
 src/playlist/playlist_internal.h |    1 +
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/libvlc.h b/src/libvlc.h
index fe2d940..b188090 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -225,9 +225,6 @@ typedef struct libvlc_priv_t
     vlm_t             *p_vlm;  ///< the VLM singleton (or NULL)
     interaction_t     *p_interaction;    ///< interface interaction object
     httpd_t           *p_httpd; ///< HTTP daemon (src/network/httpd.c)
-
-    /* Private playlist data (FIXME - playlist_t is too public...) */
-    sout_instance_t   *p_sout; ///< kept sout instance (for playlist)
 } libvlc_priv_t;
 
 static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)
diff --git a/src/playlist/control.c b/src/playlist/control.c
index d2dff95..c4fc878 100644
--- a/src/playlist/control.c
+++ b/src/playlist/control.c
@@ -511,7 +511,7 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
 int playlist_PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
 {
     input_item_t *p_input = p_item->p_input;
-    sout_instance_t **pp_sout = &libvlc_priv(p_playlist->p_libvlc)->p_sout;
+    sout_instance_t **pp_sout = &p_playlist->p->p_sout;
     int i_activity = var_GetInteger( p_playlist, "activity" ) ;
 
     msg_Dbg( p_playlist, "creating new input thread" );
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 85d06b6..d0d4c33 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -365,8 +365,7 @@ check_input:
         {
             int i_activity;
             input_thread_t *p_input;
-            sout_instance_t **pp_sout =
-                &libvlc_priv(p_playlist->p_libvlc)->p_sout;
+            sout_instance_t **pp_sout = &p_playlist->p->p_sout;
 
             PL_DEBUG( "dead input" );
 
@@ -507,7 +506,7 @@ void playlist_LastLoop( playlist_t *p_playlist )
 
 #ifdef ENABLE_SOUT
     /* close the remaining sout-keep (if there was no input atm) */
-    sout_instance_t *p_sout = libvlc_priv (p_playlist->p_libvlc)->p_sout;
+    sout_instance_t *p_sout = p_playlist->p->p_sout;
     if (p_sout)
         sout_DeleteInstance( p_sout );
 #endif
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 07294b3..cdc4f3c 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -41,6 +41,7 @@ struct playlist_private_t
 {
     playlist_preparse_t  *p_preparse; /**< Preparser object */
     playlist_fetcher_t   *p_fetcher; /**< Meta and art fetcher object */
+    sout_instance_t      *p_sout; /**< Kept sout instance */
 };
 
 struct playlist_preparse_t




More information about the vlc-devel mailing list