Commit 43bff21b authored by littlejohn's avatar littlejohn
Browse files

Make audio functions compliant with current libvlc

parent c17c4753
......@@ -7,34 +7,26 @@ Usage
In order to use these bindings you have to compile vlc from source. I
recommend you to take the latest version from videolan svn repository
(or use at least revison 17559) by doing:
(or use at least revison 18443) by doing:
svn co svn:// vlc-trunk
bootstrap, clean, set environment variables, configure and build:
./bootstrap && make distclean
export JAVA_HOME=/path/to/jvm
(for example i have JAVA_HOME=/usr/lib/j2sdk1.5-sun)
(for example i have JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun)
./configure --enable-java-bindings && make && make install
If you give a prefix be sure to change the PREFIX variable in the Makefile
from /usr/local to your prefix.
To run a Java VLC example issue (be sure you have an a.avi and a.mp3 files
in your user.dir folder):
Once you've done with vlc you can run make in jvlc directory. Be sure
you have gcj, gcjh and if you want to use the SUN Java compiler,
change the Makefile accordingly. You will probably need to change also
java -Djava.library.path=/usr/local/lib VLCExample
In the next releases I will automate this process.
To run a Java VLC example issue:
java -Djava.library.path=. VlcClient
(if you have specified a prefix in configure, change /usr/local/lib to
Be sure your ldconfig can find and or you will
get linking errors when you run the program.
[MediaControl - in progress]
* enums will be final classes with private constructor, for type safety
* mediacontrol
* JUnit testing
* configure / make install
* find a good way to divide CNI and JNI versions (same Java classes,
different interfaces) maybe: two classes, one with the
System.loadLibray for jni and the other without
* mediacontrol
[build system]
* Detect SWT to add the SWTVideoWidget
Items are ordered by priority, the first having the highest priority
import org.videolan.jvlc.AudioIntf;
import org.videolan.jvlc.JVLC;
import org.videolan.jvlc.VLCException;
......@@ -73,7 +74,7 @@ public class VLCExample
System.out.print("Setting right channel... ");"right");;
System.out.println("INPUT INFORMATION");
......@@ -92,6 +93,7 @@ public class VLCExample
System.out.println("Something was wrong. I die :(.");
System.out.println("Everything fine ;)");
......@@ -149,7 +149,8 @@ public class JVLC implements Runnable {
} // while playlist running
} catch (VLCException e) {
// it is non-sense to show the stacktrace here
// e.printStackTrace();
inputPlaying = false;
inputVout = false;
......@@ -36,9 +36,11 @@
JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Audio__1getTrack (JNIEnv *env, jobject _this)
jint res = 0;
res = libvlc_audio_get_track( ( libvlc_instance_t * ) instance, exception );
res = libvlc_audio_get_track( input, exception );
......@@ -48,8 +50,9 @@ JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Audio__1getTrack (JNIEnv *env, job
JNIEXPORT void JNICALL Java_org_videolan_jvlc_Audio__1setTrack (JNIEnv *env, jobject _this, jint value)
libvlc_audio_set_track( ( libvlc_instance_t * ) instance, value, exception );
libvlc_audio_set_track( input, value, exception );
......@@ -60,7 +63,7 @@ JNIEXPORT jstring JNICALL Java_org_videolan_jvlc_Audio__1getChannel (JNIEnv *env
char* res;
res = libvlc_audio_get_channel( (libvlc_instance_t *) instance, exception);
res = libvlc_audio_get_channel( ( libvlc_instance_t * ) instance, exception);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment