javax.media
Class ProcessorModel

java.lang.Object
  |
  +--javax.media.ProcessorModel

public class ProcessorModel
extends java.lang.Object

Encapsulates the minimal information required to create a Processor.

Extend this class to provide more control over what the output format of each track should be and let the Manager.createRealizedProcessor() method do the rest of the work of creating and realizing a suitable Processor.

Since:
JMF 2.0

Constructor Summary
ProcessorModel()
          Creates a ProcessorModel with null properties.
ProcessorModel(DataSource inputDataSource, Format[] formats, ContentDescriptor outputContentDescriptor)
          Creates a ProcessorModel for the specified input DataSource.
ProcessorModel(Format[] formats, ContentDescriptor outputContentDescriptor)
          Creates a ProcessorModel for the specified track formats and output content type.
ProcessorModel(MediaLocator inputLocator, Format[] formats, ContentDescriptor outputContentDescriptor)
          Creates a ProcessorModel for the specified input MediaLocator and output types.
 
Method Summary
 ContentDescriptor getContentDescriptor()
          Returns the required output content type.
 DataSource getInputDataSource()
          Returns the input DataSource to create the Processor for.
 MediaLocator getInputLocator()
          Returns the input media locator that specifies the source of the media.
 Format getOutputTrackFormat(int tIndex)
          Returns the preferred Format of a specific track.
 int getTrackCount(int availableTrackCount)
          Returns the number of tracks required as the output of this Processor.
 boolean isFormatAcceptable(int tIndex, Format tFormat)
          Checks if tFormat is an acceptable format for track tIndex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorModel

public ProcessorModel()
Creates a ProcessorModel with null properties.

ProcessorModel

public ProcessorModel(Format[] formats,
                      ContentDescriptor outputContentDescriptor)
Creates a ProcessorModel for the specified track formats and output content type. This constructor would be typically used to specify a media capture Processor

ProcessorModel

public ProcessorModel(DataSource inputDataSource,
                      Format[] formats,
                      ContentDescriptor outputContentDescriptor)
Creates a ProcessorModel for the specified input DataSource.

ProcessorModel

public ProcessorModel(MediaLocator inputLocator,
                      Format[] formats,
                      ContentDescriptor outputContentDescriptor)
Creates a ProcessorModel for the specified input MediaLocator and output types.
Method Detail

getTrackCount

public int getTrackCount(int availableTrackCount)
Returns the number of tracks required as the output of this Processor.

getOutputTrackFormat

public Format getOutputTrackFormat(int tIndex)
Returns the preferred Format of a specific track.

isFormatAcceptable

public boolean isFormatAcceptable(int tIndex,
                                  Format tFormat)
Checks if tFormat is an acceptable format for track tIndex. Returns true if acceptable, false otherwise.

getContentDescriptor

public ContentDescriptor getContentDescriptor()
Returns the required output content type. Returns null if the output type is not applicable or if the output streams are to contain raw data not pertaining to any specific content type.

getInputDataSource

public DataSource getInputDataSource()
Returns the input DataSource to create the Processor for. The inputLocator is ignored if this value is non-null.

getInputLocator

public MediaLocator getInputLocator()
Returns the input media locator that specifies the source of the media. This value is ignored if an inputDataSource is specified.