- All Known Implementing Classes:
AbstractAudioCodec,AbstractCodec,AbstractPCMAudioCodec,AbstractVideoCodec,AdjustTimeCodec,AnimationCodec,AVIPCMAudioCodec,CodecChain,ColorAdjustCodec,DIBCodec,FFRtoVFRConverter,FrameRateConverter,JPEGCodec,PassThroughCodec,PNGCodec,QuickTimePCMAudioCodec,RawCodec,RunLengthCodec,ScaleImageCodec,TechSmithCodec,TrimTimeCodec,ZMBVCodec
public interface Codec
A
Codec processes a Buffer and stores the result in another
Buffer.- Author:
- Werner Randelshofer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe codec could not handle the input.static final intThe codec did not fully consume the input buffer.static final intThe codec successfully converted the input to output.static final intThe codec did not fully fill the output buffer. -
Method Summary
Modifier and TypeMethodDescriptionFormat[]Lists all of the input formats that this codec accepts.getName()Returns a human readable name of the codec.Format[]getOutputFormats(Format input) Lists all of the output formats that this codec can generate with the provided input format.intPerforms the media processing defined by this codec.voidreset()Resets the state of the codec.setInputFormat(Format input) Sets the input format.setOutputFormat(Format output) Sets the output format.
-
Field Details
-
CODEC_OK
static final int CODEC_OKThe codec successfully converted the input to output.- See Also:
-
CODEC_FAILED
static final int CODEC_FAILEDThe codec could not handle the input.- See Also:
-
CODEC_INPUT_NOT_CONSUMED
static final int CODEC_INPUT_NOT_CONSUMEDThe codec did not fully consume the input buffer. The codec has updated the input buffer to reflect the amount of data that it has processed. The codec must be called again with the same input buffer.- See Also:
-
CODEC_OUTPUT_NOT_FILLED
static final int CODEC_OUTPUT_NOT_FILLEDThe codec did not fully fill the output buffer. The codec has updated the output buffer to reflect the amount of data that it has processed. The codec must be called again with the same output buffer.- See Also:
-
-
Method Details
-
getInputFormats
Format[] getInputFormats()Lists all of the input formats that this codec accepts. -
getOutputFormats
Lists all of the output formats that this codec can generate with the provided input format. If the input format is null, returns all supported output formats. -
setInputFormat
Sets the input format. Returns the format that was actually set. This is the closest format that the Codec supports. Returns null if the specified format is not supported and no reasonable match could be found. -
getInputFormat
Format getInputFormat() -
setOutputFormat
Sets the output format. Returns the format that was actually set. This is the closest format that the Codec supports. Returns null if the specified format is not supported and no reasonable match could be found. -
getOutputFormat
Format getOutputFormat() -
process
Performs the media processing defined by this codec.Copies the data from the input buffer into the output buffer.
- Returns:
- A combination of processing flags.
-
getName
String getName()Returns a human readable name of the codec. -
reset
void reset()Resets the state of the codec.
-