1 import org.videolan.jvlc.JVLC;
4 public class VLCExample
7 public static void main( String[] args )
9 boolean videoInput = false;
10 JVLC jvlc = new JVLC();
12 jvlc.playlist.add("file://" + System.getProperty( "user.dir" ) + "/a.avi", "a.avi");
13 jvlc.playlist.add("file://" + System.getProperty( "user.dir" ) + "/a.mp3", "a.mp3");
14 jvlc.playlist.play( -1 , null );
16 while (! jvlc.isInputPlaying()) ;
18 // testing vout functionalities
22 if (jvlc.hasVout()) videoInput = true;
23 } catch (InterruptedException e) {
28 System.out.print(jvlc.getVideoWidth());
29 System.out.print("x");
30 System.out.println(jvlc.getVideoHeight());
35 System.out.print("Fullscreen... ");
36 jvlc.setFullscreen(true);
38 System.out.println("real size.");
39 jvlc.setFullscreen(false);
40 System.out.print("Taking snapshot... ");
41 jvlc.getSnapshot( System.getProperty( "user.dir" ) + "/snap.png");
42 System.out.println("taken. (see " + System.getProperty( "user.dir" ) + "/snap.png )");
44 System.out.print("Muting...");
47 System.out.println("unmuting.");
50 System.out.println("Volume is: " + jvlc.getVolume());
51 System.out.print("Setting volume to 150... ");
53 System.out.println("done");
55 System.out.println("INPUT INFORMATION");
56 System.out.println("-----------------");
57 System.out.println("Total length (ms) :\t" + jvlc.getInputLength());
58 System.out.println("Input time (ms) :\t" + jvlc.getInputTime());
59 System.out.println("Input position [0-1]:\t" + jvlc.getInputPosition());
61 System.out.println("Input FPS :\t" + jvlc.getInputFPS());
68 System.out.println("Something was wrong. I die :(.");
72 System.out.println("Everything fine ;)");
73 System.out.println("Playing next item");
78 } catch (InterruptedException e) {