[vlc-commits] Also deprecate verbosity functions

Rémi Denis-Courmont git at videolan.org
Sat Aug 20 19:31:59 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 20 20:31:29 2011 +0300| [195940cabc71ab5ed5f80bc538bdf074f0469446] | committer: Rémi Denis-Courmont

Also deprecate verbosity functions

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

 include/vlc/libvlc.h          |   16 ++++++++++------
 src/control/core.c            |    1 -
 src/control/libvlc_internal.h |    1 -
 src/control/log.c             |    8 ++++----
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index b608a1b..500fea1 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -312,19 +312,23 @@ LIBVLC_API const char * libvlc_event_type_name( libvlc_event_type_t event_type )
  */
 
 /**
- * Return the VLC messaging verbosity level.
+ * Always returns minus one.
+ * This function is only provided for backward compatibility.
  *
- * \param p_instance libvlc instance
- * \return verbosity level for messages
+ * \param p_instance ignored
+ * \return always -1
  */
+LIBVLC_DEPRECATED
 LIBVLC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance );
 
 /**
- * Set the VLC messaging verbosity level.
+ * This function does nothing.
+ * It is only provided for backward compatibility.
  *
- * \param p_instance libvlc log instance
- * \param level log level
+ * \param p_instance ignored
+ * \param level ignored
  */
+LIBVLC_DEPRECATED
 LIBVLC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level );
 
 /**
diff --git a/src/control/core.c b/src/control/core.c
index 2834af1..6e88b94 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -67,7 +67,6 @@ libvlc_instance_t * libvlc_new( int argc, const char *const *argv )
     p_new->libvlc_vlm.p_event_manager = NULL;
     p_new->libvlc_vlm.pf_release = NULL;
     p_new->ref_count = 1;
-    p_new->verbosity = 1;
     p_new->p_callback_list = NULL;
     vlc_mutex_init(&p_new->instance_lock);
     var_Create( p_libvlc_int, "http-user-agent",
diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h
index 076c614..6e7c173 100644
--- a/src/control/libvlc_internal.h
+++ b/src/control/libvlc_internal.h
@@ -70,7 +70,6 @@ struct libvlc_instance_t
     libvlc_int_t *p_libvlc_int;
     libvlc_vlm_t  libvlc_vlm;
     unsigned      ref_count;
-    int           verbosity;
     vlc_mutex_t   instance_lock;
     struct libvlc_callback_entry_list_t *p_callback_list;
 };
diff --git a/src/control/log.c b/src/control/log.c
index 2745ddc..451a6d0 100644
--- a/src/control/log.c
+++ b/src/control/log.c
@@ -37,14 +37,14 @@ struct libvlc_log_t
 
 unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance )
 {
-    assert( p_instance );
-    return p_instance->verbosity;
+    (void) p_instance;
+    return -1;
 }
 
 void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level )
 {
-    assert( p_instance );
-    p_instance->verbosity = level;
+    (void) p_instance;
+    (void) level;
 }
 
 libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance )



More information about the vlc-commits mailing list