FileDocCategorySizeDatePackage
CDSWrapper.javaAPI DocJMF 2.1.1e2511Mon May 12 12:20:32 BST 2003jmapps.util

CDSWrapper

public class CDSWrapper extends PushBufferDataSource implements CaptureDevice

Fields Summary
private PushBufferDataSource
inputDS
private boolean
firstConnect
private boolean
firstDisconnect
Constructors Summary
public CDSWrapper(PushBufferDataSource incoming)

    
       
	this.inputDS = incoming;
    
Methods Summary
public voidclose()

	// If its been connected atleast once, disconnect the input
	if (!firstConnect) {
	    inputDS.disconnect();
	}
    
public voidconnect()

	if (firstConnect) {
	    inputDS.connect();
	    firstConnect = false;
	}
    
public voiddisconnect()

	// Don't disconnect input first time
	if (firstDisconnect) {
	    firstDisconnect = false;
	} else {
	    close();
	}
    
public javax.media.CaptureDeviceInfogetCaptureDeviceInfo()

	return ((CaptureDevice)inputDS).getCaptureDeviceInfo();
    
public java.lang.StringgetContentType()

	return inputDS.getContentType();
    
public java.lang.ObjectgetControl(java.lang.String ctype)

	return inputDS.getControl(ctype);
    
public java.lang.Object[]getControls()
Controls

	return inputDS.getControls();
    
public javax.media.TimegetDuration()
Duration

	return inputDS.getDuration();
    
public javax.media.control.FormatControl[]getFormatControls()
CaptureDevice

	return ((CaptureDevice)inputDS).getFormatControls();
    
public javax.media.MediaLocatorgetLocator()

	return inputDS.getLocator();
    
public javax.media.protocol.PushBufferStream[]getStreams()
PushBufferDataSource

	return inputDS.getStreams();
    
public voidstart()

	inputDS.start();
    
public voidstop()

	inputDS.stop();