[vlc-devel] commit: libvlc: add functions libvlc_get_version() and others ( Tanguy Krotoff )

git version control git at videolan.org
Sun Mar 30 17:32:14 CEST 2008


vlc | branch: master | Tanguy Krotoff <tkrotoff at gmail.com> | Sun Mar 30 16:57:50 2008 +0200| [6db16f08c744e65a458764c114feef1926cb0f11]

libvlc: add functions libvlc_get_version() and others

Signed-off-by: Pierre d'Herbemont <pdherbemont at videolan.org>

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

 include/vlc/libvlc.h |   27 +++++++++++++++++++++++++++
 src/control/core.c   |   16 ++++++++++++++++
 2 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index a240281..7a8b8f6 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -145,6 +145,33 @@ VLC_PUBLIC_API void libvlc_release( libvlc_instance_t * );
  */
 VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
 
+/**
+ * Retrieve libvlc version.
+ *
+ * Example: "0.9.0-git Grishenko"
+ *
+ * \return a string containing the libvlc version
+ */
+VLC_PUBLIC_API const char * libvlc_get_version();
+
+/**
+ * Retrieve libvlc compiler version.
+ *
+ * Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
+ *
+ * \return a string containing the libvlc compiler version
+ */
+VLC_PUBLIC_API const char * libvlc_get_compiler();
+
+/**
+ * Retrieve libvlc changeset.
+ *
+ * Example: "aa9bce0bc4"
+ *
+ * \return a string containing the libvlc changeset
+ */
+VLC_PUBLIC_API const char * libvlc_get_changeset();
+
 /** @}*/
 
 /*****************************************************************************
diff --git a/src/control/core.c b/src/control/core.c
index 08f550b..6bd4526 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -20,6 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
+
 #include "libvlc_internal.h"
 #include <vlc/libvlc.h>
 
@@ -173,3 +174,18 @@ int libvlc_get_vlc_id( libvlc_instance_t *p_instance )
 {
     return p_instance->p_libvlc_int->i_object_id;
 }
+
+const char * libvlc_get_version()
+{
+    return VLC_Version();
+}
+
+const char * libvlc_get_compiler()
+{
+    return VLC_Compiler();
+}
+
+const char * libvlc_get_changeset()
+{
+    return VLC_Changeset();
+}




More information about the vlc-devel mailing list