Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
43bff21b
Commit
43bff21b
authored
Dec 26, 2006
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make audio functions compliant with current libvlc
parent
c17c4753
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
36 deletions
+21
-36
bindings/java/README
bindings/java/README
+8
-16
bindings/java/TODO
bindings/java/TODO
+2
-15
bindings/java/VLCExample.java
bindings/java/VLCExample.java
+3
-1
bindings/java/org/videolan/jvlc/JVLC.java
bindings/java/org/videolan/jvlc/JVLC.java
+2
-1
bindings/java/src/audio-jni.cc
bindings/java/src/audio-jni.cc
+6
-3
No files found.
bindings/java/README
View file @
43bff21b
...
@@ -7,34 +7,26 @@ Usage
...
@@ -7,34 +7,26 @@ Usage
In order to use these bindings you have to compile vlc from source. I
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
recommend you to take the latest version from videolan svn repository
(or use at least revison 1
7559
) by doing:
(or use at least revison 1
8443
) by doing:
svn co svn://svn.videolan.org/vlc/trunk vlc-trunk
svn co svn://svn.videolan.org/vlc/trunk vlc-trunk
bootstrap, clean, set environment variables, configure and build:
bootstrap, clean, set environment variables, configure and build:
./bootstrap
&& make distclean
./bootstrap
export JAVA_HOME=/path/to/jvm
export JAVA_HOME=/path/to/jvm
(for example i have JAVA_HOME=/usr/lib/j
2sdk1.5
-sun)
(for example i have JAVA_HOME=/usr/lib/j
vm/java-1.5.0
-sun)
./configure --enable-java-bindings && make && make install
./configure --enable-java-bindings && make && make install
If you give a prefix be sure to change the PREFIX variable in the Makefile
To run a Java VLC example issue (be sure you have an a.avi and a.mp3 files
from /usr/local to your prefix.
in your user.dir folder):
Once you've done with vlc you can run make in jvlc directory. Be sure
java -Djava.library.path=/usr/local/lib VLCExample
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
JINCLUDES
(if you have specified a prefix in configure, change /usr/local/lib to
LIBJINCLUDES
PREFIX/lib)
In the next releases I will automate this process.
To run a Java VLC example issue:
java -Djava.library.path=. VlcClient
Be sure your ldconfig can find libjawt.so and libmawt.so or you will
Be sure your ldconfig can find libjawt.so and libmawt.so or you will
get linking errors when you run the program.
get linking errors when you run the program.
...
...
bindings/java/TODO
View file @
43bff21b
[MediaControl - in progress]
* enums will be final classes with private constructor, for type safety
[JNI]
* mediacontrol
[general]
[general]
* JUnit testing
* JUnit testing
* configure / make install
[build system]
* Detect SWT to add the SWTVideoWidget
* find a good way to divide CNI and JNI versions (same Java classes,
different interfaces) maybe: two JVLC.java classes, one with the
System.loadLibray for jni and the other without
[CNI]
* mediacontrol
Items are ordered by priority, the first having the highest priority
Items are ordered by priority, the first having the highest priority
bindings/java/VLCExample.java
View file @
43bff21b
import
org.videolan.jvlc.AudioIntf
;
import
org.videolan.jvlc.JVLC
;
import
org.videolan.jvlc.JVLC
;
import
org.videolan.jvlc.VLCException
;
import
org.videolan.jvlc.VLCException
;
...
@@ -73,7 +74,7 @@ public class VLCExample
...
@@ -73,7 +74,7 @@ public class VLCExample
System
.
out
.
print
(
"done."
);
System
.
out
.
print
(
"done."
);
Thread
.
sleep
(
3000
);
Thread
.
sleep
(
3000
);
System
.
out
.
print
(
"Setting right channel... "
);
System
.
out
.
print
(
"Setting right channel... "
);
jvlc
.
audio
.
setChannel
(
"right"
);
jvlc
.
audio
.
setChannel
(
AudioIntf
.
RIGHT_CHANNEL
);
System
.
out
.
print
(
"done."
);
System
.
out
.
print
(
"done."
);
Thread
.
sleep
(
3000
);
Thread
.
sleep
(
3000
);
System
.
out
.
println
(
"INPUT INFORMATION"
);
System
.
out
.
println
(
"INPUT INFORMATION"
);
...
@@ -92,6 +93,7 @@ public class VLCExample
...
@@ -92,6 +93,7 @@ public class VLCExample
System
.
out
.
println
(
"Something was wrong. I die :(."
);
System
.
out
.
println
(
"Something was wrong. I die :(."
);
jvlc
.
destroy
();
jvlc
.
destroy
();
e
.
printStackTrace
();
e
.
printStackTrace
();
System
.
exit
(
0
);
}
}
System
.
out
.
println
(
"Everything fine ;)"
);
System
.
out
.
println
(
"Everything fine ;)"
);
...
...
bindings/java/org/videolan/jvlc/JVLC.java
View file @
43bff21b
...
@@ -149,7 +149,8 @@ public class JVLC implements Runnable {
...
@@ -149,7 +149,8 @@ public class JVLC implements Runnable {
Thread
.
sleep
(
resolution
);
Thread
.
sleep
(
resolution
);
}
// while playlist running
}
// while playlist running
}
catch
(
VLCException
e
)
{
}
catch
(
VLCException
e
)
{
e
.
printStackTrace
();
// it is non-sense to show the stacktrace here
// e.printStackTrace();
}
}
inputPlaying
=
false
;
inputPlaying
=
false
;
inputVout
=
false
;
inputVout
=
false
;
...
...
bindings/java/src/audio-jni.cc
View file @
43bff21b
...
@@ -36,9 +36,11 @@
...
@@ -36,9 +36,11 @@
JNIEXPORT
jint
JNICALL
Java_org_videolan_jvlc_Audio__1getTrack
(
JNIEnv
*
env
,
jobject
_this
)
JNIEXPORT
jint
JNICALL
Java_org_videolan_jvlc_Audio__1getTrack
(
JNIEnv
*
env
,
jobject
_this
)
{
{
INIT_FUNCTION
;
INIT_FUNCTION
;
GET_INPUT_THREAD
;
jint
res
=
0
;
jint
res
=
0
;
res
=
libvlc_audio_get_track
(
(
libvlc_instance_t
*
)
instance
,
exception
);
res
=
libvlc_audio_get_track
(
input
,
exception
);
CHECK_EXCEPTION_FREE
;
CHECK_EXCEPTION_FREE
;
...
@@ -48,8 +50,9 @@ JNIEXPORT jint JNICALL Java_org_videolan_jvlc_Audio__1getTrack (JNIEnv *env, job
...
@@ -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
)
JNIEXPORT
void
JNICALL
Java_org_videolan_jvlc_Audio__1setTrack
(
JNIEnv
*
env
,
jobject
_this
,
jint
value
)
{
{
INIT_FUNCTION
;
INIT_FUNCTION
;
GET_INPUT_THREAD
;
libvlc_audio_set_track
(
(
libvlc_instance_t
*
)
instance
,
value
,
exception
);
libvlc_audio_set_track
(
input
,
value
,
exception
);
CHECK_EXCEPTION_FREE
;
CHECK_EXCEPTION_FREE
;
}
}
...
@@ -60,7 +63,7 @@ JNIEXPORT jstring JNICALL Java_org_videolan_jvlc_Audio__1getChannel (JNIEnv *env
...
@@ -60,7 +63,7 @@ JNIEXPORT jstring JNICALL Java_org_videolan_jvlc_Audio__1getChannel (JNIEnv *env
char
*
res
;
char
*
res
;
res
=
libvlc_audio_get_channel
(
(
libvlc_instance_t
*
)
instance
,
exception
);
res
=
libvlc_audio_get_channel
(
(
libvlc_instance_t
*
)
instance
,
exception
);
CHECK_EXCEPTION_FREE
;
CHECK_EXCEPTION_FREE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment