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
54376409
Commit
54376409
authored
Nov 06, 2006
by
Christophe Mutricy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missing in previous backport. Fix make dist
parent
b8e2f52f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
158 additions
and
0 deletions
+158
-0
bindings/java/FAQ
bindings/java/FAQ
+46
-0
bindings/java/THANKS
bindings/java/THANKS
+9
-0
bindings/java/VLCExample.java
bindings/java/VLCExample.java
+103
-0
No files found.
bindings/java/FAQ
0 → 100644
View file @
54376409
= Frequently Asked Questions =
== 1. Is it possible to use JVLC in a Java Applet? ==
Yes and No.
Yes because it's a Java program and even if it contains
native code, it is still possible to deploy the applet (take a look at
[http://www.raditha.com/java/jni/ this] article).
No because native code for the Windows and MacOS platforms still needs
to be written.
== 2. Is it possible to use JVLC in Windows (or MacOS)? ==
Yes, you can compile VideoLAN Java Bindings with --enable-java-bindings
in ./configure . It works for GNU/Linux and Win32, but it doesn't for MacOS.
== 3. What features of Videolan are available to JVLC? ==
JVLC contains all the features available in Videolan. In fact, JVLC uses
Videolan core as its core, so JVLC is capable of everything Videolan can
do.
== 4. Why shouldn't I use JMF (Java Media Framework) for multimedia
applications? ==
Well, JVLC and Videolan are free (as in freedom) software, so you can extend
and adapt them to your needs, while JMF is free as in beer. Furthermore JVLC
is really straightforward and simple to use.
== 5. How can I help you with this application? ==
Try the software and report any errors or bugs you find to me. This application
needs porting to MS/Windows and MacOS, if you are able to implement the JNI for
these platforms you may contribute the code.
== 6. I have a compile error, what's the problem? ==
Did you set the JAVA_HOME environment variable? If not, do:
export JAVA_HOME=/path/to/jvm
For example I added to my .bashrc:
export JAVA_HOME=/usr/lib/j2sdk1.5-sun
bindings/java/THANKS
0 → 100644
View file @
54376409
Thanks to:
* Kuldipsingh Pabla
for solaris port and various contributions to the native interface.
for the GenericVideoWidget class
* Tvrtko Bedekovic
for initial win32 port
bindings/java/VLCExample.java
0 → 100644
View file @
54376409
import
org.videolan.jvlc.JVLC
;
import
org.videolan.jvlc.VLCException
;
public
class
VLCExample
{
public
static
void
main
(
String
[]
args
)
{
boolean
videoInput
=
false
;
JVLC
jvlc
=
new
JVLC
(
args
);
try
{
jvlc
.
playlist
.
add
(
"file://"
+
System
.
getProperty
(
"user.dir"
)
+
"/a.avi"
,
"a.avi"
);
jvlc
.
playlist
.
add
(
"file://"
+
System
.
getProperty
(
"user.dir"
)
+
"/a.mp3"
,
"a.mp3"
);
jvlc
.
playlist
.
play
(
-
1
,
null
);
}
catch
(
VLCException
e
)
{
e
.
printStackTrace
();
}
while
(!
jvlc
.
isInputPlaying
())
;
while
(!
jvlc
.
hasVout
()
);
// testing vout functionalities
try
{
Thread
.
sleep
(
2500
);
if
(
jvlc
.
hasVout
())
videoInput
=
true
;
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
if
(
videoInput
)
{
try
{
System
.
out
.
print
(
jvlc
.
video
.
getWidth
());
System
.
out
.
print
(
"x"
);
System
.
out
.
println
(
jvlc
.
video
.
getHeight
());
}
catch
(
VLCException
e
)
{
e
.
printStackTrace
();
}
}
try
{
if
(
videoInput
)
{
System
.
out
.
print
(
"Fullscreen... "
);
jvlc
.
video
.
setFullscreen
(
true
);
Thread
.
sleep
(
3000
);
System
.
out
.
println
(
"real size."
);
jvlc
.
video
.
setFullscreen
(
false
);
System
.
out
.
print
(
"Taking snapshot... "
);
jvlc
.
video
.
getSnapshot
(
System
.
getProperty
(
"user.dir"
)
+
"/snap.png"
);
System
.
out
.
println
(
"taken. (see "
+
System
.
getProperty
(
"user.dir"
)
+
"/snap.png )"
);
Thread
.
sleep
(
2000
);
System
.
out
.
println
(
"Resizing to 300x300"
);
jvlc
.
video
.
setSize
(
300
,
300
);
}
System
.
out
.
print
(
"Muting..."
);
jvlc
.
audio
.
setMute
(
true
);
Thread
.
sleep
(
3000
);
System
.
out
.
println
(
"unmuting."
);
jvlc
.
audio
.
setMute
(
false
);
Thread
.
sleep
(
3000
);
System
.
out
.
println
(
"Volume is: "
+
jvlc
.
audio
.
getVolume
());
System
.
out
.
print
(
"Setting volume to 150... "
);
jvlc
.
audio
.
setVolume
(
150
);
System
.
out
.
println
(
"done"
);
Thread
.
sleep
(
3000
);
System
.
out
.
println
(
"INPUT INFORMATION"
);
System
.
out
.
println
(
"-----------------"
);
System
.
out
.
println
(
"Total length (ms) :\t"
+
jvlc
.
input
.
getLength
());
System
.
out
.
println
(
"Input time (ms) :\t"
+
jvlc
.
input
.
getTime
());
System
.
out
.
println
(
"Input position [0-1]:\t"
+
jvlc
.
input
.
getPosition
());
if
(
videoInput
)
System
.
out
.
println
(
"Input FPS :\t"
+
jvlc
.
input
.
getFPS
());
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"Something was wrong. I die :(."
);
jvlc
.
destroy
();
}
System
.
out
.
println
(
"Everything fine ;)"
);
System
.
out
.
println
(
"Playing next item"
);
try
{
jvlc
.
playlist
.
next
();
}
catch
(
VLCException
e
)
{
e
.
printStackTrace
();
}
try
{
Thread
.
sleep
(
3000
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
jvlc
.
destroy
();
return
;
}
}
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