
Signature
Knute Johnson
email s/nospam/knute/
Molon labe...
>> Seems this is not so uncommon as problem:
http://forum.java.sun.com/thread.jsp?forum=28&thread=333682&start=0&range=15&hil
ite=false&q=
[snip]
> Raph:
>
> You've got something messed up in your device/deviceInfo variables
> probably. Post the complete code and I can tell you for sure.
Hi,
you'll find the complete code in attachement.
To run it, I either launch it from the command line:
java FrameGrab
or I edit the script jmstudio in $JMF_HOME/bin and change this line
exec java JMStudio $*
in this
exec java FrameGrab $*
This last solution generates this error (check attachment jmout.txt for
complete output):
An error has occurred. Check jmf.log for details.
Exception in thread "main" javax.media.NoPlayerException: Error
instantiating class: com.sun.media.protocol.v4l.DataSource :
java.io.IOException: java.lang.Error: Couldn't initialize capture device
at javax.media.Manager.createPlayerForContent(Manager.java:1362)
at javax.media.Manager.createPlayer(Manager.java:417)
at javax.media.Manager.createRealizedPlayer(Manager.java:553)
at FrameGrab.main(FrameGrab.java:44)
and jmf.log is this:
#
# JMF Version 2.1.1e
#
## Platform: Linux, i386, 2.4.20-cdrw
## Java VM: Sun Microsystems Inc., 1.4.2
XX java.io.IOException: java.lang.Error: Couldn't initialize capture device
XX java.io.IOException: java.lang.Error: Couldn't initialize capture device
I set these environment variables:
export JMF_HOME=/usr/local/JMF-2.1.1e/
export CLASSPATH=$CLASSPATH:$JMF_HOME/lib/jmf.jar:$JMFHOME/lib/sound.jar
$JMFHOME/lib/.
export LD_LIBRARY_PATH=$JMFHOME/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$JMFHOME/lib:/usr/local/java/jre/lib/i386/:/usr/local/java/jre/lib/i386/client/
export LD_PRELOAD=$LD_PRELOAD:/usr/local/java/jre/lib/i386/libjawt.so
System is Debian GNU/Linux unstable. java is 1.4.2 build 1.4.2-b28
If you need more info, just tell me.
Thanks!
Raph
Knute Johnson - 08 Mar 2004 19:25 GMT
>>>Seems this is not so uncommon as problem:
>
[quoted text clipped - 237 lines]
> at javax.media.Manager.createRealizedPlayer(Manager.java:553)
> at FrameGrab.main(FrameGrab.java:44)
Raph:
It works here with my Creative web cam. It could be numerous things
with the way this code is written. Here are some things to try. Use
vfw://0 as the device locator, create your player with
Manager.createPlayer() and use a ControllerListener to check for
realized, try to display the video rather than grabbing a frame.
I'll email you a copy of a program to try too. Let me know if it works.

Signature
Knute Johnson
email s/nospam/knute/
Molon labe...