1 /*****************************************************************************
2 * JVLC.java: global class for vlc Java Bindings
3 *****************************************************************************
4 * Copyright (C) 1998-2004 the VideoLAN team
6 * Authors: Filippo Carone <filippo@carone.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
27 public JVLC(String[] args) {
28 String[] properArgs = new String[args.length + 1];
29 properArgs[0] = "jvlc";
30 for (int i = 0; i < args.length; i++)
31 properArgs[i+1] = args[i];
37 private native int create();
39 private native int init(String[] args);
41 public native int addInterface(String moduleName, boolean blocking, boolean startPlay);
43 public int addInterface(boolean blocking, boolean startPlay) {
44 return addInterface(null, blocking, startPlay);
47 public native String getVersion();
49 public native String getError(int errorCode);
51 public native int die();
53 public native int cleanUp();
55 public native int setVariable(JVLCVariable jvlcVariable);
57 public native JVLCVariable getVariable(String varName); // XXX in progress
59 public native int addTarget(String URI, String[] options, int insertMode, int position);
61 public native int play();
63 public native int pause();
65 public native int stop();
67 public native boolean isPlaying();
69 public native float getPosition();
71 public native float setPosition(float position);
73 public native int getTime();
75 public native int setTime(int seconds, boolean relative);
77 public native int getLength();
79 public native float speedFaster();
81 public native float speedSlower();
83 public native int getPlaylistIndex();
85 public native int getPlaylistItems();
87 public native int playlistNext();
89 public native int playlistPrev();
91 public native int playlistClear();
93 public native int getVolume();
95 public native int setVolume(int volume);
97 public native int muteVolume();
99 public native int fullScreen();