Interface Codec.EncoderFactory
-
-
Field Summary
Fields Modifier and Type Field Description static Codec.EncoderFactoryDEFAULTA defaultEncoderFactoryimplementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CodeccreateForAudioEncoding(Format format, List<String> allowedMimeTypes)Returns aCodecfor audio encoding.CodeccreateForVideoEncoding(Format format, List<String> allowedMimeTypes)Returns aCodecfor video encoding.
-
-
-
Field Detail
-
DEFAULT
static final Codec.EncoderFactory DEFAULT
A defaultEncoderFactoryimplementation.
-
-
Method Detail
-
createForAudioEncoding
Codec createForAudioEncoding(Format format, List<String> allowedMimeTypes) throws TransformationException
Returns aCodecfor audio encoding.This method must validate that the
Codecis configured to produce one of theallowedMimeTypes. Thesample MIME typegiven informatis not necessarily allowed.- Parameters:
format- TheFormat(of the output data) used to determine the underlyingMediaCodecand its configuration values.allowedMimeTypes- The non-empty list of allowed output sampleMIME types.- Returns:
- A configured and started encoder wrapper.
- Throws:
TransformationException- If no suitable codec can be created.
-
createForVideoEncoding
Codec createForVideoEncoding(Format format, List<String> allowedMimeTypes) throws TransformationException
Returns aCodecfor video encoding.This method must validate that the
Codecis configured to produce one of theallowedMimeTypes. Thesample MIME typegiven informatis not necessarily allowed.- Parameters:
format- TheFormat(of the output data) used to determine the underlyingMediaCodecand its configuration values.Format.sampleMimeType,Format.widthandFormat.heightmust be set to those of the desired output video format.Format.rotationDegreesshould be 0. The video should always be in landscape orientation.allowedMimeTypes- The non-empty list of allowed output sampleMIME types.- Returns:
- A configured and started encoder wrapper.
- Throws:
TransformationException- If no suitable codec can be created.
-
-