FileDocCategorySizeDatePackage
V4LAuto.javaAPI DocJMF 2.1.1e1407Mon May 12 12:20:34 BST 2003None

V4LAuto

public class V4LAuto extends Object

Fields Summary
Constructors Summary
public V4LAuto()

        Vector devices = (Vector) CaptureDeviceManager.getDeviceList(null).clone();
	Enumeration enum = devices.elements();
	while (enum.hasMoreElements()) {
	    CaptureDeviceInfo cdi = (CaptureDeviceInfo) enum.nextElement();
	    String name = cdi.getName();
	    if (name.startsWith("v4l:"))
		CaptureDeviceManager.removeDevice(cdi);
	}
	
	for (int i = 0; i < 10; i++) {	    
	    autoDetect(i);
	}
    
Methods Summary
protected javax.media.CaptureDeviceInfoautoDetect(int cardNo)

	CaptureDeviceInfo cdi = null;
	try {
	    cdi = new V4LDeviceQuery(cardNo);
	    if ( cdi != null && cdi.getFormats() != null &&
		 cdi.getFormats().length > 0) {
		// Commit it to disk. Its a new device
		if (CaptureDeviceManager.addDevice(cdi)) {
		    System.err.println("Added device " + cdi);
		    CaptureDeviceManager.commit();
		}
	    }
	} catch (Throwable t) {
	    System.err.println(t);
	    if (t instanceof ThreadDeath)
		throw (ThreadDeath)t;
	}
	
	return cdi;
    
public static voidmain(java.lang.String[] args)

	V4LAuto a = new V4LAuto();
	System.exit(0);