public abstract class Registry
extends java.lang.Object
Registry
for audio and video codecs.Constructor and Description |
---|
Registry() |
Modifier and Type | Method and Description |
---|---|
Codec |
getCodec(Format inputFormat,
Format outputFormat)
Gets a codec which can transcode from the specified input format to the
specified output format.
|
abstract java.lang.String[] |
getCodecClasses(Format inputFormat,
Format outputFormat)
Gets all codecs which can transcode from the specified input format to
the specified output format.
|
Codec[] |
getCodecs(Format inputFormat,
Format outputFormat)
Gets all codecs which can transcode from the specified input format to
the specified output format.
|
Codec |
getDecoder(Format inputFormat)
Gets the first codec which can decode the specified format.
|
java.lang.String[] |
getDecoderClasses(Format format)
Gets all codecs which can decode the specified format.
|
Codec[] |
getDecoders(Format inputFormat)
Gets all codecs which can decode the specified format.
|
Codec |
getEncoder(Format outputFormat)
Gets the first codec which can encode the specified foramt.
|
java.lang.String[] |
getEncoderClasses(Format format)
Gets all codecs which can decode the specified format.
|
Codec[] |
getEncoders(Format outputFormat)
Gets all codecs which can encode the specified format.
|
abstract java.lang.String |
getExtension(Format ff) |
abstract Format |
getFileFormat(java.io.File file) |
abstract Format[] |
getFileFormats() |
static Registry |
getInstance() |
MovieReader |
getReader(java.io.File file) |
MovieReader |
getReader(Format fileFormat,
java.io.File file) |
abstract java.lang.String[] |
getReaderClasses(Format fileFormat)
Gets all reader class names from the registry for the specified file
format.
|
abstract Format[] |
getReaderFormats() |
MovieWriter |
getWriter(java.io.File file) |
MovieWriter |
getWriter(Format fileFormat,
java.io.File file) |
abstract java.lang.String[] |
getWriterClasses(Format fileFormat)
Gets all writer class names from the registry for the specified file
format.
|
abstract Format[] |
getWriterFormats() |
protected abstract void |
init()
Initializes the registry.
|
abstract void |
putCodec(Format inputFormat,
Format outputFormat,
java.lang.String codecClass)
Puts a codec into the registry.
|
abstract void |
putFileFormat(java.lang.String extension,
Format format) |
abstract void |
putReader(Format fileFormat,
java.lang.String readerClass)
Puts a reader into the registry.
|
abstract void |
putWriter(Format fileFormat,
java.lang.String writerClass)
Puts a writer into the registry.
|
java.util.ArrayList<Format> |
suggestOutputFormats(Format inputMediaFormat,
Format outputFileFormat)
Suggests output formats for the given input media format and specified
file format.
|
abstract void |
unregisterCodec(java.lang.String codecClass) |
public static Registry getInstance()
protected abstract void init()
public abstract void putCodec(Format inputFormat, Format outputFormat, java.lang.String codecClass)
inputFormat
- The input format. Must not be null.outputFormat
- The output format. Must not be null.codecClass
- The codec class name. Must not be null.public final java.lang.String[] getDecoderClasses(Format format)
format
- The format.public final java.lang.String[] getEncoderClasses(Format format)
format
- The format.public abstract java.lang.String[] getCodecClasses(Format inputFormat, Format outputFormat)
inputFormat
- The input format.outputFormat
- The output format.public final Codec[] getDecoders(Format inputFormat)
inputFormat
- The input format.public Codec getDecoder(Format inputFormat)
inputFormat
- The output format.public final Codec[] getEncoders(Format outputFormat)
outputFormat
- The output format.public Codec getEncoder(Format outputFormat)
outputFormat
- The output format.public Codec[] getCodecs(Format inputFormat, Format outputFormat)
inputFormat
- The input format.outputFormat
- The output format.public Codec getCodec(Format inputFormat, Format outputFormat)
inputFormat
- The input format.outputFormat
- The output format.public abstract void putReader(Format fileFormat, java.lang.String readerClass)
fileFormat
- The file format, e.g."video/avi", "video/quicktime".
Use "Java" for formats which are not tied to a file format. Must not be
null.readerClass
- The reader class name. Must not be null.public abstract void putWriter(Format fileFormat, java.lang.String writerClass)
fileFormat
- The file format, e.g."video/avi", "video/quicktime".
Use "Java" for formats which are not tied to a file format. Must not be
null.writerClass
- The writer class name. Must not be null.public abstract java.lang.String[] getReaderClasses(Format fileFormat)
fileFormat
- The file format, e.g."AVI", "QuickTime".public abstract java.lang.String[] getWriterClasses(Format fileFormat)
fileFormat
- The file format, e.g."AVI", "QuickTime".public MovieReader getReader(Format fileFormat, java.io.File file)
public MovieWriter getWriter(java.io.File file)
public MovieWriter getWriter(Format fileFormat, java.io.File file)
public MovieReader getReader(java.io.File file)
public abstract void putFileFormat(java.lang.String extension, Format format)
public abstract Format getFileFormat(java.io.File file)
public abstract Format[] getReaderFormats()
public abstract Format[] getWriterFormats()
public abstract Format[] getFileFormats()
public abstract java.lang.String getExtension(Format ff)
public java.util.ArrayList<Format> suggestOutputFormats(Format inputMediaFormat, Format outputFileFormat)
inputMediaFormat
- outputFileFormat
- public abstract void unregisterCodec(java.lang.String codecClass)