...
 
Commits (21)
......@@ -26,4 +26,7 @@
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap'))">
<DefineConstants>$(DefineConstants);UWP;NET</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
<DefineConstants>$(DefineConstants);UWP10_0</DefineConstants>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -2,32 +2,15 @@
<PropertyGroup>
<Title>LibVLCSharp.Forms.GTK</Title>
<Summary>GTK integration for LibVLCSharp.Forms</Summary>
<Description>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.
<Description>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.
LibVLCSharp.Forms.GTK contains the Xamarin.Forms support for LibVLCSharp through custom renderers on the GTK platform. It depends on LibVLCSharp.Forms and LibVLCSharp.GTK.
Supported platforms:
- Xamarin.Android
- Xamarin.iOS
- Xamarin.Mac
- Windows (WPF/WinForms)
- Xamarin.Forms
- .NET Standard 1.1
- .NET Core
Features:
- Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...).
- HDMI passthrough for Audio HD codecs, like E-AC3, TrueHD or DTS-HD.
- Stream to distant renderers, like Chromecast.
- 360 video and 3D audio playback with viewpoint change.
- Support for Ambisonics audio and more than 8 audio channels.
- Subtitles size modification live.
- Hardware decoding and display on all platforms.
- DVD playback and menu navigation.
</Description>
Xamarin.Forms support for other platforms are in different packages (namely LibVLCSharp.Forms and LibVLCSharp.Forms.WPF). LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages.
</Description>
<TargetFramework>net47</TargetFramework>
<RootNamespace>LibVLCSharp.Forms.Platforms.GTK</RootNamespace>
<PackageVersion>0.8.1</PackageVersion>
<Version>3.0.2</Version>
<PackageId>LibVLCSharp.Forms.GTK</PackageId>
<Authors>VideoLAN</Authors>
<Owners>VideoLAN</Owners>
......
......@@ -2,32 +2,15 @@
<PropertyGroup>
<Title>LibVLCSharp.Forms.WPF</Title>
<Summary>WPF integration for LibVLCSharp.Forms</Summary>
<Description>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.
<Description>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.
Supported platforms:
- Xamarin.Android
- Xamarin.iOS
- Xamarin.Mac
- Windows (WPF/WinForms)
- Xamarin.Forms
- .NET Standard 1.1
- .NET Core
LibVLCSharp.Forms.WPF contains the Xamarin.Forms support for LibVLCSharp through custom renderers on the WPF platform. It depends on LibVLCSharp.Forms and LibVLCSharp.WPF.
Features:
- Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...).
- HDMI passthrough for Audio HD codecs, like E-AC3, TrueHD or DTS-HD.
- Stream to distant renderers, like Chromecast.
- 360 video and 3D audio playback with viewpoint change.
- Support for Ambisonics audio and more than 8 audio channels.
- Subtitles size modification live.
- Hardware decoding and display on all platforms.
- DVD playback and menu navigation.
</Description>
Xamarin.Forms support for other platforms are in different packages (namely LibVLCSharp.Forms and LibVLCSharp.Forms.GTK). LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages.
</Description>
<TargetFramework>net47</TargetFramework>
<RootNamespace>LibVLCSharp.Forms.Platforms.WPF</RootNamespace>
<PackageVersion>0.8.1</PackageVersion>
<Version>3.0.2</Version>
<PackageId>LibVLCSharp.Forms.WPF</PackageId>
<Authors>VideoLAN</Authors>
<Owners>VideoLAN</Owners>
......
......@@ -2,35 +2,21 @@
<PropertyGroup>
<Title>LibVLCSharp.Forms</Title>
<Summary>Xamarin.Forms integration for LibVLCSharp</Summary>
<Description>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.
<Description>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.
LibVLCSharp.Forms contains the Xamarin.Forms support for LibVLCSharp through custom renderers. It depends on LibVLCSharp and brings Xamarin.Forms support for:
- Android,
- iOS,
- Mac.
Supported platforms:
- Xamarin.Android
- Xamarin.iOS
- Xamarin.Mac
- Windows (WPF/WinForms)
- Xamarin.Forms
- .NET Standard 1.1
- .NET Core
Features:
- Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...).
- HDMI passthrough for Audio HD codecs, like E-AC3, TrueHD or DTS-HD.
- Stream to distant renderers, like Chromecast.
- 360 video and 3D audio playback with viewpoint change.
- Support for Ambisonics audio and more than 8 audio channels.
- Subtitles size modification live.
- Hardware decoding and display on all platforms.
- DVD playback and menu navigation.
Xamarin.Forms support for GTK and WPF are in separate packages. LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages.
</Description>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsPlatform('Linux'))">$(TargetFrameworks);MonoAndroid81;Xamarin.iOS10;Xamarin.Mac20</TargetFrameworks>
<RootNamespace>LibVLCSharp.Forms</RootNamespace>
<NeutralLanguage>en</NeutralLanguage>
<LangVersion>7.3</LangVersion>
<Version>0.8.1</Version>
<Version>3.0.2</Version>
<PackageId>LibVLCSharp.Forms</PackageId>
<Authors>VideoLAN</Authors>
<Owners>VideoLAN</Owners>
......
......@@ -20,24 +20,24 @@ namespace LibVLCSharp.Forms.Platforms.Android
{
base.OnElementChanged(e);
if (Control == null)
if (e.NewElement != null)
{
SetNativeControl(new LibVLCSharp.Platforms.Android.VideoView(Context));
if (Control == null)
{
SetNativeControl(new LibVLCSharp.Platforms.Android.VideoView(Context));
e.NewElement.MediaPlayerChanging += OnMediaPlayerChanging;
if (Control.MediaPlayer != e.NewElement.MediaPlayer)
{
OnMediaPlayerChanging(this, new MediaPlayerChangingEventArgs(Control.MediaPlayer, e.NewElement.MediaPlayer));
}
}
}
if (e.OldElement != null)
{
e.OldElement.MediaPlayerChanging -= OnMediaPlayerChanging;
}
if (e.NewElement != null)
{
e.NewElement.MediaPlayerChanging += OnMediaPlayerChanging;
if (Control.MediaPlayer != e.NewElement.MediaPlayer)
{
OnMediaPlayerChanging(this, new MediaPlayerChangingEventArgs(Control.MediaPlayer, e.NewElement.MediaPlayer));
}
}
}
}
private void OnMediaPlayerChanging(object sender, MediaPlayerChangingEventArgs e)
......
......@@ -15,24 +15,24 @@ namespace LibVLCSharp.Forms.Platforms.Mac
{
base.OnElementChanged(e);
if (Control == null)
if (e.NewElement != null)
{
SetNativeControl(new LibVLCSharp.Platforms.Mac.VideoView());
if (Control == null)
{
SetNativeControl(new LibVLCSharp.Platforms.Mac.VideoView());
e.NewElement.MediaPlayerChanging += OnMediaPlayerChanging;
if (Control.MediaPlayer != e.NewElement.MediaPlayer)
{
OnMediaPlayerChanging(this, new MediaPlayerChangingEventArgs(Control.MediaPlayer, e.NewElement.MediaPlayer));
}
}
}
if (e.OldElement != null)
{
e.OldElement.MediaPlayerChanging -= OnMediaPlayerChanging;
}
if (e.NewElement != null)
{
e.NewElement.MediaPlayerChanging += OnMediaPlayerChanging;
if (Control.MediaPlayer != e.NewElement.MediaPlayer)
{
OnMediaPlayerChanging(this, new MediaPlayerChangingEventArgs(Control.MediaPlayer, e.NewElement.MediaPlayer));
}
}
}
private void OnMediaPlayerChanging(object sender, MediaPlayerChangingEventArgs e)
......
using LibVLCSharp.Shared;
using LibVLCSharp.Forms.Platforms.iOS;
using LibVLCSharp.Forms.Shared;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using UIKit;
using System;
using Foundation;
[assembly: ExportRenderer(typeof(LibVLCSharp.Forms.Shared.VideoView), typeof(VideoViewRenderer))]
namespace LibVLCSharp.Forms.Platforms.iOS
{
[Preserve(AllMembers = true)]
public class VideoViewRenderer : ViewRenderer<LibVLCSharp.Forms.Shared.VideoView, LibVLCSharp.Platforms.iOS.VideoView>
{
protected override void OnElementChanged(ElementChangedEventArgs<LibVLCSharp.Forms.Shared.VideoView> e)
{
base.OnElementChanged(e);
if(Control == null)
if (e.NewElement != null)
{
SetNativeControl(new LibVLCSharp.Forms.Platforms.iOS.VideoView());
if (Control == null)
{
SetNativeControl(new LibVLCSharp.Platforms.iOS.VideoView());
e.NewElement.MediaPlayerChanging += OnMediaPlayerChanging;
if (Control.MediaPlayer != e.NewElement.MediaPlayer)
{
OnMediaPlayerChanging(this, new MediaPlayerChangingEventArgs(Control.MediaPlayer, e.NewElement.MediaPlayer));
}
}
}
if (e.OldElement != null)
{
e.OldElement.MediaPlayerChanging -= OnMediaPlayerChanging;
}
if (e.NewElement != null)
{
e.NewElement.MediaPlayerChanging += OnMediaPlayerChanging;
if (Control.MediaPlayer != e.NewElement.MediaPlayer)
{
OnMediaPlayerChanging(this, new MediaPlayerChangingEventArgs(Control.MediaPlayer, e.NewElement.MediaPlayer));
}
}
}
private void OnMediaPlayerChanging(object sender, MediaPlayerChangingEventArgs e)
......@@ -42,26 +41,4 @@ namespace LibVLCSharp.Forms.Platforms.iOS
Control.MediaPlayer = e.NewMediaPlayer;
}
}
public class VideoView : LibVLCSharp.Platforms.iOS.VideoView, IVisualElementRenderer
{
public VisualElement Element { get; private set; }
public UIView NativeView => this;
public UIViewController ViewController => ViewController;
public event EventHandler<VisualElementChangedEventArgs> ElementChanged;
public SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint) => this.GetSizeRequest(widthConstraint, heightConstraint);
public void SetElement(VisualElement element)
{
Element = element;
ElementChanged?.Invoke(this, new VisualElementChangedEventArgs(null, Element));
}
public void SetElementSize(Size size) => Element.Layout(new Rectangle(Element.X, Element.Y, size.Width, size.Height));
}
}
\ No newline at end of file
......@@ -2,20 +2,19 @@
<PropertyGroup>
<Title>LibVLCSharp.GTK</Title>
<Summary>GTK integration for LibVLCSharp</Summary>
<Description>The official GTK# (mono/gtk-sharp) views for LibVLCSharp.
<Description>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.
LibVLCSharp.GTK contains the integration with GTK# (mono/gtk-sharp).
This package contains the views that allows to display a video played with LibVLCSharp
in a GTK# app.
LibVLCSharp.Forms.Platforms.GTK depends on this package.
This package depends on LibVLCSharp.
This package depends on LibVLCSharp. If you need Xamarin.Forms support for your GTK app, see LibVLCSharp.Forms.Platforms.GTK (which depends on this package).
libvlc needs to be installed separately.
LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages.
</Description>
<TargetFramework>net47</TargetFramework>
<RootNamespace>LibVLCSharp.GTK</RootNamespace>
<Version>0.8.1</Version>
<Version>3.0.2</Version>
<PackageId>LibVLCSharp.GTK</PackageId>
<Authors>VideoLAN</Authors>
<Owners>VideoLAN</Owners>
......
......@@ -2,34 +2,20 @@
<PropertyGroup>
<Title>LibVLCSharp.WPF</Title>
<Summary>WPF integration for LibVLCSharp</Summary>
<Description>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.
<Description>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.
LibVLCSharp.WPF contains the integration with Windows Presentation Foundation (WPF).
Supported platforms:
- Xamarin.Android
- Xamarin.iOS
- Xamarin.Mac
- Windows (WPF/WinForms)
- Xamarin.Forms
- .NET Standard 1.1
- .NET Core
This package contains the views that allows to display a video played with LibVLCSharp
in a WPF app. It depends on LibVLCSharp.
Features:
- Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...).
- HDMI passthrough for Audio HD codecs, like E-AC3, TrueHD or DTS-HD.
- Stream to distant renderers, like Chromecast.
- 360 video and 3D audio playback with viewpoint change.
- Support for Ambisonics audio and more than 8 audio channels.
- Subtitles size modification live.
- Hardware decoding and display on all platforms.
- DVD playback and menu navigation.
</Description>
LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages.
</Description>
<TargetFramework>net461</TargetFramework>
<RootNamespace>LibVLCSharp.WPF</RootNamespace>
<NeutralLanguage>en</NeutralLanguage>
<LangVersion>7.3</LangVersion>
<Version>0.8.1</Version>
<Version>3.0.2</Version>
<PackageId>LibVLCSharp.WPF</PackageId>
<UseWPF>true</UseWPF>
<Authors>VideoLAN</Authors>
......
# LibVLCSharp.WPF
[![NuGet Stats](https://img.shields.io/nuget/v/LibVLCSharp.WPF.svg)](https://www.nuget.org/packages/LibVLCSharp.WPF)
[![NuGet Stats](https://img.shields.io/nuget/dt/LibVLCSharp.WPF.svg)](https://www.nuget.org/packages/LibVLCSharp.WPF)
LibVLCSharp.WPF is the WPF integration for LibVLCSharp.
It contains the views that allow to display a video played with [LibVLCSharp](../LibVLCSharp/README.md)
in a WPF app.
[LibVLCSharp.Forms.Platforms.WPF](../LibVLCSharp.Forms.Platforms.WPF) depends on this package.
This package depends on [LibVLCSharp](../LibVLCSharp/README.md).
Supported framework:
- net461+
Supported platform:
- Windows
## Airspace limitations
If you encounter UI issues with the WPF VideoView in your application, you may be running into what is called _airspace_ limitations.
For context and explanations of the tradeoffs, see this [PR](https://github.com/videolan/libvlcsharp/pull/1).
Issues related to airspace are tracked on our GitLab with the [airspace](https://code.videolan.org/videolan/LibVLCSharp/issues?scope=all&utf8=%E2%9C%93&state=all&label_name[]=airspace) tag.
## Why should I reference this package in my project?
If you want to create a video application using WPF and any supported .NET language, this package is made for you.
You can also create a true cross-platform application with Xamarin.Forms, and use the WPF backend.
In that case, you would need the [LibVLCSharp.Forms.Platforms.WPF](../LibVLCSharp.Forms.Platforms.WPF) package instead, which internally references this one.
For other platforms, see the [main documentation](../README.md).
......@@ -2,26 +2,18 @@
<PropertyGroup>
<Title>LibVLCSharp.WinForms</Title>
<Summary>WinForms integration for LibVLCSharp</Summary>
<Description>
LibVLCSharp is a cross-platform audio and video API for .NET platforms based on VideoLAN's LibVLC Library.
<Description>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.
LibVLCSharp.WinForms contains the integration with Windows Forms.
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 views that allows to display a video played with LibVLCSharp
in a Windows Forms app. It depends on LibVLCSharp.
Use this package in your WinForms project to get a VideoView with LibVLCSharp integration.
Features:
- Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...).
- HDMI passthrough for Audio HD codecs, like E-AC3, TrueHD or DTS-HD.
- Stream to distant renderers, like Chromecast.
- 360 video and 3D audio playback with viewpoint change.
- Support for Ambisonics audio and more than 8 audio channels.
- Subtitles size modification live.
- Hardware decoding and display on all platforms.
- DVD playback and menu navigation.
LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages.
</Description>
<TargetFrameworks>net40</TargetFrameworks>
<RootNamespace>LibVLCSharp.WinForms</RootNamespace>
<Version>0.8.1</Version>
<Version>3.0.2</Version>
<PackageId>LibVLCSharp.WinForms</PackageId>
<Authors>VideoLAN</Authors>
<Owners>VideoLAN</Owners>
......
# LibVLCSharp.WinForms
[![NuGet Stats](https://img.shields.io/nuget/v/LibVLCSharp.WinForms.svg)](https://www.nuget.org/packages/LibVLCSharp.WinForms)
[![NuGet Stats](https://img.shields.io/nuget/dt/LibVLCSharp.WinForms.svg)](https://www.nuget.org/packages/LibVLCSharp.WPF)
LibVLCSharp.WinForms is the WinForms integration for LibVLCSharp.
It contains the views that allow to display a video played with [LibVLCSharp](../LibVLCSharp/README.md)
in a Windows Forms app.
This package depends on [LibVLCSharp](../LibVLCSharp/README.md).
Supported framework:
- net40+
Supported platform:
- Windows
## Why should I reference this package in my project?
If you want to create a video application using Windows Forms and any supported .NET language, this package is made for you.
For other platforms, see the [main documentation](../README.md).
......@@ -2,31 +2,40 @@
<PropertyGroup>
<Title>LibVLCSharp</Title>
<Summary>The official .NET wrapper around LibVLC.</Summary>
<Description>
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.
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.
<Description>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.
This package also contains the views for the following platforms:
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.
Features:
- Plays all formats
- Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...).
- HDMI pass-through for Audio HD codecs, like E-AC3, TrueHD or DTS-HD.
- Stream to distant renderers, like Chromecast.
- 360 video and 3D audio playback with viewpoint change.
- Support for Ambisonics audio and more than 8 audio channels.
- Subtitles size modification live.
- Hardware and software decoding on all platforms.
- DVD playback and menu navigation.
- Equalizer support.
- Android
- iOS
- Mac
- tvOS
- UWP
This package also contains the views for the following platforms:
libvlc needs to be installed separately. See VideoLAN.LibVLC.* packages.
</Description>
- Android
- iOS
- Mac
- tvOS
- UWP
If you need Xamarin.Forms support, see LibVLCSharp.Forms.
LibVLC needs to be installed separately, see VideoLAN.LibVLC.* packages.</Description>
<TargetFrameworks>netstandard2.0;netstandard1.1;net40;net471</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsPlatform('Linux'))">$(TargetFrameworks);MonoAndroid81;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);uap10.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);uap10.0;uap10.0.16299</TargetFrameworks>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeAWindow</TargetsForTfmSpecificBuildOutput>
<RootNamespace>LibVLCSharp</RootNamespace>
<NeutralLanguage>en</NeutralLanguage>
<LangVersion>7.3</LangVersion>
<PackageVersion>0.8.1</PackageVersion>
<Version>3.0.2</Version>
<PackageId>LibVLCSharp</PackageId>
<Authors>VideoLAN</Authors>
<Owners>VideoLAN</Owners>
......
using System;
using LibVLCSharp.Shared.Helpers;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
......@@ -37,6 +38,9 @@ namespace LibVLCSharp.Shared
[DllImport(Constants.LibraryName, EntryPoint = "JNI_OnLoad")]
internal static extern int JniOnLoad(IntPtr javaVm, IntPtr reserved = default(IntPtr));
#endif
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_get_version")]
internal static extern IntPtr LibVLCVersion();
}
#if NET || NETSTANDARD
......@@ -50,6 +54,8 @@ namespace LibVLCSharp.Shared
/// 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/> This will throw a <see cref="VLCException"/> if the native libvlc libraries cannot be found or loaded.
/// <para/> It may also throw a <see cref="VLCException"/> if the LibVLC and LibVLCSharp major versions do not match.
/// See https://code.videolan.org/videolan/LibVLCSharp/blob/master/VERSIONING.md for more info about the versioning strategy.
/// </summary>
/// <param name="libvlcDirectoryPath">The path to the directory that contains libvlc and libvlccore
/// No need to specify unless running netstandard 1.1, or using custom location for libvlc
......@@ -63,9 +69,26 @@ namespace LibVLCSharp.Shared
InitializeUWP();
#elif NET || NETSTANDARD
InitializeDesktop(libvlcDirectoryPath);
#endif
#if !UWP10_0 && !NETSTANDARD1_1
EnsureVersionsMatch();
#endif
}
#if !UWP10_0 && !NETSTANDARD1_1
/// <summary>
/// Checks whether the major version of LibVLC and LibVLCSharp match <para/>
/// Throws an NotSupportedException if the major versions mismatch
/// </summary>
static void EnsureVersionsMatch()
{
var libvlcMajorVersion = int.Parse(Native.LibVLCVersion().FromUtf8().Split('.').First());
var libvlcsharpMajorVersion = Assembly.GetExecutingAssembly().GetName().Version.Major;
if(libvlcMajorVersion != libvlcsharpMajorVersion)
throw new VLCException($"Version mismatch between LibVLC {libvlcMajorVersion} and LibVLCSharp {libvlcsharpMajorVersion}. " +
$"They must share the same major version number");
}
#endif
#if ANDROID
static void InitializeAndroid()
{
......
......@@ -200,29 +200,30 @@ namespace LibVLCSharp.Shared
internal delegate void UpdateProgressCallback(IntPtr data, IntPtr dialogId, float position, string text);
/// <summary>Dialog callbacks to be implemented</summary>
internal readonly struct DialogCallbacks
[StructLayout(LayoutKind.Sequential)]
internal struct DialogCallbacks
{
internal DialogCallbacks(DisplayErrorCallback displayError, DisplayLoginCallback displayLogin, DisplayQuestionCallback displayQuestion,
DisplayProgressCallback displayProgress, CancelCallback cancel, UpdateProgressCallback updateProgress)
{
DisplayError = displayError;
DisplayLogin = displayLogin;
DisplayQuestion = displayQuestion;
DisplayProgress = displayProgress;
Cancel = cancel;
UpdateProgress = updateProgress;
DisplayError = Marshal.GetFunctionPointerForDelegate(displayError);
DisplayLogin = Marshal.GetFunctionPointerForDelegate(displayLogin);
DisplayQuestion = Marshal.GetFunctionPointerForDelegate(displayQuestion);
DisplayProgress = Marshal.GetFunctionPointerForDelegate(displayProgress);
Cancel = Marshal.GetFunctionPointerForDelegate(cancel);
UpdateProgress = Marshal.GetFunctionPointerForDelegate(updateProgress);
}
internal readonly DisplayErrorCallback DisplayError;
internal IntPtr DisplayError { get; set; }
internal readonly DisplayLoginCallback DisplayLogin;
internal IntPtr DisplayLogin { get; set; }
internal readonly DisplayQuestionCallback DisplayQuestion;
internal IntPtr DisplayQuestion { get; set; }
internal readonly DisplayProgressCallback DisplayProgress;
internal IntPtr DisplayProgress { get; set; }
internal readonly CancelCallback Cancel;
internal IntPtr Cancel { get; set; }
internal readonly UpdateProgressCallback UpdateProgress;
internal IntPtr UpdateProgress { get; set; }
}
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ namespace LibVLCSharp.Shared
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((LibVLC) obj);
return Equals((LibVLC)obj);
}
#if NET || NETSTANDARD
IntPtr _logFileHandle;
......@@ -110,7 +110,7 @@ namespace LibVLCSharp.Shared
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_dialog_set_callbacks")]
internal static extern void LibVLCDialogSetCallbacks(IntPtr libVLC, IntPtr callbacks, IntPtr data);
internal static extern void LibVLCDialogSetCallbacks(IntPtr libVLC, DialogCallbacks callbacks, IntPtr data);
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_renderer_discoverer_list_get")]
......@@ -221,7 +221,7 @@ namespace LibVLCSharp.Shared
base.Dispose(disposing);
}
public static bool operator ==(LibVLC obj1, LibVLC obj2)
{
return obj1?.NativeReference == obj2?.NativeReference;
......@@ -310,7 +310,7 @@ namespace LibVLCSharp.Shared
{
Marshal.FreeHGlobal(_dialogCbsPtr);
_dialogCbsPtr = IntPtr.Zero;
Native.LibVLCDialogSetCallbacks(NativeReference, IntPtr.Zero, IntPtr.Zero);
//Native.LibVLCDialogSetCallbacks(NativeReference, IntPtr.Zero, IntPtr.Zero);
}
}
......@@ -363,7 +363,7 @@ namespace LibVLCSharp.Shared
public ModuleDescription[] AudioFilters => MarshalUtils.Retrieve(() => Native.LibVLCAudioFilterListGet(NativeReference),
MarshalUtils.PtrToStructure<ModuleDescriptionStructure>,
s => s.Build(),
module => module.Next,
module => module.Next,
Native.LibVLCModuleDescriptionListRelease);
/// <summary>Returns a list of video filters that are available.</summary>
......@@ -378,7 +378,7 @@ namespace LibVLCSharp.Shared
public ModuleDescription[] VideoFilters => MarshalUtils.Retrieve(() => Native.LibVLCVideoFilterListGet(NativeReference),
MarshalUtils.PtrToStructure<ModuleDescriptionStructure>,
s => s.Build(),
module => module.Next,
module => module.Next,
Native.LibVLCModuleDescriptionListRelease);
/// <summary>Gets the list of available audio output modules.</summary>
......@@ -388,10 +388,10 @@ namespace LibVLCSharp.Shared
/// <para>libvlc_audio_output_t .</para>
/// <para>In case of error, NULL is returned.</para>
/// </remarks>
public AudioOutputDescription[] AudioOutputs => MarshalUtils.Retrieve(() => Native.LibVLCAudioOutputListGet(NativeReference),
public AudioOutputDescription[] AudioOutputs => MarshalUtils.Retrieve(() => Native.LibVLCAudioOutputListGet(NativeReference),
ptr => MarshalUtils.PtrToStructure<AudioOutputDescriptionStructure>(ptr),
s => s.Build(),
s => s.Next,
s => s.Build(),
s => s.Next,
Native.LibVLCAudioOutputListRelease);
/// <summary>Gets a list of audio output devices for a given audio output module,</summary>
......@@ -414,30 +414,30 @@ namespace LibVLCSharp.Shared
/// <para>explicit audio device.</para>
/// <para>LibVLC 2.1.0 or later.</para>
/// </remarks>
public AudioOutputDevice[] AudioOutputDevices(string audioOutputName) =>
MarshalUtils.Retrieve(() =>
public AudioOutputDevice[] AudioOutputDevices(string audioOutputName) =>
MarshalUtils.Retrieve(() =>
{
var audioOutputNameUtf8 = audioOutputName.ToUtf8();
return MarshalUtils.PerformInteropAndFree(() =>
return MarshalUtils.PerformInteropAndFree(() =>
Native.LibVLCAudioOutputDeviceListGet(NativeReference, audioOutputNameUtf8), audioOutputNameUtf8);
},
},
MarshalUtils.PtrToStructure<AudioOutputDeviceStructure>,
s => s.Build(),
device => device.Next,
s => s.Build(),
device => device.Next,
Native.LibVLCAudioOutputDeviceListRelease);
/// <summary>Get media discoverer services by category</summary>
/// <param name="discovererCategory">category of services to fetch</param>
/// <returns>the number of media discoverer services (0 on error)</returns>
/// <remarks>LibVLC 3.0.0 and later.</remarks>
public MediaDiscovererDescription[] MediaDiscoverers(MediaDiscovererCategory discovererCategory) =>
MarshalUtils.Retrieve(NativeReference, discovererCategory,
MarshalUtils.Retrieve(NativeReference, discovererCategory,
(IntPtr nativeRef, MediaDiscovererCategory enumType, out IntPtr array) => Native.LibVLCMediaDiscovererListGet(nativeRef, enumType, out array),
MarshalUtils.PtrToStructure<MediaDiscovererDescriptionStructure>,
m => m.Build(),
Native.LibVLCMediaDiscovererListRelease);
readonly Dictionary<IntPtr, CancellationTokenSource> _cts = new Dictionary<IntPtr, CancellationTokenSource>();
static readonly Dictionary<IntPtr, CancellationTokenSource> _cts = new Dictionary<IntPtr, CancellationTokenSource>();
/// <summary>
/// Register callbacks in order to handle VLC dialogs.
......@@ -459,48 +459,98 @@ namespace LibVLCSharp.Shared
if (displayProgress == null) throw new ArgumentNullException(nameof(displayProgress));
if (updateProgress == null) throw new ArgumentNullException(nameof(updateProgress));
var dialogCbs = new DialogCallbacks(
displayError: (data, title, text) => error(title, text),
displayLogin: (data, id, title, text, username, store) =>
{
var cts = new CancellationTokenSource();
var dlg = new Dialog(new DialogId(id));
_cts[id] = cts;
login(dlg, title, text, username, store, cts.Token);
},
displayQuestion: (data, id, title, text, type, cancelText, firstActionText, secondActionText) =>
{
var cts = new CancellationTokenSource();
var dlg = new Dialog(new DialogId(id));
_cts[id] = cts;
question(dlg, title, text, type, cancelText, firstActionText, secondActionText, cts.Token);
},
displayProgress: (data, id, title, text, indeterminate, position, cancelText) =>
{
var cts = new CancellationTokenSource();
var dlg = new Dialog(new DialogId(id));
_cts[id] = cts;
displayProgress(dlg, title, text, indeterminate, position, cancelText, cts.Token);
},
cancel: (data, id) =>
{
if (_cts.TryGetValue(id, out var token))
{
token.Cancel();
_cts.Remove(id);
}
},
updateProgress: (data, id, position, text) =>
{
var dlg = new Dialog(new DialogId(id));
updateProgress(dlg, position, text);
});
_dialogCbsPtr = Marshal.AllocHGlobal(MarshalUtils.SizeOf(dialogCbs));
Marshal.StructureToPtr(dialogCbs, _dialogCbsPtr, true);
Native.LibVLCDialogSetCallbacks(NativeReference, _dialogCbsPtr, IntPtr.Zero);
_login = login;
//var dialogCbs = new DialogCallbacks(
// displayError: (data, title, text) => error(title, text),
// displayLogin: Login,
// //displayLogin: (data, id, title, text, username, store) =>
// //{
// // var cts = new CancellationTokenSource();
// // var dlg = new Dialog(new DialogId(id));
// // _cts[id] = cts;
// // login(dlg, title, text, username, store, cts.Token);
// //},
// displayQuestion: (data, id, title, text, type, cancelText, firstActionText, secondActionText) =>
// {
// var cts = new CancellationTokenSource();
// var dlg = new Dialog(new DialogId(id));
// _cts[id] = cts;
// question(dlg, title, text, type, cancelText, firstActionText, secondActionText, cts.Token);
// },
// displayProgress: (data, id, title, text, indeterminate, position, cancelText) =>
// {
// var cts = new CancellationTokenSource();
// var dlg = new Dialog(new DialogId(id));
// _cts[id] = cts;
// displayProgress(dlg, title, text, indeterminate, position, cancelText, cts.Token);
// },
// cancel: (data, id) =>
// {
// if (_cts.TryGetValue(id, out var token))
// {
// token.Cancel();
// _cts.Remove(id);
// }
// },
// updateProgress: (data, id, position, text) =>
// {
// var dlg = new Dialog(new DialogId(id));
// updateProgress(dlg, position, text);
// });
var dialogCbs = new DialogCallbacks(Error, Login, Question, Progress, Cancel, UpdateProgress);
//_dialogCbsPtr = Marshal.AllocHGlobal(MarshalUtils.SizeOf(dialogCbs));
//Marshal.StructureToPtr(dialogCbs, _dialogCbsPtr, true);
Native.LibVLCDialogSetCallbacks(NativeReference, dialogCbs, IntPtr.Zero);
}
static DisplayLogin _login;
[MonoPInvokeCallback(typeof(DisplayLoginCallback))]
static void Login(IntPtr data, IntPtr dialogId, string title, string text, string defaultUsername, bool askStore)
{
if (_login == null) return;
var cts = new CancellationTokenSource();
var dlg = new Dialog(new DialogId(dialogId));
_cts[dialogId] = cts;
_login(dlg, title, text, defaultUsername, askStore, cts.Token);
}
[MonoPInvokeCallback(typeof(DisplayErrorCallback))]
static void Error(IntPtr data, string title, string text)
{
}
[MonoPInvokeCallback(typeof(DisplayQuestionCallback))]
static void Question(IntPtr data, IntPtr dialogId, string title, string text,
DialogQuestionType type, string cancelText, string firstActionText, string secondActionText)
{
}
[MonoPInvokeCallback(typeof(DisplayProgressCallback))]
static void Progress(IntPtr data, IntPtr dialogId, string title, string text, bool indeterminate, float position, string cancelText)
{
}
[MonoPInvokeCallback(typeof(CancelCallback))]
static void Cancel(IntPtr data, IntPtr dialogId)
{
}
[MonoPInvokeCallback(typeof(UpdateProgressCallback))]
static void UpdateProgress(IntPtr data, IntPtr dialogId, float position, string text)
{
}
/// <summary>
/// True if dialog handlers are set
/// </summary>
......
LibVLCSharp version 3.0.2
=========================
* Improve nuget docs
* Fix iOS linker issue https://code.videolan.org/videolan/LibVLCSharp/issues/163
LibVLCSharp version 3.0.1
=========================
* Add libvlc/libvlcsharp version check
* Add Xamarin.Forms 4.0 support for LibVLCSharp.Forms
LibVLCSharp version 3.0.0
=========================
* First stable release: https://mfkl.github.io/libvlc/crossplatform/xamarin/forms/release/2019/05/13/LibVLCSharp-goes-stable.html
* VS2019 support
LibVLCSharp version 0.8.1
=========================
* Fix ARM debug support for UWP.
......
......@@ -98,16 +98,17 @@ LibVLC is the actual VLC engine written mostly in C/C++ and compiled for your ta
| Xamarin.Mac | [LibVLCSharp](LibVLCSharp/README.md) | [![LibVLCSharpBadge]][LibVLCSharp] |
| UWP | [LibVLCSharp](LibVLCSharp/README.md) | [![LibVLCSharpBadge]][LibVLCSharp] |
| Xamarin.Forms | [LibVLCSharp.Forms](LibVLCSharp.Forms/README.md)| [![LibVLCSharpFormsBadge]][LibVLCSharpForms] |
| WPF | LibVLCSharp.WPF | [![LibVLCSharpWPFBadge]][LibVLCSharpWPF] |
| Xamarin.Forms.WPF | [LibVLCSharp.Forms.WPF][RLibVLCSharpFormsWPF] | [![LibVLCSharpFormsWPFBadge]][LibVLCSharpFormsWPF]|
| WPF | [LibVLCSharp.WPF](LibVLCSharp.WPF/README.md) | [![LibVLCSharpWPFBadge]][LibVLCSharpWPF] |
| Xamarin.Forms.WPF | [LibVLCSharp.Forms.WPF][RLibVLCSharpFormsWPF] | [![LibVLCSharpFormsWPFBadge]][LibVLCSharpFormsWPF]|
| GTK | [LibVLCSharp.GTK](LibVLCSharp.GTK/README.md) | [![LibVLCSharpGTKBadge]][LibVLCSharpGTK] |
| Xamarin.Forms.GTK | [LibVLCSharp.Forms.GTK][RLibVLCSharpFormsGTK] | [![LibVLCSharpFormsGTKBadge]][LibVLCSharpFormsGTK]|
| Windows Forms | LibVLCSharp.WinForms | [![LibVLCSharpWinFormsBadge]][LibVLCSharpWinForms]|
| Xamarin.Forms.GTK | [LibVLCSharp.Forms.GTK][RLibVLCSharpFormsGTK] | [![LibVLCSharpFormsGTKBadge]][LibVLCSharpFormsGTK]|
| Windows Forms | [LibVLCSharp.WinForms][RLibVLCSharpWinForms] | [![LibVLCSharpWinFormsBadge]][LibVLCSharpWinForms]|
LibVLCSharp is the .NET wrapper that consumes `LibVLC` and allows you to interact with native code from C#/F#.
[RLibVLCSharpFormsWPF]: LibVLCSharp.Forms.Platforms.WPF/README.md
[RLibVLCSharpFormsGTK]: LibVLCSharp.Forms.Platforms.GTK/README.md
[RLibVLCSharpWinForms]: LibVLCSharp.WinForms/README.md
[LibVLCWindowsBadge]: https://img.shields.io/nuget/v/VideoLAN.LibVLC.Windows.svg
[LibVLCWindows]: https://www.nuget.org/packages/VideoLAN.LibVLC.Windows/
......
......@@ -25,6 +25,7 @@ namespace LibVLCSharp.Forms.Sample.Mac
public override void DidFinishLaunching(NSNotification notification)
{
Shared.LibVLCSharpFormsRenderer.Init();
Xamarin.Forms.Forms.Init();
LoadApplication(new App());
base.DidFinishLaunching(notification);
......
......@@ -124,8 +124,8 @@
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\Xamarin.Forms.3.2.0.871581\build\netstandard2.0\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Xamarin.Forms.3.2.0.871581\build\netstandard2.0\Xamarin.Forms.props'))" />
<Error Condition="!Exists('..\..\..\packages\Xamarin.Forms.3.2.0.871581\build\netstandard2.0\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Xamarin.Forms.3.2.0.871581\build\netstandard2.0\Xamarin.Forms.targets'))" />
<Error Condition="!Exists('..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.2\build\VideoLAN.LibVLC.Mac.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.2\build\VideoLAN.LibVLC.Mac.targets'))" />
<Error Condition="!Exists('..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets'))" />
</Target>
<Import Project="..\..\..\packages\Xamarin.Forms.3.2.0.871581\build\netstandard2.0\Xamarin.Forms.targets" Condition="Exists('..\..\..\packages\Xamarin.Forms.3.2.0.871581\build\netstandard2.0\Xamarin.Forms.targets')" />
<Import Project="..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.2\build\VideoLAN.LibVLC.Mac.targets" Condition="Exists('..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.2\build\VideoLAN.LibVLC.Mac.targets')" />
<Import Project="..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets" Condition="Exists('..\..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets')" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VideoLAN.LibVLC.Mac" version="3.1.2" targetFramework="xamarinmac20" />
<package id="VideoLAN.LibVLC.Mac" version="3.1.3" targetFramework="xamarinmac20" />
<package id="Xamarin.Forms" version="3.2.0.871581" targetFramework="xamarinmac20" />
</packages>
\ No newline at end of file
......@@ -50,6 +50,7 @@
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
......@@ -120,7 +121,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="VideoLAN.LibVLC.iOS">
<Version>3.0.0-alpha2</Version>
<Version>3.1.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="3.2.0.871581" />
</ItemGroup>
......
......@@ -35,15 +35,30 @@ namespace LibVLCSharp.Forms.Sample
}
}
const string UrlRequireAuth = "http://httpbin.org/basic-auth/user/passwd";
const string Username = "username";
const string Password = "password";
private void Initialize()
{
Core.Initialize();
LibVLC = new LibVLC();
LibVLC.SetDialogHandlers((title, text) => Task.CompletedTask,
(dialog, title, text, username, store, token) =>
{
// show UI dialog
// On "OK" call PostLogin
dialog.PostLogin(Username, Password, false);
return Task.CompletedTask;
},
(dialog, title, text, type, cancelText, actionText, secondActionText, token) => Task.CompletedTask,
(dialog, title, text, indeterminate, position, cancelText, token) => Task.CompletedTask,
(dialog, position, text) => Task.CompletedTask);
MediaPlayer = new MediaPlayer(LibVLC)
{
Media = new Media(LibVLC,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4",
UrlRequireAuth,
FromType.FromLocation)
};
}
......
......@@ -33,7 +33,7 @@ namespace LibVLCSharp.Android.Sample
_videoView = new VideoView(this) { MediaPlayer = _mediaPlayer };
AddContentView(_videoView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent));
var media = new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation);
var media = new Media(_libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation);
var configuration = new MediaConfiguration();
configuration.EnableHardwareDecoding();
media.AddOption(configuration);
......
......@@ -7,6 +7,6 @@ let main argv =
Core.Initialize()
let libVLC = new LibVLC()
let mp = new MediaPlayer(libVLC)
mp.Play(new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation)) |> ignore
mp.Play(new Media(libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation)) |> ignore
let result = Console.ReadKey()
0
\ No newline at end of file
......@@ -28,7 +28,7 @@ namespace LibVLCSharp.GTK.Sample
//Starts playing
using (var media = new Media(libvlc,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4",
"https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4",
FromType.FromLocation))
{
mediaPlayer.Play(media);
......
......@@ -99,5 +99,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<Import Project="..\..\packages\VideoLAN.LibVLC.Mac.3.1.2\build\VideoLAN.LibVLC.Mac.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.Mac.3.1.2\build\VideoLAN.LibVLC.Mac.targets')" />
<Import Project="..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.Mac.3.1.3\build\VideoLAN.LibVLC.Mac.targets'))" />
</Target>
</Project>
\ No newline at end of file
......@@ -31,7 +31,7 @@ namespace LibVLCSharp.Mac.Sample
View = _videoView;
_videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
_videoView.MediaPlayer.Play(new Media(_libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation));
}
public override NSObject RepresentedObject
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VideoLAN.LibVLC.Mac" version="3.1.2" targetFramework="xamarinmac20" />
<package id="VideoLAN.LibVLC.Mac" version="3.1.3" targetFramework="xamarinmac20" />
</packages>
\ No newline at end of file
......@@ -7,8 +7,8 @@
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.4" />
<PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.1.2" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.6" />
<PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.1.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\LibVLCSharp\LibVLCSharp.csproj" />
......
......@@ -11,7 +11,7 @@ namespace LibVLCSharp.NetCore.Sample
using(var libVLC = new LibVLC())
{
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation);
var media = new Media(libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation);
using(var mp = new MediaPlayer(media))
{
media.Dispose();
......
......@@ -20,7 +20,7 @@ namespace LibVLCSharp.UWP.Sample
_libVLC = new LibVLC(VideoView.SwapChainOptions);
_mediaPlayer = new MediaPlayer(_libVLC);
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, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation));
};
Unloaded += (s, e) =>
......
......@@ -44,7 +44,7 @@ namespace LibVLCSharp.WPF.Sample
if (!parent.VideoView.MediaPlayer.IsPlaying)
{
parent.VideoView.MediaPlayer.Play(new Media(_libVLC,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
"https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation));
}
}
}
......
......@@ -45,7 +45,7 @@ namespace LibVLCSharp.WPF.Sample
if (!VideoView.MediaPlayer.IsPlaying)
{
VideoView.MediaPlayer.Play(new Media(_libVLC,
"http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
"https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation));
}
}
}
......
......@@ -25,7 +25,7 @@ namespace LibVLCSharp.WinForms.Sample
private void Form1_Load(object sender, EventArgs e)
{
_mp.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
_mp.Play(new Media(_libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation));
}
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ namespace LibVLCSharp.Windows.Net40.Sample
Core.Initialize();
var libVLC = new LibVLC();
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation);
var media = new Media(libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation);
var mp = new MediaPlayer(media);
mp.Play();
Console.ReadKey();
......
......@@ -83,5 +83,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\packages\VideoLAN.LibVLC.iOS.3.1.5-alpha\build\VideoLAN.LibVLC.iOS.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.iOS.3.1.5-alpha\build\VideoLAN.LibVLC.iOS.targets')" />
<Import Project="..\..\packages\VideoLAN.LibVLC.iOS.3.3.1\build\VideoLAN.LibVLC.iOS.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.iOS.3.3.1\build\VideoLAN.LibVLC.iOS.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.iOS.3.3.1\build\VideoLAN.LibVLC.iOS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.iOS.3.3.1\build\VideoLAN.LibVLC.iOS.targets'))" />
</Target>
</Project>
\ No newline at end of file
......@@ -22,7 +22,7 @@ namespace LibVLCSharp.iOS.Sample
View = _videoView;
_videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
_videoView.MediaPlayer.Play(new Media(_libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation));
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VideoLAN.LibVLC.iOS" version="3.1.5-alpha" targetFramework="xamarinios10" />
<package id="VideoLAN.LibVLC.iOS" version="3.3.1" targetFramework="xamarinios10" />
</packages>
\ No newline at end of file
......@@ -177,11 +177,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\TVOS\Xamarin.TVOS.CSharp.targets" />
<Import Project="..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0-alpha1\build\VideoLAN.LibVLC.tvOS.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0-alpha1\build\VideoLAN.LibVLC.tvOS.targets')" />
<Import Project="..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0\build\VideoLAN.LibVLC.tvOS.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0\build\VideoLAN.LibVLC.tvOS.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0-alpha1\build\VideoLAN.LibVLC.tvOS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0-alpha1\build\VideoLAN.LibVLC.tvOS.targets'))" />
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0\build\VideoLAN.LibVLC.tvOS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.tvOS.3.2.0\build\VideoLAN.LibVLC.tvOS.targets'))" />
</Target>
</Project>
\ No newline at end of file
......@@ -22,7 +22,7 @@ namespace LibVLCSharp.tvOS.Sample
View = _videoView;
_videoView.MediaPlayer.Play(new Media(_libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", FromType.FromLocation));
_videoView.MediaPlayer.Play(new Media(_libVLC, "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", FromType.FromLocation));
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VideoLAN.LibVLC.tvOS" version="3.2.0-alpha1" targetFramework="xamarintvos10" />
<package id="VideoLAN.LibVLC.tvOS" version="3.2.0" targetFramework="xamarintvos10" />
</packages>
\ No newline at end of file
trigger:
- master
- 3.x
pr:
- master
- 3.x
jobs:
- job: Linux
......
......@@ -7,7 +7,7 @@ steps:
- bash: |
#!/bin/bash
set -ex
MONO_MACOS_PKG_DOWNLOAD_URL='https://download.mono-project.com/archive/6.0.0/macos-10-universal/MonoFramework-MDK-6.0.0.macos10.xamarin.universal.pkg'
MONO_MACOS_PKG_DOWNLOAD_URL='https://download.mono-project.com/archive/mdk-latest-vs.pkg'
mkdir -p /tmp/mono-install
cd /tmp/mono-install
mono --version
......