[vlc-devel] commit: p_vlm is private data ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun May 4 19:54:03 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sun May  4 20:37:05 2008 +0300| [e0a120ef811bdb2d1bccdde0838105f6dba99669]

p_vlm is private data

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

 include/vlc_main.h  |    4 ----
 src/libvlc-common.c |   11 ++++++-----
 src/libvlc.h        |    3 +++
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/vlc_main.h b/include/vlc_main.h
index 545eb74..174c8f5 100644
--- a/include/vlc_main.h
+++ b/include/vlc_main.h
@@ -49,10 +49,6 @@ struct libvlc_int_t
 
     vlc_object_t          *p_interaction;    ///< interface interaction object
 
-    vlm_t                 *p_vlm;            ///< vlm if created from libvlc-common.
-                                             /// (this is clearly private and
-                                             //  shouldn't be used)
-
     void                 *p_stats_computer;  ///< Input thread computing stats (needs cleanup)
     global_stats_t       *p_stats;           ///< Global statistics
 
diff --git a/src/libvlc-common.c b/src/libvlc-common.c
index 5df3d8a..5c11207 100644
--- a/src/libvlc-common.c
+++ b/src/libvlc-common.c
@@ -180,7 +180,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
 
     p_libvlc->p_playlist = NULL;
     p_libvlc->p_interaction = NULL;
-    p_libvlc->p_vlm = NULL;
+    priv->p_vlm = NULL;
     p_libvlc->psz_object_name = strdup( "libvlc" );
     priv = libvlc_priv (p_libvlc);
 
@@ -769,8 +769,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     psz_parser = config_GetPsz( p_libvlc, "vlm-conf" );
     if( psz_parser && *psz_parser )
     {
-        p_libvlc->p_vlm = vlm_New( p_libvlc );
-        if( !p_libvlc->p_vlm )
+        priv->p_vlm = vlm_New( p_libvlc );
+        if( !priv->p_vlm )
             msg_Err( p_libvlc, "VLM initialization failed" );
     }
     free( psz_parser );
@@ -932,6 +932,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
     intf_thread_t      * p_intf = NULL;
     vout_thread_t      * p_vout = NULL;
     aout_instance_t    * p_aout = NULL;
+    libvlc_priv_t      *priv = libvlc_priv (p_libvlc);
 
     /* Ask the interfaces to stop and destroy them */
     msg_Dbg( p_libvlc, "removing all interfaces" );
@@ -979,9 +980,9 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
     }
 
     /* Destroy VLM if created in libvlc_InternalInit */
-    if( p_libvlc->p_vlm )
+    if( priv->p_vlm )
     {
-        vlm_Delete( p_libvlc->p_vlm );
+        vlm_Delete( priv->p_vlm );
     }
 #endif
 
diff --git a/src/libvlc.h b/src/libvlc.h
index b0c3d9e..b9cdb34 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -178,6 +178,9 @@ typedef struct libvlc_priv_t
     bool               b_stats;     ///< Whether to collect stats
 
     module_t          *p_memcpy_module;  ///< Fast memcpy plugin used
+    vlm_t             *p_vlm;  ///< VLM if created from libvlc-common.c
+
+    httpd_t           *p_httpd; ///< HTTP daemon (src/network/httpd.c)
 } libvlc_priv_t;
 
 static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)




More information about the vlc-devel mailing list