FileDocCategorySizeDatePackage
MediaProcessor.javaAPI DocJMF 2.1.1e3706Mon May 12 12:20:48 BST 2003com.sun.media

MediaProcessor

public class MediaProcessor extends BasicProcessor
MediaProcessor extends BasicProcessor and uses ProcessEngine to process media.

Fields Summary
protected ProcessEngine
engine
Constructors Summary
public MediaProcessor()

	engine = new ProcessEngine(this);
    
Methods Summary
protected booleanaudioEnabled()

	return engine.audioEnabled();
    
public javax.media.protocol.ContentDescriptorgetContentDescriptor()
Return the output content-type.

	return engine.getContentDescriptor();
    
public javax.media.protocol.DataSourcegetDataOutput()
Return the output DataSource of the Processor.

	return engine.getDataOutput();
    
public javax.media.GainControlgetGainControl()
Obtain the gain control from the media engine.

	super.getGainControl();		// check for valid states.
	return engine.getGainControl();
    
protected javax.media.TimeBasegetMasterTimeBase()
Obtain the time base from the media engine.

	return engine.getTimeBase();
    
public longgetMediaNanoseconds()

	// When add controller is used, we want to use the
	// less accurate clock but still allows the time base
	// to take consideration of the slave controllers.
	// Otherwise, we'll use the more accurate engine time.
	if (controllerList.size() > 1)
	    return super.getMediaNanoseconds();
	else
	    return engine.getMediaNanoseconds();
    
public javax.media.TimegetMediaTime()
Obtain media time directly from the engine.

	// When add controller is used, we want to use the
	// less accurate clock but still allows the time base
	// to take consideration of the slave controllers.
	// Otherwise, we'll use the more accurate engine time.
	if (controllerList.size() > 1)
	    return super.getMediaTime();
	else
	    return engine.getMediaTime();
    
public javax.media.protocol.ContentDescriptor[]getSupportedContentDescriptors()
Return all the content-types which this Processor's output supports.

	return engine.getSupportedContentDescriptors();
    
public javax.media.control.TrackControl[]getTrackControls()
Return the tracks in the media. This method can only be called after the Processor has been configured.

	return engine.getTrackControls();
    
public java.awt.ComponentgetVisualComponent()
Obtain the visiual component from the media engine.

	/**
	 * Call the superclass method to ensure that restrictions
	 * on player methods are enforced
	 */
	super.getVisualComponent();
	return engine.getVisualComponent();
    
public javax.media.protocol.ContentDescriptorsetContentDescriptor(javax.media.protocol.ContentDescriptor ocd)
Set the output content-type.

	return engine.setContentDescriptor(ocd);
    
public voidsetSource(javax.media.protocol.DataSource source)

	// Ask the engine to verify the source.
	engine.setSource(source);

	// Put the media engine under the management of this player.
	// BasicPlayer will be responsible to transition the engine
	// to the realized state.
	manageController(engine);

	super.setSource(source);
    
public voidupdateStats()

	engine.updateRates();
    
protected booleanvideoEnabled()

	return engine.videoEnabled();