This describes how to set it up in Netbeans on Windows (should be the same for other Maven projects).
First, set up vlcj and build it:
- Download vlcj.
- Set it up as a new project in Netbeans.
- Change config to 'release'
- Download suitable VLC.
- Place libvlc and libvlccore in project root/win32-x86-64
- Distribution ends up as a zip the project root/target folder.
I created a JmeRenderCallbackAdapter class based on this Direct Rendering tutorial. The class takes a Texture2D as an input and will update its ImageBuffer on every onDisplay call.
The method is very basic and there's an improvement to be made by using the native buffer directly.
The TestVlcj class shows how to display the result.
The setupView method creates a Quad and an Unshaded material to display the video on.
It also creates a Texture2D (which is passed to JmeRenderCallbackAdapter) and an Image the same size as the application.
The way BufferFormatCallback and DirectMediaPlayerComponent work are again taken directly from the Direct Rendering tutorial.
TestVlcj takes a path to a video as input argument. The input argument can be overridden and mediaFile can be hard coded for testing.