Commit 3cade7d7 authored by Martin Finkel's avatar Martin Finkel
Browse files

Add initial documentation TXT

parent ae313989
Welcome to VLC for Unity on Windows!
For reference, you need to a bunch of components to get this working:
- libvlc.dll, libvlccore.dll (and its plugins in /libs folder): These are nightly build DLLs of the VLC player libraries
- Custom build of libvlcsharp, the official VideoLAN C# binding to libvlc
- RenderingPlugin.dll, the VLC-Unity native plugin
This is all included in this package and it all works automatically for you.
LibVLCSharp docs (not Unity specific)
!! You need to set your Unity target platform to "PC, Mac & Linux Standalone" to target Windows classic. Go for the x86_64 architecture.
The scene from Assets/VLC-Unity-Windows/Scripts/main.unity provides a way to get started quickly.
Regarding the integration code that you need, you will find it in UseRenderingPlugin.cs.
First, to load the libvlc libraries on Windows, you need to do an extra step:
Declare this native call:
static extern void SetPluginPath(string path);
And call it with:
You can then load the libvlc libraries.
You can then create LibVLCSharp objects
LibVLC = new LibVLC();
MediaPlayer = new MediaPlayer(LibVLC);
The frame updating is done in a Unity coroutine
IntPtr texptr = MediaPlayer.GetFrame(out bool updated);
if (updated)
See UseRenderingPlugin.CallPluginAtEndOfFrames() for more details.
Once that is all setup, you can create a new Media and start playback like so
MediaPlayer.Play(new Media(LibVLC, "", FromType.FromLocation));
To get up and running easily and quickly, I recommend you load the Assets/VLC-Unity-Windows/Scripts/main.unity scene and get started from there.
The few lines of setup code I mentioned above are located in UseRenderingPlugin.cs.
\ No newline at end of file
Supports Markdown
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