Commit 05debdd8 authored by Jérémy VIGNELLES's avatar Jérémy VIGNELLES

Improvements of the windows samples:

- Renamed the Sample folder
- Proper usage of IDisposables in the Windows Samples
- Fixed namespace of the App class in the WPF sample
- Updated LibVlc.Windows to 3.0.4
parent 10d1c416
......@@ -10,7 +10,7 @@
<PackageReference Include="Moq" Version="4.7.142" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.0-alpha3" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LibVLCSharp\LibVLCSharp.csproj" />
......
......@@ -34,7 +34,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibVLCSharp.Mac.Sample", "S
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibVLCSharp.WPF.Sample", "Samples\LibVLCSharp.WPF.Sample\LibVLCSharp.WPF.Sample.csproj", "{01CCB934-B77F-4681-86C5-AE4FEE648238}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibVLCSharp.Windows.Sample", "Samples\Sample\LibVLCSharp.Windows.Sample.csproj", "{E9858A83-E619-4515-AF14-A87A4C658924}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibVLCSharp.Windows.Sample", "Samples\LibVLCSharp.Windows.Sample\LibVLCSharp.Windows.Sample.csproj", "{E9858A83-E619-4515-AF14-A87A4C658924}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibVLCSharp.Windows.Net40.Sample", "Samples\LibVLCSharp.Windows.Net40.Sample\LibVLCSharp.Windows.Net40.Sample.csproj", "{DAFCBC34-7847-4EF9-ACC0-E025D6E3FBA4}"
EndProject
......
......@@ -144,11 +144,11 @@
<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.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets'))" />
<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.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets'))" />
</Target>
<Import Project="..\..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets')" />
<Import Project="..\..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets')" />
<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.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets')" />
</Project>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<packages>
<package id="OpenTK" version="2.0.0" targetFramework="net47" />
<package id="OpenTK.GLControl" version="1.1.2349.61993" targetFramework="net47" />
<package id="VideoLAN.LibVLC.Windows" version="3.0.0-alpha3" targetFramework="net461" />
<package id="VideoLAN.LibVLC.Windows" version="3.0.4" targetFramework="net47" />
<package id="WpfLightToolkit" version="1.0.1" targetFramework="net47" />
<package id="Xamarin.Forms" version="3.2.0.871581" targetFramework="net461" />
<package id="Xamarin.Forms.Platform.WPF" version="3.2.0.871581" targetFramework="net461" />
......
......@@ -11,7 +11,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.0-alpha3" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.4" />
</ItemGroup>
<ItemGroup>
......
using System.Windows;
using LibVLCSharp.Shared;
namespace LibVlcSharp.Wpf.Sample
namespace LibVLCSharp.WPF.Sample
{
public class App : Application
public partial class App : Application
{
public App()
{
Core.Initialize();
}
}
}
\ No newline at end of file
......@@ -124,10 +124,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets')" />
<Import Project="..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets'))" />
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets'))" />
</Target>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VideoLAN.LibVLC.Windows" version="3.0.0-alpha3" targetFramework="net461" />
<package id="VideoLAN.LibVLC.Windows" version="3.0.4" targetFramework="net461" />
</packages>
\ No newline at end of file
......@@ -56,11 +56,11 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\VideoLAN.LibVLC.Windows.3.0.0\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.0\build\VideoLAN.LibVLC.Windows.targets')" />
<Import Project="..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.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>
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.0\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.Windows.3.0.0\build\VideoLAN.LibVLC.Windows.targets'))" />
<Error Condition="!Exists('..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\VideoLAN.LibVLC.Windows.3.0.4\build\VideoLAN.LibVLC.Windows.targets'))" />
</Target>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="VideoLAN.LibVLC.Windows" version="3.0.0" targetFramework="net40" />
<package id="VideoLAN.LibVLC.Windows" version="3.0.4" targetFramework="net40" />
</packages>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.0-alpha3" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\LibVLCSharp\LibVLCSharp.csproj" />
......
using System;
using LibVLCSharp.Shared;
namespace LibVLCSharp.Windows.Sample
{
class Program
{
static void Main(string[] args)
{
Core.Initialize();
using(var libVLC = new LibVLC())
{
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
using(var mp = new MediaPlayer(media))
{
media.Dispose();
mp.Play();
Console.ReadKey();
}
}
}
}
}
\ No newline at end of file
using System;
using LibVLCSharp.Shared;
namespace Sample
{
class Program
{
static void Main(string[] args)
{
Core.Initialize();
var libVLC = new LibVLC();
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
var mp = new MediaPlayer(media);
mp.Play();
Console.ReadKey();
}
}
}
\ No newline at end of file
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