hjohn / MediaSystem

Entertainment center for searching and viewing your video collection. It will fetch metadata and subtitles from external sources and can be controlled by remote. The GUI is written using JavaFX and video playback uses VLC through vlcj.
19 stars 5 forks source link

How to run the program? #6

Open attarwang opened 11 years ago

attarwang commented 11 years ago

Could you give some tips step by step?

hjohn commented 11 years ago

It is still under development and can be a bit tricky to run, and I'll probably need to fix some small issues to make it run a bit easier.

It's currently not yet suited for "normal" use, so if you're not a developer willing to tweak things a bit there's not much point yet in trying it.

The master branch is currently unmaintained (its for JavaFX 2). The Java8 branch is what I'm working on at the moment and the one I could help you with (I'm going to merge it soon into master).

For the java8 branch you'll need to have a JDK8 beta installed (b99 or higher). You'll also need VLC installed (both the JDK and VLC should be the same archictecture, so both 32-bit or both 64-bit).

Furthermore, the java8 branch has some dependencies that must be build as well (with Maven). These are the two extensions (ext-all and ext-vlc) and the ddif project (also on my github). I normally run this directly from Eclipse during testing -- no effort has been made yet to try and make it work stand-alone.

Let me know which version you are trying to get to work (master or java8 branch) and what your technical skill level is (developer, end-user).

attarwang commented 11 years ago

Thanks for your reply. I am a developer(JavaFX 2.3) and I wanna get the master verison to my program. I run the the vlcj example(https://github.com/caprica/vlcj-javafx) and met memory leak which could not locate the bug. So I wanna find other to try.

hjohn commented 11 years ago

It works the same way, it uses Canvas, which is buggy at the moment. It is improving in JavaFX 8, which is why I gave up on the 2.x line. There is an alternative, you could try using a WritableImage. Contact me directly at hjohn@xs4all.nl and I'll send you some code for it.

The other solution that MediaSystem uses is to make two Windows, and put the VLC Window at the back and a transparent Window on top for the overlay. This is a poor solution that has many drawbacks.

As for getting the master branch to run, what trouble did you have running it? The instructions are in the README.

attarwang commented 11 years ago

Do you mean there is some bugs about Canvas? Is the bug fixed in JavaFX 8? I email you directly.

hjohn commented 11 years ago

There have been many bugs with Canvas, and there still are even in JavaFX 8. In JavaFX 2 I never managed to get it working fast or stable enough -- I gave up. In JavaFX 8, there have been quite a number of performance improvements and stability improvements, and now it is looking almost usable. However, buffering when Canvas is not visible is a big problem still, see https://javafx-jira.kenai.com/browse/RT-24903.

For now I've switched to using a WritableImage instead since I donot need all the other things Canvas offers.

attarwang commented 11 years ago

I used WritableImage that you give me example and sometimes it will trigger null exception. java.lang.NullPointerException at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2108) at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2210) at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460) at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29) at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73) at java.lang.Thread.run(Thread.java:724)

hjohn commented 11 years ago

WritableImage is a JavaFX component. The NPE occurs in JavaFX code. I think you should report it to them.