public abstract class Registry extends 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 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.
|
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.
|
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 String |
getExtension(Format ff) |
abstract Format |
getFileFormat(File file) |
abstract Format[] |
getFileFormats() |
static Registry |
getInstance() |
MovieReader |
getReader(File file) |
MovieReader |
getReader(Format fileFormat,
File file) |
abstract String[] |
getReaderClasses(Format fileFormat)
Gets all reader class names from the registry for the specified file
format.
|
abstract Format[] |
getReaderFormats() |
MovieWriter |
getWriter(File file) |
MovieWriter |
getWriter(Format fileFormat,
File file) |
abstract 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,
String codecClass)
Puts a codec into the registry.
|
abstract void |
putFileFormat(String extension,
Format format) |
abstract void |
putReader(Format fileFormat,
String readerClass)
Puts a reader into the registry.
|
abstract void |
putWriter(Format fileFormat,
String writerClass)
Puts a writer into the registry.
|
ArrayList<Format> |
suggestOutputFormats(Format inputMediaFormat,
Format outputFileFormat)
Suggests output formats for the given input media format and specified
file format.
|
abstract void |
unregisterCodec(String codecClass) |
public static Registry getInstance()
protected abstract void init()
public abstract void putCodec(Format inputFormat, Format outputFormat, 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 String[] getDecoderClasses(Format format)
format - The format.public final String[] getEncoderClasses(Format format)
format - The format.public abstract 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, 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, 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 String[] getReaderClasses(Format fileFormat)
fileFormat - The file format, e.g."AVI", "QuickTime".public abstract String[] getWriterClasses(Format fileFormat)
fileFormat - The file format, e.g."AVI", "QuickTime".public MovieReader getReader(Format fileFormat, File file)
public MovieWriter getWriter(File file)
public MovieWriter getWriter(Format fileFormat, File file)
public MovieReader getReader(File file)
public abstract Format[] getReaderFormats()
public abstract Format[] getWriterFormats()
public abstract Format[] getFileFormats()
public ArrayList<Format> suggestOutputFormats(Format inputMediaFormat, Format outputFileFormat)
inputMediaFormat - outputFileFormat - public abstract void unregisterCodec(String codecClass)
Copyright © 2014. All Rights Reserved.