Skip to content

Instantly share code, notes, and snippets.

sudo apt-get install docker-ce
docker pull registry.videolan.org:5000/vlc-debian-win32
cd ~
mkdir win64
docker run -v ~/win64:/win64 -i -t registry.videolan.org:5000/vlc-debian-win32 /bin/bash
(...you will now be running the build environment from a docker container as root)
cd win64
git clone https://git.videolan.org/git/vlc
cd vlc
mkdir -p contrib/win32
.\LVST.exe --help
LVST 1.0.0
Copyright (C) 2020 LVST
-v, --verbose Set output to verbose messages.
-t, --torrent The torrent link to download and play
-c, --cast Cast to the chromecast
/// <summary>
/// Retrieve a video frame from the Unity plugin as a texture.
/// </summary>
/// <param name="updated">True if the video frame has been updated</param>
/// <returns>A decoded texture</returns>
public IntPtr GetTexture(out bool updated)
<StackLayout>
<ListView x:Name="ItemsListView"
ItemsSource="{Binding Items}"
VerticalOptions="FillAndExpand"
HasUnevenRows="true"
RefreshCommand="{Binding LoadItemsCommand}"
IsPullToRefreshEnabled="true"
IsRefreshing="{Binding IsBusy, Mode=OneWay}"
CachingStrategy="RecycleElement"
ItemSelected="OnItemSelected">
public Item(Media media)
{
Media = media;
Name = media.Meta(MetadataType.Title);
IsDirectory = media.Type == MediaType.Directory;
Type = IsDirectory ? "Directory" : "File";
}
Core.Initialize();
_libVLC = new LibVLC();
foreach (var md in _libVLC.MediaDiscoverers(MediaDiscovererCategory.Lan))
{
var discoverer = new MediaDiscoverer(_libVLC, md.Name);
discoverer.MediaList.ItemAdded += MediaList_ItemAdded;
discoverer.MediaList.ItemDeleted += MediaList_ItemDeleted;
discoverer.Start();
void PanUpdated(object sender, PanUpdatedEventArgs e)
{
switch (e.StatusType)
{
case GestureStatus.Running:
if (ScreenWidth > 0 && ScreenHeight > 0)
{
double range = Math.Max(ScreenWidth, ScreenHeight);
float yaw = (float)(Fov * -e.TotalX / range);// up/down
float pitch = (float)(Fov * -e.TotalY / range);// left/right
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
ScreenWidth = width;
ScreenHeight = height;
}
bool Is360Video => _media.Tracks[0].Data.Video.Projection == VideoProjection.Equirectangular;
internal void OnGesture(PanUpdatedEventArgs e)
{
switch (e.StatusType)
{
case GestureStatus.Running:
if (e.TotalX < 0 && Math.Abs(e.TotalX) > Math.Abs(e.TotalY))
{
var timeDiff = Convert.ToInt64(e.TotalX * 1000);
_finalTime = MediaPlayer.Time + timeDiff;