Closed ghost closed 8 years ago
Edited: The source code of program when I ran:
package tutorial;
import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent;
import uk.co.caprica.vlcj.discovery.NativeDiscovery;
import javax.swing.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class Tutorial {
private final JFrame frame;
private final EmbeddedMediaPlayerComponent mediaPlayerComponent;
public static void main(final String[] args) {
boolean found = new NativeDiscovery().discover();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new Tutorial("/home/user/video_3minute.mp4");
}
});
}
public Tutorial(String args) {
frame = new JFrame("My First Media Player");
frame.setBounds(100, 100, 600, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
mediaPlayerComponent.release();
System.exit(0);
}
});
mediaPlayerComponent = new EmbeddedMediaPlayerComponent();
frame.setContentPane(mediaPlayerComponent);
frame.setVisible(true);
mediaPlayerComponent.getMediaPlayer().playMedia(args);
}
}
Please search the issues already on this project, this is a well documented issue.
I found this issue: vlcj on Mac OS X 10.8.2 crash on play() #131 after that I edited project configurations jdk 1.7 to jdk 1.6. it's working, the video what I want to watch with my source code, but there are another logs(when I run my program):
shader program 1: WARNING: Output of vertex shader 'TexCoord1' not read by fragment shader
WARNING: Output of vertex shader 'TexCoord2' not read by fragment shader
[00007fc88c97be38] core vout display error: Failed to resize display
[00007fc88c97be38] core vout display error: Failed to change zoom
[00007fc88c97be38] core vout display error: Failed to set on top
[00007fc88c97be38] core vout display error: Failed to change source AR
[00007fc88c97be38] core vout display error: Failed to resize display
Especially the below line is logging every time when I resize a display.
[00007fc88c97be38] core vout display error: Failed to resize display
When the video will be end, then:
[00007fc88c97be38] core vout display error: Failed to change zoom
[00007fc88c97be38] core vout display error: Failed to change source AR
From now this line, just debug logs...
Is everything okay that some failed logs?
Well... is your app working... If so, then it's OK.
Those logs come from VLC, not vlcj.
If the logs bother you, you can use the native log functionality of vlcj to capture (all of?) it.
I've learning on section Play Something from vlcj Tutorial - My First Media Player and run source code, then:
My settings:
Following the below logs when I run source code(too scroll):