Other workaround options to explore is to pass a UNICODE (UTF-16) string:
video = VLCJVideo(this, u'')
video = VLCJVideo(this, (u''))
video = VLCJVideo(this, [u''])
Other workaround options to explore is to pass a UNICODE (UTF-16) string:
video = VLCJVideo(this, u'')
video = VLCJVideo(this, (u''))
video = VLCJVideo(this, [u''])
all the above fail…T_T
What are the errors for each 1 of those workarounds?
Also, are you using PDE 3.5.4 version?
I’m using verion 3.5.4.
The string and unicode strings gives
TypeError: VLCJVideo.VLCJVideo(): 2nd arg can't be coerced to String[]
The list gives
NoSuchFieldError: SIZE
at com.sun.jna.platform.win32.WinReg$HKEYByReference.<init>(WinReg.java:41)
at com.sun.jna.platform.win32.WinReg$HKEYByReference.<init>(WinReg.java:37)
at com.sun.jna.platform.win32.Advapi32Util.registryGetStringValue(Advapi32Util.java:551)
at uk.co.caprica.vlcj.factory.discovery.provider.WindowsInstallDirectoryProvider.getVlcInstallDir(WindowsInstallDirectoryProvider.java:60)
at uk.co.caprica.vlcj.factory.discovery.provider.WindowsInstallDirectoryProvider.directories(WindowsInstallDirectoryProvider.java:49)
at uk.co.caprica.vlcj.factory.discovery.provider.DirectoryProviderDiscoveryStrategy.discoveryDirectories(DirectoryProviderDiscoveryStrategy.java:68)
at uk.co.caprica.vlcj.factory.discovery.strategy.BaseNativeDiscoveryStrategy.discover(BaseNativeDiscoveryStrategy.java:68)
at uk.co.caprica.vlcj.factory.discovery.NativeDiscovery.discover(NativeDiscovery.java:112)
at uk.co.caprica.vlcj.factory.MediaPlayerFactory.discoverNativeLibrary(MediaPlayerFactory.java:187)
at uk.co.caprica.vlcj.factory.MediaPlayerFactory.<init>(MediaPlayerFactory.java:119)
at uk.co.caprica.vlcj.factory.MediaPlayerFactory.<init>(MediaPlayerFactory.java:143)
at VLCJVideo.VLCJVideo.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.python.core.PyReflectedConstructor.constructProxy(PyReflectedConstructor.java:211)
at org.python.core.PyReflectedConstructor.__call__(PyReflectedConstructor.java:180)
at org.python.core.PyObject.__call__(PyObject.java:438)
at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
at org.python.core.PyMethod.__call__(PyMethod.java:228)
at org.python.core.PyMethod.__call__(PyMethod.java:223)
at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
at org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1112)
at org.python.core.PyType.type___call__(PyType.java:1822)
at org.python.core.PyType.__call__(PyType.java:1805)
at org.python.core.PyObject.__call__(PyObject.java:497)
at org.python.core.PyObject.__call__(PyObject.java:501)
at org.python.pycode._pyx11.setup$1(VLCJVideo_py_test.pyde:7)
at org.python.pycode._pyx11.call_function(VLCJVideo_py_test.pyde)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:125)
at org.python.core.PyFunction.__call__(PyFunction.java:403)
at org.python.core.PyFunction.__call__(PyFunction.java:398)
at jycessing.PAppletJythonDriver.setup(Unknown Source)
at processing.core.PApplet.handleDraw(PApplet.java:2432)
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)
I also get “NoSuchFieldError: SIZE” when using video = VLCJVideo(this, ())
Something about the instantiation of MediaPlayerFactory inside VLCJVideo’s constructor isn’t working.
It’s failing to instantiate com.sun.jna.platform.win32.WinReg$HKEYByReference or finding the paths for VLC when running under Jython.
So I believe you’re stuck w/ Java Mode. Or you could try out py5, which can also use Java libraries w/ Python syntax:
https://py5Coding.org
The Processing Java mode works perfectly fine. I can play the video in Java mode, but I am not able to make the Python mode work.
So, there’s no way to make in work with Processing Python mode?
Not 1 that I know of, sorry. Best bet now is py5.
I also tried, but on Linux not even the library can be loaded.
In short: Python mode is not maintained, so it’s a really bad idea to start developing anything.