...
 
Commits (18)

using Autofac;
using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using VLC.Controls;
using VLC.Helpers;
......@@ -19,13 +17,11 @@ using Windows.ApplicationModel.DataTransfer;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Foundation.Metadata;
using Windows.Gaming.Input;
using Windows.Storage;
using Windows.Storage.AccessCache;
using Windows.Storage.Pickers;
using Windows.UI;
using Windows.UI.Core;
using Windows.UI.Notifications;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
......@@ -43,7 +39,7 @@ namespace VLC
public static OpenFilePickerReason OpenFilePickerReason = OpenFilePickerReason.Null;
public static Model.Music.AlbumItem SelectedAlbumItem;
public static IContainer Container;
public App()
{
InitializeComponent();
......@@ -157,6 +153,7 @@ namespace VLC
{
SuspendingDeferral deferral = e.SuspendingOperation.GetDeferral();
Locator.PlaybackService?.Trim();
Task.Run(() => Locator.RendererService.Stop());
deferral.Complete();
}
......@@ -319,9 +316,11 @@ namespace VLC
ToggleMediaCenterMode();
Locator.ExternalDeviceService.StartWatcher();
if (DeviceHelper.GetDeviceType() == DeviceTypeEnum.Xbox)
await Locator.HttpServer.Bind(8080).ConfigureAwait(false);
else
Locator.RendererService.Start();
}
public static void ReloadApplicationPage()
......
using VLC.Model.Video;
using VLC.Utils;
using VLC.ViewModels;
namespace VLC.Commands.VideoLibrary
{
public class RestartAndPlayCommand : AlwaysExecutableCommand
{
public override void Execute(object parameter)
{
if(parameter is VideoItem video)
video.TimeWatchedSeconds = 0;
Locator.VideoLibraryVM.OpenVideo.Execute(parameter);
}
}
}
\ No newline at end of file
......@@ -18,7 +18,7 @@ namespace VLC.Commands.VideoPlayer
{
public override async void Execute(object parameter)
{
await Locator.MediaPlaybackViewModel.UpdatePosition();
Locator.MediaPlaybackViewModel.UpdatePosition();
Locator.MediaPlaybackViewModel.PlaybackService.Stop();
}
......
......@@ -199,6 +199,8 @@ namespace VLC.Services.RunTime
(x.MainKey == _virtualKeys[0] || x.KeyCode == (int)_virtualKeys[0]) &&
(x.SecondKey == _virtualKeys[1] || x.KeyCode == (int)_virtualKeys[1]));
if (_virtualKeys.All(key => key == VirtualKey.None)) return;
if (action != null)
{
// if there's a match, get the ActionId
......@@ -232,6 +234,7 @@ namespace VLC.Services.RunTime
Locator.MediaPlaybackViewModel.PlayOrPauseCommand.Execute(null);
break;
case VirtualKey.GamepadLeftShoulder:
case VirtualKey.Left:
Locator.VideoPlayerVm.RequestChangeControlBarVisibility(true);
Locator.MediaPlaybackViewModel.FastSeekCommand.Execute(-5000);
break;
......@@ -240,6 +243,7 @@ namespace VLC.Services.RunTime
Locator.MediaPlaybackViewModel.FastSeekCommand.Execute(-30000);
break;
case VirtualKey.GamepadRightShoulder:
case VirtualKey.Right:
Locator.VideoPlayerVm.RequestChangeControlBarVisibility(true);
Locator.MediaPlaybackViewModel.FastSeekCommand.Execute(5000);
break;
......
......@@ -7,12 +7,9 @@
* Refer to COPYING file of the official project for license
**********************************************************************/
using Windows.UI.Core;
using System;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using SQLite;
using VLC.Commands.MusicPlayer;
using VLC.Model.Music;
using System.Collections.Generic;
using System.Linq;
......@@ -20,14 +17,9 @@ using VLC.Helpers;
using VLC.Model;
using VLC.Model.Video;
using VLC.Utils;
using System.Diagnostics;
using VLC.Services.RunTime;
using VLC.Model.Stream;
using Windows.Storage;
using System.IO;
using libVLCX;
using VLC.ViewModels;
using VLC.Database;
using Windows.Media.Devices;
namespace VLC.Services.RunTime
......@@ -155,6 +147,7 @@ namespace VLC.Services.RunTime
private PlayingType _playingType;
public PlayingType PlayingType
{
get { return _playingType; }
......@@ -210,6 +203,7 @@ namespace VLC.Services.RunTime
Task.Run(() => _playlistService.Restore());
}
#endif
private async void onCurrentMediaChanged(IMediaItem media, bool isRewind)
{
await SetMedia(media);
......@@ -269,28 +263,10 @@ namespace VLC.Services.RunTime
#region Playback methods
private async Task<float> FetchPreviousPosition(IMediaItem media)
float FetchPreviousPosition(IMediaItem media)
{
var video = media as VideoItem;
if (video == null)
if (!(media is VideoItem video))
return 0;
var roamFile = await ApplicationData.Current.RoamingFolder.TryGetItemAsync("roamVideo.txt");
if (roamFile != null)
{
var roamVideos = await FileIO.ReadLinesAsync(roamFile as StorageFile);
if (roamVideos.Any())
{
if (roamVideos[0] == media.Name)
{
int leftTime = 0;
if (int.TryParse(roamVideos[1], out leftTime))
{
video.TimeWatchedSeconds = leftTime;
}
}
}
}
TileHelper.UpdateVideoTile();
// VLC expects a start-time in seconds
......@@ -356,30 +332,14 @@ namespace VLC.Services.RunTime
CurrentMedia.addOption(!Locator.SettingsVM.HardwareAccelerationEnabled ? ":avcodec-hw=none" : ":avcodec-hw=d3d11va");
if (DeviceHelper.GetDeviceType() == DeviceTypeEnum.Phone)
CurrentMedia.addOption(!Locator.SettingsVM.HardwareAccelerationEnabled ? ":avcodec-threads=0" : ":avcodec-threads=1");
if (Locator.SettingsVM.ResumePreviousPosition)
{
var pos = await FetchPreviousPosition(media);
CurrentMedia.addOption($":start-time={pos}");
}
var pos = FetchPreviousPosition(media);
CurrentMedia.addOption($":start-time={pos}");
if (_mediaPlayer == null)
{
_mediaPlayer = new MediaPlayer(CurrentMedia);
var em = _mediaPlayer.eventManager();
em.OnBuffering += Playback_MediaBuffering;
em.OnStopped += OnStopped;
em.OnPlaying += OnPlaying;
em.OnPaused += OnPaused;
em.OnTimeChanged += Playback_MediaTimeChanged;
em.OnEndReached += OnEndReached;
em.OnEncounteredError += Playback_MediaFailed;
em.OnLengthChanged += Playback_MediaLengthChanged;
em.OnTrackAdded += OnTrackAdded;
em.OnTrackDeleted += OnTrackDeleted;
em.OnPlaying += Playback_MediaPlaying;
em.OnPaused += Playback_MediaPaused;
em.OnOpening += Playback_Opening;
InitializeMediaPlayer();
}
else
_mediaPlayer.setMedia(CurrentMedia);
......@@ -387,6 +347,27 @@ namespace VLC.Services.RunTime
SetEqualizer(Locator.SettingsVM.Equalizer);
}
void InitializeMediaPlayer()
{
_mediaPlayer = CurrentMedia != null ? new MediaPlayer(CurrentMedia) : new MediaPlayer(Instance);
var em = _mediaPlayer.eventManager();
em.OnBuffering += Playback_MediaBuffering;
em.OnStopped += OnStopped;
em.OnPlaying += OnPlaying;
em.OnPaused += OnPaused;
em.OnTimeChanged += Playback_MediaTimeChanged;
em.OnEndReached += OnEndReached;
em.OnEncounteredError += Playback_MediaFailed;
em.OnLengthChanged += Playback_MediaLengthChanged;
em.OnTrackAdded += OnTrackAdded;
em.OnTrackDeleted += OnTrackDeleted;
em.OnPlaying += Playback_MediaPlaying;
em.OnPaused += Playback_MediaPaused;
em.OnOpening += Playback_Opening;
}
/// <summary>
/// Only this method should set the CurrentMedia property of TrackCollection.
/// </summary>
......@@ -670,6 +651,21 @@ namespace VLC.Services.RunTime
_mediaPlayer.updateViewpoint(viewpoint, absolute);
}
public void SetRenderer(string rendererItemName)
{
var rendererItem = Locator.RendererService.RendererItems.FirstOrDefault(ri => ri.name().Equals(rendererItemName));
if (rendererItem == null) return;
if (_mediaPlayer == null)
InitializeMediaPlayer();
_mediaPlayer.setRenderer(rendererItem);
}
public void DisconnectRenderer()
{
_mediaPlayer?.unsetRenderer();
}
#endregion
#region Playback events callbacks
......
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Autofac;
using libVLCX;
using VLC.Commands;
using VLC.Helpers;
using VLC.Model.Events;
using VLC.Utils;
using VLC.ViewModels;
namespace VLC.Services.RunTime
{
public class RendererService : BindableBase
{
public ObservableCollection<RendererItem> RendererItems { get; } = new ObservableCollection<RendererItem>();
RendererDiscoverer _rendererDiscoverer;
public bool IsStarted;
public bool IsRendererSet { get; set; }
readonly PlaybackService _playbackService = Locator.PlaybackService;
public RendererService()
{
App.Container.Resolve<NetworkListenerService>().InternetConnectionChanged += OnInternetConnectionChanged;
}
async void OnInternetConnectionChanged(object sender, InternetConnectionChangedEventArgs internetConnectionChangedEventArgs)
{
if (!internetConnectionChangedEventArgs.IsConnected && IsStarted)
await Stop();
else if(internetConnectionChangedEventArgs.IsConnected && !IsStarted)
Start();
}
readonly MenuFlyoutItem _disconnect = new MenuFlyoutItem
{
Text = Strings.Disconnect,
Command = new ActionCommand(() => Locator.RendererService.DisconnectRenderer())
};
public void Start()
{
if (IsStarted || !NetworkListenerService.IsConnected) return;
IsStarted = true;
IsRendererSet = false;
Task.Run(async () =>
{
await Locator.PlaybackService.Initialize();
if(_rendererDiscoverer == null)
{
_rendererDiscoverer = new RendererDiscoverer(Locator.PlaybackService.Instance,
Locator.PlaybackService.Instance.rendererDiscoverers().First().name());
}
_rendererDiscoverer.eventManager().OnItemAdded += OnOnItemAdded;
_rendererDiscoverer.eventManager().OnRendererItemDeleted += OnOnRendererItemDeleted;
_rendererDiscoverer.start();
});
}
public async Task Stop()
{
if (!IsStarted) return;
IsStarted = false;
DisconnectRenderer();
_rendererDiscoverer.stop();
_rendererDiscoverer.eventManager().OnItemAdded -= OnOnItemAdded;
_rendererDiscoverer.eventManager().OnRendererItemDeleted -= OnOnRendererItemDeleted;
_rendererDiscoverer = null;
RendererItems.Clear();
await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, () => OnPropertyChanged(nameof(HasRenderer)));
}
async void OnOnRendererItemDeleted(RendererItem rendererItem)
{
var match = RendererItems.FirstOrDefault(item => item.name().Equals(rendererItem.name()));
if (match != null)
RendererItems.Remove(match);
if (IsRendererSet && !RendererItems.Any())
DisconnectRenderer();
await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, () => OnPropertyChanged(nameof(HasRenderer)));
}
async void OnOnItemAdded(RendererItem rendererItem)
{
LogHelper.Log("Found new rendererItem " + rendererItem.name() +
" can render audio " + rendererItem.canRenderAudio() +
" can render video " + rendererItem.canRenderVideo());
RendererItems.Add(rendererItem);
await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, () => OnPropertyChanged(nameof(HasRenderer)));
}
public Visibility HasRenderer => DeviceHelper.GetDeviceType() != DeviceTypeEnum.Xbox && RendererItems.Any()
? Visibility.Visible : Visibility.Collapsed;
public MenuFlyout CreateRendererFlyout()
{
var flyout = new MenuFlyout();
foreach (var ri in RendererItems)
{
flyout.Items.Add(new MenuFlyoutItem
{
Text = ri.name(),
Command = new ActionCommand(() =>
{
Locator.PlaybackService.SetRenderer(ri.name());
Locator.RendererService.IsRendererSet = true;
})
});
}
flyout.Items.Add(_disconnect);
return flyout;
}
public void DisconnectRenderer()
{
_playbackService.DisconnectRenderer();
IsRendererSet = false;
}
}
}
\ No newline at end of file
......@@ -68,6 +68,7 @@ namespace VLC.Utils
builder.RegisterType<HttpServer>().SingleInstance();
builder.RegisterType<FileCopyService>().SingleInstance();
builder.RegisterType<PlaylistService>().SingleInstance();
builder.RegisterType<RendererService>().SingleInstance();
return builder.Build();
}
......
......@@ -242,6 +242,7 @@ namespace VLC.Utils
public static string RemoveMusicFolderDescription => _resourcesLoader.GetString(nameof(RemoveMusicFolderDescription));
public static string AddFolder => _resourcesLoader.GetString(nameof(AddFolder));
public static string Connect => _resourcesLoader.GetString(nameof(Connect));
public static string Disconnect => _resourcesLoader.GetString(nameof(Disconnect));
public static string Reset => _resourcesLoader.GetString(nameof(Reset));
public static string ResetMusicDatabase => _resourcesLoader.GetString(nameof(ResetMusicDatabase));
public static string RefreshMusicLibrary => _resourcesLoader.GetString(nameof(RefreshMusicLibrary));
......@@ -287,7 +288,7 @@ namespace VLC.Utils
public static string NotificationWhenSongStarts => _resourcesLoader.GetString(nameof(NotificationWhenSongStarts));
public static string VideoPlaybackInBackground => _resourcesLoader.GetString(nameof(VideoPlaybackInBackground));
public static string CompactOverlayPiP => _resourcesLoader.GetString(nameof(CompactOverlayPiP));
public static string ResumeOrRestartPlayback => _resourcesLoader.GetString(nameof(ResumeOrRestartPlayback));
public static string Restart => _resourcesLoader.GetString(nameof(Restart));
public static string EvenIfBackground => _resourcesLoader.GetString(nameof(EvenIfBackground));
public static string EvenIfNotBackground => _resourcesLoader.GetString(nameof(EvenIfNotBackground));
public static string NeedRestart => _resourcesLoader.GetString(nameof(NeedRestart));
......
......@@ -72,6 +72,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Commands\VideoLibrary\CloseFlyoutAndPlayVideoCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\VideoLibrary\FavoriteVideoCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\VideoLibrary\PickMediaCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\VideoLibrary\RestartAndPlayCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\VideoLibrary\TVShowClickedCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\VideoPlayer\DownloadSubtitleCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\VideoPlayer\InitPiPCommand.cs" />
......@@ -201,6 +202,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Services\RunTime\NavigationService.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Services\RunTime\PlaybackService.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Services\RunTime\PlaylistService.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Services\RunTime\RendererService.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Services\RunTime\VideoMetaService.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Services\RunTime\MouseService.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Services\RunTime\MusicMetaService.cs" />
......
......@@ -55,6 +55,7 @@ namespace VLC.ViewModels
private static MetroSlideshow _metroSlideshow;
private static HttpServer _httpServer;
private static FileCopyService _fileCopyService;
static RendererService _rendererService;
public Locator()
{
......@@ -99,5 +100,6 @@ namespace VLC.ViewModels
public static MetroSlideshow Slideshow => _metroSlideshow ?? (_metroSlideshow = App.Container.Resolve<MetroSlideshow>());
public static HttpServer HttpServer => _httpServer ?? (_httpServer = App.Container.Resolve<HttpServer>());
public static FileCopyService FileCopyService => _fileCopyService ?? (_fileCopyService = App.Container.Resolve<FileCopyService>());
public static RendererService RendererService => _rendererService ?? (_rendererService = App.Container.Resolve<RendererService>());
}
}
\ No newline at end of file
......@@ -468,26 +468,12 @@ namespace VLC.ViewModels
await Locator.PlaybackService.SetPlaylist(new List<IMediaItem> { video });
}
public async Task UpdatePosition()
public void UpdatePosition()
{
if (Locator.VideoPlayerVm.CurrentVideo != null)
{
Locator.VideoPlayerVm.CurrentVideo.TimeWatchedSeconds = (int)((double)Time / 1000); ;
Locator.VideoPlayerVm.CurrentVideo.TimeWatchedSeconds = (int)((double)Time / 1000);
Locator.MediaLibrary.UpdateVideo(Locator.VideoPlayerVm.CurrentVideo);
try
{
var file = await ApplicationData.Current.RoamingFolder.CreateFileAsync("roamVideo.txt",
CreationCollisionOption.ReplaceExisting);
await FileIO.WriteLinesAsync(file, new[]
{
Locator.VideoPlayerVm.CurrentVideo.Name,
Locator.VideoPlayerVm.CurrentVideo.TimeWatchedSeconds.ToString()
});
}
catch (Exception e)
{
LogHelper.Log(e.Message);
}
}
}
......
......@@ -623,12 +623,6 @@ namespace VLC.ViewModels.Settings
public ChangeSettingsViewCommand ChangeSettingsViewCommand { get; } = new ChangeSettingsViewCommand();
public bool ResumePreviousPosition
{
get => ApplicationSettingsHelper.ReadSettingsValue(nameof(ResumePreviousPosition)) as bool? ?? true;
set => ApplicationSettingsHelper.SaveSettingsValue(nameof(ResumePreviousPosition), value);
}
public static void SwitchLanguage(Languages language)
{
var currentCulture = "en-US";
......
......@@ -100,7 +100,7 @@ namespace VLC.ViewModels.VideoVM
public static TVShowClickedCommand TVShowClickedCommand { get; private set; } = new TVShowClickedCommand();
public PlayVideoCommand OpenVideo { get; private set; } = new PlayVideoCommand();
public RestartAndPlayCommand RestartAndPlayCommand { get; } = new RestartAndPlayCommand();
public CloseFlyoutAndPlayVideoCommand CloseFlyoutAndPlayVideoCommand { get; private set; } = new CloseFlyoutAndPlayVideoCommand();
public DeleteFromLibraryCommand DeleteFromLibraryCommand { get; private set; } = new DeleteFromLibraryCommand();
public ChangeVideoViewCommand ChangeVideoViewCommand { get; private set; } = new ChangeVideoViewCommand();
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -1161,9 +1161,13 @@
<source>Czech</source>
<target state="new">Czech</target>
</trans-unit>
<trans-unit id="ResumeOrRestartPlayback" translate="yes" xml:space="preserve">
<source>Resume or restart playback</source>
<target state="new">Resume or restart playback</target>
<trans-unit id="Restart" translate="yes" xml:space="preserve">
<source>restart</source>
<target state="new">restart</target>
</trans-unit>
<trans-unit id="Disconnect" translate="yes" xml:space="preserve">
<source>disconnect</source>
<target state="new">disconnect</target>
</trans-unit>
</group>
</body>
......
......@@ -13,6 +13,7 @@
<Thickness x:Key="FrameMarginHorizontal">16,0</Thickness>
<Thickness x:Key="FrameMarginTop">0,16,0,0</Thickness>
<Thickness x:Key="FrameMarginBottom">0,0,0,16</Thickness>
<Thickness x:Key="FrameMarginBottomLeft">16,0,0,16</Thickness>
<Thickness x:Key="FrameMarginLeft">16,0,0,0</Thickness>
<Thickness x:Key="FrameMarginRight">0,0,16,0</Thickness>
<x:Double x:Key="FrameMarginSides">16</x:Double>
......
......@@ -762,7 +762,6 @@
<data name="PolishLanguage" xml:space="preserve">
<value>Polish</value>
</data>
<data name="DanishLanguage" xml:space="preserve">
<value>Danish</value>
</data>
......@@ -811,9 +810,6 @@
<data name="CompactOverlayPiP" xml:space="preserve">
<value>use windows 10 pip</value>
</data>
<data name="ResumeOrRestartPlayback" xml:space="preserve">
<value>Resume or restart playback</value>
</data>
<data name="TvUnsafeArea" xml:space="preserve">
<value>TV unsafe area</value>
</data>
......@@ -826,4 +822,10 @@
<data name="NoExtraMargin" xml:space="preserve">
<value>No extra margin</value>
</data>
<data name="Restart" xml:space="preserve">
<value>restart</value>
</data>
<data name="Disconnect" xml:space="preserve">
<value>disconnect</value>
</data>
</root>
\ No newline at end of file
......@@ -613,6 +613,9 @@
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\codec\libpng_plugin.dll">
<Link>plugins\codec\libpng_plugin.dll</Link>
</Content>
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\codec\libqsv_plugin.dll" Condition="$(Platform) != 'ARM'">
<Link>plugins\codec\libqsv_plugin.dll</Link>
</Content>
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\codec\librawvideo_plugin.dll">
<Link>plugins\codec\librawvideo_plugin.dll</Link>
</Content>
......@@ -703,6 +706,9 @@
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\demux\libdemux_cdg_plugin.dll">
<Link>plugins\demux\libdemux_cdg_plugin.dll</Link>
</Content>
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\demux\libdemux_chromecast_plugin.dll">
<Link>plugins\demux\libdemux_chromecast_plugin.dll</Link>
</Content>
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\demux\libdemux_stl_plugin.dll">
<Link>plugins\demux\libdemux_stl_plugin.dll</Link>
</Content>
......@@ -1207,7 +1213,6 @@
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\stream_out\libstream_out_gather_plugin.dll">
<Link>plugins\stream_out\libstream_out_gather_plugin.dll</Link>
</Content>
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\stream_out\libstream_out_mosaic_bridge_plugin.dll">
<Link>plugins\stream_out\libstream_out_mosaic_bridge_plugin.dll</Link>
</Content>
......@@ -1220,7 +1225,6 @@
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\stream_out\libstream_out_setid_plugin.dll">
<Link>plugins\stream_out\libstream_out_setid_plugin.dll</Link>
</Content>
<Content Include="..\..\libvlc\Universal\vlc-$(TargetedSDKArchitecture)\$(Configuration)\plugins\stream_out\libstream_out_smem_plugin.dll">
<Link>plugins\stream_out\libstream_out_smem_plugin.dll</Link>
</Content>
......
......@@ -98,6 +98,14 @@
<musicPanesControls:AlbumsCollectionButtons Grid.Column="2"
Visibility="{Binding AlbumsCollectionsButtonVisible}" />
<AppBarButton Grid.Column="3"
x:Name="Cast"
Visibility="{Binding Source={StaticResource Locator}, Path=RendererService.HasRenderer}">
<AppBarButton.Content>
<FontIcon Glyph="&#xEC15;"
FontFamily="Segoe MDL2 Assets" />
</AppBarButton.Content>
</AppBarButton>
<AppBarButton
Grid.Column="3"
Visibility="{Binding PlayArtistButtonVisible}"
......
......@@ -7,6 +7,7 @@
* Refer to COPYING file of the official project for license
**********************************************************************/
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
......@@ -34,6 +35,7 @@ namespace VLC.UI.Views.MainPages
Locator.MusicLibraryVM.PropertyChanged -= MusicLibraryVM_PropertyChanged;
await Locator.MusicLibraryVM.OnNavigatedFrom();
Cast.Click -= CastOnClick;
}
protected override void OnNavigatedTo(NavigationEventArgs e)
......@@ -41,6 +43,12 @@ namespace VLC.UI.Views.MainPages
base.OnNavigatedTo(e);
Locator.MusicLibraryVM.PropertyChanged += MusicLibraryVM_PropertyChanged;
Cast.Click += CastOnClick;
}
void CastOnClick(object sender, RoutedEventArgs routedEventArgs)
{
Cast.Flyout = Locator.RendererService.CreateRendererFlyout();
}
private async void MusicPanesFrame_OnLoaded(object sender, RoutedEventArgs e)
......
......@@ -90,6 +90,14 @@
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<AppBarButton Grid.Column="2"
x:Name="Cast"
Visibility="{Binding Source={StaticResource Locator}, Path=RendererService.HasRenderer}">
<AppBarButton.Content>
<FontIcon Glyph="&#xEC15;"
FontFamily="Segoe MDL2 Assets" />
</AppBarButton.Content>
</AppBarButton>
</Grid>
<ProgressRing Grid.Row="1"
IsActive="True"
......
......@@ -39,6 +39,7 @@ namespace VLC.UI.Views.MainPages
}
Locator.VideoLibraryVM.PropertyChanged += VideoLibraryVM_PropertyChanged;
Cast.Click += CastOnClick;
}
protected override void OnNavigatedFrom(NavigationEventArgs e)
......@@ -47,6 +48,12 @@ namespace VLC.UI.Views.MainPages
Locator.VideoLibraryVM.OnNavigatedFrom();
Locator.VideoLibraryVM.PropertyChanged -= VideoLibraryVM_PropertyChanged;
Cast.Click -= CastOnClick;
}
void CastOnClick(object sender, RoutedEventArgs routedEventArgs)
{
Cast.Flyout = Locator.RendererService.CreateRendererFlyout();
}
private void VideoLibraryVM_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
......
......@@ -113,5 +113,6 @@
FontFamily="{StaticResource VLCFont}" />
</AppBarButton.Content>
</AppBarButton>
</Grid>
</Page>
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Microsoft.Xaml.Interactivity;
using VLC.Helpers;
using VLC.ViewModels;
using Windows.UI.Xaml.Input;
......
......@@ -147,6 +147,7 @@
<ColumnDefinition Width="70" />
<ColumnDefinition Width="70" />
<ColumnDefinition Width="70" />
<ColumnDefinition Width="70" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<AppBarToggleButton Grid.Column="1"
......@@ -184,9 +185,19 @@
FontSize="20"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Grid.Column="4"
x:Name="Cast"
Style="{StaticResource AppBarButtonStyleHuge}"
IsCompact="True"
Visibility="{Binding Source={StaticResource Locator}, Path=RendererService.HasRenderer}">
<AppBarButton.Content>
<FontIcon Glyph="&#xEC15;"
FontSize="20"
FontFamily="Segoe MDL2 Assets" />
</AppBarButton.Content>
</AppBarButton>
</Grid>
<Grid Grid.Row="10"
HorizontalAlignment="Center"
MaxWidth="400">
......
using System;
using System.Collections.Specialized;
using System.ComponentModel;
using Windows.Devices.Input;
using Windows.UI;
......@@ -26,6 +27,11 @@ namespace VLC.UI.Views.MusicPages
_red = new SolidColorBrush(Colors.Red);
}
void CastOnClick(object sender, RoutedEventArgs routedEventArgs)
{
Cast.Flyout = Locator.RendererService.CreateRendererFlyout();
}
void MusicPlayerPage_Loaded(object sender, RoutedEventArgs e)
{
Responsive();
......@@ -35,6 +41,7 @@ namespace VLC.UI.Views.MusicPages
_viewModel.PropertyChanged += MediaPlaybackViewModelOnPropertyChanged;
if(DeviceHelper.GetDeviceType() == DeviceTypeEnum.Tablet)
PointerWheelChanged += OnPointerWheelChanged;
Cast.Click += CastOnClick;
}
void OnPointerWheelChanged(object sender, PointerRoutedEventArgs e)
......@@ -88,6 +95,7 @@ namespace VLC.UI.Views.MusicPages
_viewModel.PropertyChanged -= MediaPlaybackViewModelOnPropertyChanged;
if (DeviceHelper.GetDeviceType() == DeviceTypeEnum.Tablet)
PointerWheelChanged -= OnPointerWheelChanged;
Cast.Click -= CastOnClick;
}
void Responsive()
......
......@@ -259,19 +259,12 @@
<ToggleSwitch Tag="WindowsOnly"
Header="{Binding Source={StaticResource Strings}, Path=VideoPlaybackInBackground}"
IsOn="{Binding ContinueVideoPlaybackInBackground, Mode=TwoWay}" />
<ToggleSwitch Tag="WindowsOnly"
Name="compactOverlayToggle"
Header="{Binding Source={StaticResource Strings}, Path=CompactOverlayPiP}"
IsOn="{Binding CompactOverlayPiP, Mode=TwoWay}" />
<ToggleSwitch Name="ResumeOrRestartPlayback"
Header="{Binding Source={StaticResource Strings}, Path=ResumeOrRestartPlayback}"
OffContent="Restart"
OnContent="Resume"
IsOn="{Binding ResumePreviousPosition, Mode=TwoWay}"/>
<toolkitControls:HeaderedTextBlock Margin="{StaticResource FrameMarginTop}"
<toolkitControls:HeaderedTextBlock Margin="{StaticResource FrameMarginTop}"
Header="{Binding Source={StaticResource Strings}, Path=SubtitlesEncoding}"
Text="{Binding Source={StaticResource Strings}, Path=NeedRestart}"
IsTabStop="False" />
......
......@@ -74,6 +74,7 @@
FontFamily="{StaticResource VLCFont}" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="{Binding Source={StaticResource Strings}, Path=DeleteSelected}"
Command="{Binding Source={StaticResource Locator}, Path=VideoLibraryVM.DeleteFromLibraryCommand}"
CommandParameter="{Binding}"
......@@ -87,7 +88,21 @@
</AppBarButton.Icon>
</AppBarButton>
</Grid>
<TextBlock Grid.Row="2"
<AppBarButton Grid.Row="2"
Name="RestartPlayback"
Label="{Binding Source={StaticResource Strings}, Path=Restart}"
Click="ActionButton_Click"
Margin="{StaticResource FrameMarginBottomLeft}"
Command="{Binding Source={StaticResource Locator}, Path=VideoLibraryVM.RestartAndPlayCommand}"
CommandParameter="{Binding}"
Visibility="{Binding TimeWatchedSeconds, Converter={StaticResource NegatedCountToVisibilityConverter}}"
Style="{StaticResource AppBarButtonStyleHorizontal}">
<AppBarButton.Icon>
<FontIcon Glyph="&#xE777;"
FontFamily="Segoe MDL2 Assets" />
</AppBarButton.Icon>
</AppBarButton>
<TextBlock Grid.Row="3"
Margin="{StaticResource FrameMarginLeft}"
Style="{StaticResource BodyTextBlockStyle}">
<Run Text="{Binding Type}" />
......@@ -96,7 +111,7 @@
<Run Text="x" />
<Run Text="{Binding Height}" />
</TextBlock>
<TextBlock Grid.Row="3"
<TextBlock Grid.Row="4"
Text="{Binding Path}"
MaxLines="2"
Margin="{StaticResource FrameMarginBothSides}"
......
......@@ -292,6 +292,18 @@
<StackPanel Grid.Column="2"
Orientation="Horizontal"
HorizontalAlignment="Right">
<AppBarButton x:Name="CastButton"
IsCompact="True"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Style="{StaticResource AppBarButtonStyleHuge}"
Margin="{StaticResource FrameMarginHorizontal}"
Visibility="{Binding Source={StaticResource Locator}, Path=RendererService.HasRenderer}">
<AppBarButton.Content>
<FontIcon Glyph="&#xEC15;"
FontFamily="Segoe MDL2 Assets" />
</AppBarButton.Content>
</AppBarButton>
<AppBarButton x:Name="SubtitlesButton"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
......
......@@ -8,6 +8,7 @@
**********************************************************************/
using System;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Threading.Tasks;
......@@ -120,6 +121,7 @@ namespace VLC.UI.Views.VideoPages
Locator.MediaPlaybackViewModel.PropertyChanged += MediaPlaybackViewModelOnPropertyChanged;
if (DeviceHelper.GetDeviceType() == DeviceTypeEnum.Tablet)
PointerWheelChanged += MouseWheelChanged;
CastButton.Click += CastButtonOnClick;
// VM initialization
Locator.VideoPlayerVm.OnNavigatedTo();
......@@ -137,7 +139,12 @@ namespace VLC.UI.Views.VideoPages
// Swapchain animations
App.RootPage.StartCompositionAnimationOnSwapChain(false);
}
void CastButtonOnClick(object sender, RoutedEventArgs routedEventArgs)
{
CastButton.Flyout = Locator.RendererService.CreateRendererFlyout();
}
void MediaPlaybackViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Locator.MediaPlaybackViewModel.Volume))
......@@ -184,6 +191,7 @@ namespace VLC.UI.Views.VideoPages
AppViewHelper.LeaveFullscreen();
Locator.MediaPlaybackViewModel.PropertyChanged -= MediaPlaybackViewModelOnPropertyChanged;
CastButton.Click -= CastButtonOnClick;
_viewModel.MouseService.Stop();
_viewModel.MouseService.OnMoved -= ShowControlPanel;
......
From 6caad9761747a9d3b24a5ac92009a93349352fbe Mon Sep 17 00:00:00 2001
From 3412d6d26fb4d8ba2bb3a831692ceadfeec31289 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 10 Feb 2015 11:58:54 +0100
Subject: [PATCH 01/22] wasapi: Don't fail if the client is already initialized
Subject: [PATCH 01/28] wasapi: Don't fail if the client is already initialized
make the extra test only for Winstore builds
---
......
From 6a58901922ad8dd94a0c51ecbe9e7fcfe20497cc Mon Sep 17 00:00:00 2001
From 0d9c465ebf5ea99f3f492ae7754657e39bcebe1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Wed, 11 May 2016 17:37:47 +0200
Subject: [PATCH 02/22] gnutls: Set cannot_unload_broken_library for winrt
Subject: [PATCH 02/28] gnutls: Set cannot_unload_broken_library for winrt
---
modules/misc/gnutls.c | 3 +++
......
From 9697dcc2acfe4be995d0157d8603e94e3a056f91 Mon Sep 17 00:00:00 2001
From 8a5f4fac5d78194b48cfa6bf48be6870c487b715 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed, 16 Apr 2014 16:09:53 +0200
Subject: [PATCH 03/22] Cheat for Windows Store subtitles
Subject: [PATCH 03/28] Cheat for Windows Store subtitles
---
lib/video.c | 5 +++++
......
From fbb521380f9d63f94273227802db6dc633a061de Mon Sep 17 00:00:00 2001
From 07fe0d6cfa0c8dfe299fd30d496b8608158e642f Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed, 12 Mar 2014 00:11:26 +0100
Subject: [PATCH 04/22] Accept the weird WinRT pathes
Subject: [PATCH 04/28] Accept the weird WinRT pathes
---
src/text/url.c | 5 +++++
......
From 23ca62309fd27d228f45a3bf1f6491392ef2f4e1 Mon Sep 17 00:00:00 2001
From 5129d8214d22e486ea25546c884b70d0912a2c99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 2 Aug 2016 18:54:28 +0200
Subject: [PATCH 05/22] config: cmdline: Use msg_* instead of fprintf
Subject: [PATCH 05/28] config: cmdline: Use msg_* instead of fprintf
---
src/config/cmdline.c | 14 +++++++-------
......
From 199c0f8d20bb7439963826e8a73a9fc4bd18c601 Mon Sep 17 00:00:00 2001
From 8edba7fb19751d21e2a1fcc2a0328e57d49ed0b0 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Fri, 30 Sep 2016 09:49:19 +0200
Subject: [PATCH 06/22] plugin cache: Windows doesn't like relative pathes in
Subject: [PATCH 06/28] plugin cache: Windows doesn't like relative pathes in
LoadLibraryEx()
Fixes "vlc-cache-gen ../modules" on Windows and general VLC_PLUGIN_PATH usage.
......
From 3f3cae2869882544bf6477175f9c50468edaf0c4 Mon Sep 17 00:00:00 2001
From e5ce476faac1aab507958776db7f65ab6ef9333e Mon Sep 17 00:00:00 2001
From: Steve Lhomme <slhomme@matroska.org>
Date: Fri, 2 Dec 2016 11:14:40 +0100
Subject: [PATCH 07/22] TEMPORARY: disable cuda/nvenc when building for
Subject: [PATCH 07/28] TEMPORARY: disable cuda/nvenc when building for
Winstore
---
......
From 4bc96a804813af82da82eb5bfa4694f41e854b9e Mon Sep 17 00:00:00 2001
From 42cd4cd46ef9987628b20bd8ada88fb1c7b21ff9 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Wed, 25 Jan 2017 10:49:37 +0100
Subject: [PATCH 08/22] core: avcodec requires 32-bytes memory alignment in
Subject: [PATCH 08/28] core: avcodec requires 32-bytes memory alignment in
many cases
For example a IA0L texture on Windows is not 32 bytes aligned and avcodec
......
From 5202c1627c25477a699e14e18d36687f0d258ba1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Wed, 22 Nov 2017 14:13:15 +0100
Subject: [PATCH 09/15] contrib: ffmpeg: Fix winstore build
---
contrib/src/ffmpeg/disable-wincrypt.patch | 10 ++++++++++
contrib/src/ffmpeg/rules.mak | 3 +++
2 files changed, 13 insertions(+)
create mode 100644 contrib/src/ffmpeg/disable-wincrypt.patch
diff --git a/contrib/src/ffmpeg/disable-wincrypt.patch b/contrib/src/ffmpeg/disable-wincrypt.patch
new file mode 100644
index 0000000..7c5a802
--- /dev/null
+++ b/contrib/src/ffmpeg/disable-wincrypt.patch
@@ -0,0 +1,10 @@
+--- ffmpeg/configure 2017-07-12 20:36:13.000000000 +0200
++++ ffmpeg/configure.new 2017-11-22 14:12:43.884159531 +0100
+@@ -5717,7 +5717,6 @@
+
+ check_lib ole32 "windows.h" CoTaskMemFree -lole32
+ check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32
+-check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom -ladvapi32
+ check_lib psapi "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
+
+ check_lib coreservices "CoreServices/CoreServices.h" UTGetOSTypeFromString "-framework CoreServices"
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 92c400d..4535551 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -241,6 +241,9 @@ endif
ifdef USE_LIBAV
$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
endif
+ifdef HAVE_WINSTORE
+ $(APPLY) $(SRC)/ffmpeg/disable-wincrypt.patch
+endif
$(MOVE)
.ffmpeg: ffmpeg
--
2.10.1.windows.1
From bf4df2a56204e108fd486832fd8c34208281da7b Mon Sep 17 00:00:00 2001
From cc9b7d8cd0650226c5f1f51fa14a17ce964ae95f Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Thu, 29 Mar 2018 15:46:11 +0200
Subject: [PATCH 09/22] contrib: ffmpeg: use bcrypt instead of the old wincrypt
Subject: [PATCH 09/28] contrib: ffmpeg: use bcrypt instead of the old wincrypt
API
When targeting Windows Vista and above
......
From 2c85ec8cd63c37bbc44ff0c2cf96261b04a8765f Mon Sep 17 00:00:00 2001
From 227573a1b4ef2e47571cbaaf86fe9d009b3ccbb2 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Tue, 19 Dec 2017 12:39:06 +0100
Subject: [PATCH 10/22] contrib:avcodec: use a more recent FFmpeg version
Subject: [PATCH 10/28] contrib:avcodec: use a more recent FFmpeg version
So that it doesn't use bogus atomics based code
---
......
From 0d08e043d8a7916a7cf879213d690fc5051761a1 Mon Sep 17 00:00:00 2001
From 50b6b5898f2dc06b9cf506efcff61eabe340c7ff Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 20 Feb 2018 11:24:43 +0100
Subject: [PATCH 11/22] contrib:mpg123: don't use forbidden APIs on Phone apps
Subject: [PATCH 11/28] contrib:mpg123: don't use forbidden APIs on Phone apps
---
contrib/src/mpg123/mpg123-winstore.patch | 11 +++++++++++
......
From e0e21250c591db7ae8a8bcbe0eb5b148e9329ddd Mon Sep 17 00:00:00 2001
From b6be67f5cb94d61932a5e9f255a45acb7fc6702c Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 29 Sep 2017 14:49:02 +0200
Subject: [PATCH 12/22] contrib: use live555 version that is compatible with
Subject: [PATCH 12/28] contrib: use live555 version that is compatible with
LGPL2
---
......
From 81e870b8217449c5e5eedd2700d0af65c30ed6aa Mon Sep 17 00:00:00 2001
From a8eace19aa8c3d735afa02860e7f3509f407044d Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 27 Mar 2018 18:57:41 +0200
Subject: [PATCH 13/22] rand: use bcrypt instead of CryptographicBufferStatics
Subject: [PATCH 13/28] rand: use bcrypt instead of CryptographicBufferStatics
for Winstore builds
It's available to winstore apps and on desktop since Vista.
......