This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17906ee
commit 421ddef
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
....Interops/Signatures/libvlc_media_player.h/libvlc_media_player_set_video_title_display.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Vlc.DotNet.Core.Interops.Signatures | ||
{ | ||
[LibVlcFunction("libvlc_media_player_set_video_title_display")] | ||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
internal delegate void SetVideoTitleDisplay(IntPtr mp, Position position, int timeout); | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Vlc.DotNet.Core.Interops/Signatures/libvlc_media_player.h/libvlc_position_t.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Vlc.DotNet.Core.Interops.Signatures | ||
{ | ||
public enum Position | ||
{ | ||
Disable=-1, | ||
Center, | ||
Left, | ||
Right, | ||
Top, | ||
TopLeft, | ||
TopRight, | ||
Bottom, | ||
BottomLeft, | ||
BottomRight | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Vlc.DotNet.Core.Interops/VlcManager.SetVideoTitleDisplay.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using Vlc.DotNet.Core.Interops.Signatures; | ||
|
||
namespace Vlc.DotNet.Core.Interops | ||
{ | ||
public sealed partial class VlcManager | ||
{ | ||
/// <summary> | ||
/// Set if, and how, the video title will be shown when media is played. | ||
/// </summary> | ||
/// <param name="mediaPlayerInstance">The media player instance</param> | ||
/// <param name="position">position at which to display the title, or libvlc_position_disable to prevent the title from being displayed</param> | ||
/// <param name="timeout">title display timeout in milliseconds (ignored if libvlc_position_disable)</param> | ||
public void SetVideoTitleDisplay(IntPtr mediaPlayerInstance, Position position, int timeout) | ||
{ | ||
if (mediaPlayerInstance == IntPtr.Zero) | ||
throw new ArgumentException("Media player instance is not initialized."); | ||
GetInteropDelegate<SetVideoTitleDisplay>().Invoke(mediaPlayerInstance, position, timeout); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters