Interface Codec.EncoderFactory
-
-
Field Summary
Fields Modifier and Type Field Description static Codec.EncoderFactory
DEFAULT
A defaultEncoderFactory
implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Codec
createForAudioEncoding(Format format, List<String> allowedMimeTypes)
Returns aCodec
for audio encoding.Codec
createForVideoEncoding(Format format, List<String> allowedMimeTypes)
Returns aCodec
for video encoding.
-
-
-
Field Detail
-
DEFAULT
static final Codec.EncoderFactory DEFAULT
A defaultEncoderFactory
implementation.
-
-
Method Detail
-
createForAudioEncoding
Codec createForAudioEncoding(Format format, List<String> allowedMimeTypes) throws TransformationException
Returns aCodec
for audio encoding.This method must validate that the
Codec
is configured to produce one of theallowedMimeTypes
. Thesample MIME type
given informat
is not necessarily allowed.- Parameters:
format
- TheFormat
(of the output data) used to determine the underlyingMediaCodec
and 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 aCodec
for video encoding.This method must validate that the
Codec
is configured to produce one of theallowedMimeTypes
. Thesample MIME type
given informat
is not necessarily allowed.- Parameters:
format
- TheFormat
(of the output data) used to determine the underlyingMediaCodec
and its configuration values.Format.sampleMimeType
,Format.width
andFormat.height
must be set to those of the desired output video format.Format.rotationDegrees
should 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.
-
-