]> git.sesse.net Git - vlc/commitdiff
libvlc: add functions libvlc_get_version() and others
authorTanguy Krotoff <tkrotoff@gmail.com>
Sun, 30 Mar 2008 14:57:50 +0000 (16:57 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 30 Mar 2008 15:32:20 +0000 (17:32 +0200)
Signed-off-by: Pierre d'Herbemont <pdherbemont@videolan.org>
include/vlc/libvlc.h
src/control/core.c

index a2402813cf0d90a738f4cf0df6d97f8f29d5b046..7a8b8f63533daa4178eed72a94fe1c3e424fa922 100644 (file)
@@ -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();
+
 /** @}*/
 
 /*****************************************************************************
index 08f550b61229261a10840a3e60f8451f6ed90845..6bd45261d032a1f5c7bad72a91a730545d8a414c 100644 (file)
@@ -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();
+}