Commit 51bde738 authored by Martin Finkel's avatar Martin Finkel

LibVLC: Add changeset binding

parent e1c7a031
......@@ -152,8 +152,13 @@ namespace LibVLCSharp.Tests
[Test]
public void LibVLCVersion()
{
var version = _libVLC.Version;
Assert.True(version.StartsWith("3"));
Assert.True(_libVLC.Version.StartsWith("3"));
}
[Test]
public void LibVLCChangeset()
{
Assert.IsNotNull(_libVLC.Changeset);
}
}
}
\ No newline at end of file
......@@ -147,6 +147,9 @@ namespace LibVLCSharp.Shared
EntryPoint = "libvlc_get_version")]
internal static extern IntPtr LibVLCVersion();
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_get_changeset")]
internal static extern IntPtr LibVLCChangeset();
#if ANDROID
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_android_context")]
......@@ -631,6 +634,9 @@ namespace LibVLCSharp.Shared
/// <summary>The version of the LibVLC engine currently used by LibVLCSharp</summary>
public string Version => Native.LibVLCVersion().FromUtf8();
/// <summary>The changeset of the LibVLC engine currently used by LibVLCSharp</summary>
public string Changeset => Native.LibVLCChangeset().FromUtf8();
}
/// <summary>Logging messages level.</summary>
......
......@@ -560,8 +560,7 @@ namespace LibVLCSharp.Shared
/// <param name="type">The type of the track</param>
/// <param name="codec">the codec or fourcc</param>
/// <returns>the codec description</returns>
public string CodecDescription(TrackType type, uint codec)
=> Native.LibvlcMediaGetCodecDescription(type, codec);
public string CodecDescription(TrackType type, uint codec) => Native.LibvlcMediaGetCodecDescription(type, codec).FromUtf8();
public override bool Equals(object obj)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment