Hi

We are working on a project which displays the live
web-cam feed on an applet. We are using the JMF JDK for
the project.

The steps to achieve the functionality are
1) Get the CaptureDeviceInfo for the video device from the CaptureDeviceManager.
2) Get the MediaLocator for the Device from the CaptureDeviceInfo.
3) Pass the MediaLocator to the constructor to the createProcessor. The processor
object streams the time-based data.

We are using AnyCam from Samsung.

The partial listing of the code is as follows
public void init() {
// Get the CaptureDeviceInfo for the live video capture device
// *** //
Vector deviceList =
CaptureDeviceManager.getDeviceList(new VideoFormat(VideoFormat.YUV));
CaptureDeviceInfo di = null;
if (deviceList.size() > 0){
di = (CaptureDeviceInfo)deviceList.firstElement();
}else
{
// Exit if we can't find a device that does not support video
System.exit(-1);
}
// Now create a processor for this capturedevice & exit if we cannot
create it
try {
processor = Manager.createProcessor(di.getLocator());
} catch (IOException e) {
System.exit(-1);
} catch (NoProcessorException e) {
System.exit(-1);
}
// add a ControllerListener to the processor that can detect state
changes for the processor
processor.addControllerListener(this);
// configure the processor
processor.configure();



Question : The above written piece does not run.
a) We could not get the value of parameter for the constructor VideoFormat.
b) I presume that all the devices should be registered with the
CaptureDeviceManager first. We could not find a good example for
that also.

If anyone have worked with JMF, please help
Regards