Commit 3e04b13b authored by Martin Finkel's avatar Martin Finkel

Minor final changes for UWP release

parent b7f6217a
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
<Summary>The official .NET wrapper around LibVLC.</Summary> <Summary>The official .NET wrapper around LibVLC.</Summary>
<Description> <Description>
LibVLCSharp is a cross-platform audio and video API for .NET platforms based on VideoLAN's LibVLC Library. LibVLCSharp is a cross-platform audio and video API for .NET platforms based on VideoLAN's LibVLC Library.
It provides a comprehensive multimedia API that can be used across mobile, server and desktop to render video and output audio. Mono, .NET Framework and .NET Core runtimes are supported. It provides a comprehensive multimedia API that can be used across mobile, server and desktop to render video and output audio. Mono, .NET Framework and .NET Core runtimes are supported.
This package contains the core features of LibVLCSharp (libvlc loading and initialization, .NET-friendly classes to ease the use of libvlc...).
All other `LibVLCSharp.*` packages depend on this one. This package contains the core features of LibVLCSharp (libvlc loading and initialization, .NET-friendly classes to ease the use of libvlc...). All other `LibVLCSharp.*` packages depend on this one.
This package also contains the views for the following platforms: This package also contains the views for the following platforms:
......
...@@ -55,23 +55,26 @@ ...@@ -55,23 +55,26 @@
/// <summary> /// <summary>
/// Gets the swapchain parameters to pass to the <see cref="LibVLC"/> constructor. /// Gets the swapchain parameters to pass to the <see cref="LibVLC"/> constructor.
///
/// If you don't pass them to the <see cref="LibVLC"/> constructor, the video won't /// If you don't pass them to the <see cref="LibVLC"/> constructor, the video won't
/// be displayed in your application. /// be displayed in your application.
/// Calling this property will throw an <see cref="InvalidOperationException"/> if the VideoView is not yet full Loaded.
/// </summary> /// </summary>
/// <returns>The list of arguments to be given to the <see cref="LibVLC"/> constructor.</returns> /// <returns>The list of arguments to be given to the <see cref="LibVLC"/> constructor.</returns>
public string[] GetSwapChainOptions() public string[] SwapChainOptions
{ {
if (!_loaded) get
{ {
throw new InvalidOperationException("You must wait for the VideoView to be loaded before calling GetSwapChainOptions()"); if (!_loaded)
} {
throw new InvalidOperationException("You must wait for the VideoView to be loaded before calling GetSwapChainOptions()");
}
return new string[] return new string[]
{ {
$"--winrt-d3dcontext=0x{_d3D11Device.ImmediateContext.NativePointer.ToString("x")}", $"--winrt-d3dcontext=0x{_d3D11Device.ImmediateContext.NativePointer.ToString("x")}",
$"--winrt-swapchain=0x{_swapChain.NativePointer.ToString("x")}" $"--winrt-swapchain=0x{_swapChain.NativePointer.ToString("x")}"
}; };
}
} }
/// <summary> /// <summary>
......
...@@ -40,9 +40,12 @@ namespace LibVLCSharp.Shared ...@@ -40,9 +40,12 @@ namespace LibVLCSharp.Shared
} }
#if NET || NETSTANDARD #if NET || NETSTANDARD
#if !UWP
static IntPtr _libvlccoreHandle; static IntPtr _libvlccoreHandle;
#endif // !UWP
static IntPtr _libvlcHandle; static IntPtr _libvlcHandle;
#endif #endif // NET || NETSTANDARD
/// <summary> /// <summary>
/// Load the native libvlc library (if necessary, depending on platform) /// Load the native libvlc library (if necessary, depending on platform)
/// <para/> Ensure that you installed the VideoLAN.LibVLC.[YourPlatform] package in your target project /// <para/> Ensure that you installed the VideoLAN.LibVLC.[YourPlatform] package in your target project
......
...@@ -60,8 +60,8 @@ Mono, .NET Framework and .NET Core runtimes are supported. ...@@ -60,8 +60,8 @@ Mono, .NET Framework and .NET Core runtimes are supported.
- Xamarin.iOS - Xamarin.iOS
- Xamarin.tvOS - Xamarin.tvOS
- Xamarin.Mac (Cocoa) - Xamarin.Mac (Cocoa)
- Windows (WPF, WinForms, GTK) - Windows Classic (WPF, WinForms, GTK)
- Windows 10 (UWP) - Windows Universal (UWP for Desktop, mobile and Xbox)
- Linux (GTK) - Linux (GTK)
- Xamarin.Forms - Xamarin.Forms
- .NET Standard 1.1 and 2.0 - .NET Standard 1.1 and 2.0
......
...@@ -17,7 +17,7 @@ namespace LibVLCSharp.UWP.Sample ...@@ -17,7 +17,7 @@ namespace LibVLCSharp.UWP.Sample
InitializeComponent(); InitializeComponent();
Loaded += (s, e) => Loaded += (s, e) =>
{ {
_libVLC = new LibVLC(VideoView.GetSwapChainOptions()); _libVLC = new LibVLC(VideoView.SwapChainOptions);
_mediaPlayer = new MediaPlayer(_libVLC); _mediaPlayer = new MediaPlayer(_libVLC);
VideoView.MediaPlayer = _mediaPlayer; VideoView.MediaPlayer = _mediaPlayer;
this._mediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation)); this._mediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
......
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