Archive

Posts Tagged ‘jmf’

Java webcam support using gstreamer

July 14th, 2011 2 comments

Java’s side that is not too well known would be its interface with external devices. Java can read bar codes interface with serial / parallel ports , and communicate with a web cam (JMF)

Speaking of webcams, the following snippet in the Java media framework (JMF) should list your webcam as a device

Vector info = CaptureDeviceManager.getDeviceList(null);

The problem is that this piece of code does not work all the time. Your webcam should be compatible with JMF to be listed by this call. The gstreamer API can come to your rescue should the JMF call fail. Here is how the gstreamer API describes itself

GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.

Categories: java Tags: , , ,