From 686e95b014edc8e7f47cf0dc93da253acf528aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20VIGNELLES?= Date: Fri, 22 May 2020 13:34:05 +0200 Subject: [PATCH 1/3] Declared non-seekable streams as non-seekable in callback input Increased the buffer size to match VLC buffer size --- .../VlcManager.CreateNewMediaFromStream.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Vlc.DotNet.Core.Interops/VlcManager.CreateNewMediaFromStream.cs b/src/Vlc.DotNet.Core.Interops/VlcManager.CreateNewMediaFromStream.cs index 2a42ba2..3962c12 100644 --- a/src/Vlc.DotNet.Core.Interops/VlcManager.CreateNewMediaFromStream.cs +++ b/src/Vlc.DotNet.Core.Interops/VlcManager.CreateNewMediaFromStream.cs @@ -44,7 +44,7 @@ public VlcMediaInstance CreateNewMediaFromStream(Stream stream) myVlcInstance, CallbackOpenMediaDelegate, CallbackReadMediaDelegate, - CallbackSeekMediaDelegate, + stream.CanSeek ? CallbackSeekMediaDelegate : null, CallbackCloseMediaDelegate, opaque )); @@ -148,7 +148,7 @@ private static IntPtr AddStream(Stream stream) handle = new IntPtr(streamIndex); DicStreams[handle] = new StreamData() { - Buffer = new byte[0x4000], + Buffer = new byte[0x100_0000], Handle = handle, Stream = stream }; From aca67a08392b764c8820e02a9bec6ea1be9cc47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20VIGNELLES?= Date: Fri, 22 May 2020 13:46:45 +0200 Subject: [PATCH 2/3] Updated CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a72cc98..0d1fc7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ - ADDED support for .net core 3.0 for Vlc.DotNet.Forms and Vlc.DotNet.Wpf - DROPPED support for .net framework 2.0 - FIXED race conditions on Dispose() [#641](https://github.com/ZeBobo5/Vlc.DotNet/pull/641). Fixes [#639](https://github.com/ZeBobo5/Vlc.DotNet/issues/639) and [#640](https://github.com/ZeBobo5/Vlc.DotNet/issues/640) +- FIXED Media created from non-seekable .NET Streams were not declared as seekable for libvlc [#648](https://github.com/ZeBobo5/Vlc.DotNet/pull/648). See [#647](https://github.com/ZeBobo5/Vlc.DotNet/issues/647). +- CHANGED The buffer size for media created from .NET Streams from 16kiB to 16MiB. It takes more memory, but allows to read more data at once. [#648](https://github.com/ZeBobo5/Vlc.DotNet/pull/648) # 3.0.0 - BREAKING CHANGE : Created a new WPF control using ImageSource [#365](https://github.com/ZeBobo5/Vlc.DotNet/pull/365) see how to use in wiki! From 4b5dcad722cf6a63f9ed5a4b4b751d0e029c96d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20VIGNELLES?= Date: Fri, 22 May 2020 13:48:01 +0200 Subject: [PATCH 3/3] Fixed mistake in CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d1fc7e..4d8f166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ - ADDED support for .net core 3.0 for Vlc.DotNet.Forms and Vlc.DotNet.Wpf - DROPPED support for .net framework 2.0 - FIXED race conditions on Dispose() [#641](https://github.com/ZeBobo5/Vlc.DotNet/pull/641). Fixes [#639](https://github.com/ZeBobo5/Vlc.DotNet/issues/639) and [#640](https://github.com/ZeBobo5/Vlc.DotNet/issues/640) -- FIXED Media created from non-seekable .NET Streams were not declared as seekable for libvlc [#648](https://github.com/ZeBobo5/Vlc.DotNet/pull/648). See [#647](https://github.com/ZeBobo5/Vlc.DotNet/issues/647). +- FIXED Media created from non-seekable .NET Streams were declared as seekable for libvlc [#648](https://github.com/ZeBobo5/Vlc.DotNet/pull/648). See [#647](https://github.com/ZeBobo5/Vlc.DotNet/issues/647). - CHANGED The buffer size for media created from .NET Streams from 16kiB to 16MiB. It takes more memory, but allows to read more data at once. [#648](https://github.com/ZeBobo5/Vlc.DotNet/pull/648) # 3.0.0