R
Raphael Bauduin
Hi,
I'm discovering JMF, and base my exploration on the example located at
http://www.uk-dave.com/bytes/java/jmf-framegrab.shtml
My webcam is recognised and usable with jmstudio.
However, I can't use it in my code and get "No such capture device!"...
Excerpts:
Vector deviceList = CaptureDeviceManager.getDeviceList(null);
while (!deviceList.isEmpty())
{
device = (CaptureDeviceInfo) deviceList.remove(0);
}
System.out.println("Working with : " +device.getName() + " -- " +
device.getLocator() );
CaptureDeviceInfo deviceInfo = device;
Player player = Manager.createRealizedPlayer(deviceInfo.getLocator());
(last line is line 39)
and I get this output:
v4l
hilips 740 webcam:0
v4l://0
Working with : v4l
hilips 740 webcam:0 -- v4l://0
java.io.IOException: java.lang.Error: No such capture device!
java.io.IOException: java.lang.Error: No such capture device!
Exception in thread "main" javax.media.NoPlayerException: Error
instantiating class: com.sun.media.protocol.v4l.DataSource :
java.io.IOException: java.lang.Error: No such 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:39)
What am I doing wrong? Starting jmstudio with the same environment lets me
capture from the webcam....
Thanks.
Raph
I'm discovering JMF, and base my exploration on the example located at
http://www.uk-dave.com/bytes/java/jmf-framegrab.shtml
My webcam is recognised and usable with jmstudio.
However, I can't use it in my code and get "No such capture device!"...
Excerpts:
Vector deviceList = CaptureDeviceManager.getDeviceList(null);
while (!deviceList.isEmpty())
{
device = (CaptureDeviceInfo) deviceList.remove(0);
}
System.out.println("Working with : " +device.getName() + " -- " +
device.getLocator() );
CaptureDeviceInfo deviceInfo = device;
Player player = Manager.createRealizedPlayer(deviceInfo.getLocator());
(last line is line 39)
and I get this output:
v4l
v4l://0
Working with : v4l
java.io.IOException: java.lang.Error: No such capture device!
java.io.IOException: java.lang.Error: No such capture device!
Exception in thread "main" javax.media.NoPlayerException: Error
instantiating class: com.sun.media.protocol.v4l.DataSource :
java.io.IOException: java.lang.Error: No such 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:39)
What am I doing wrong? Starting jmstudio with the same environment lets me
capture from the webcam....
Thanks.
Raph