Commit d4b5054c authored by Martin Finkel's avatar Martin Finkel

MediaPlayer: Add Retain() binding

(cherry picked from commit 7aeb42274dd8ce1e1d937d1b17c6085c73d26824)
parent 92d1b687
......@@ -581,6 +581,9 @@ namespace LibVLCSharp.Shared
EntryPoint = "libvlc_media_player_set_role")]
internal static extern int LibVLCMediaPlayerSetRole(IntPtr mediaplayer, MediaPlayerRole role);
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_retain")]
internal static extern void LibVLCMediaPlayerRetain(IntPtr mediaplayer);
#if ANDROID
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
......@@ -1615,6 +1618,9 @@ namespace LibVLCSharp.Shared
/// <returns>true on success, false otherwise</returns>
public bool SetRole(MediaPlayerRole role) => Native.LibVLCMediaPlayerSetRole(NativeReference, role) == 0;
/// <summary>Increments the native reference counter for this mediaplayer instance</summary>
public void Retain() => Native.LibVLCMediaPlayerRetain(NativeReference);
#if UNITY_ANDROID
/// <summary>
/// Retrieve a video frame from the Unity plugin.
......
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