Codec.EncoderFactory
interface Codec.EncoderFactory
DefaultEncoderFactory |
A default implementation of |
A factory for encoder instances.
Summary
Public functions |
|
|---|---|
Boolean |
Returns whether the audio needs to be encoded because of encoder specific configuration. |
Codec! |
createForAudioEncoding(format: Format!, logSessionId: LogSessionId?)Returns a |
Codec! |
createForVideoEncoding(format: Format!, logSessionId: LogSessionId?)Returns a |
Boolean |
Returns whether the video needs to be encoded because of encoder specific configuration. |
Public functions
audioNeedsEncoding
fun audioNeedsEncoding(): Boolean
Returns whether the audio needs to be encoded because of encoder specific configuration.
createForAudioEncoding
fun createForAudioEncoding(format: Format!, logSessionId: LogSessionId?): Codec!
Returns a Codec for audio encoding.
The caller should ensure the MIME type is supported on the device before calling this method.
codecs contains the codec string for the original input media that has been decoded and processed. This is provided only as a hint, and the factory may encode to a different format.
| Parameters | |
|---|---|
format: Format! |
The |
logSessionId: LogSessionId? |
The optional |
| Throws | |
|---|---|
androidx.media3.transformer.ExportException |
If no suitable |
createForVideoEncoding
fun createForVideoEncoding(format: Format!, logSessionId: LogSessionId?): Codec!
Returns a Codec for video encoding.
The caller should ensure the MIME type is supported on the device before calling this method. If encoding to HDR, the caller should also ensure the color characteristics are supported.
codecs contains the codec string for the original input media that has been decoded and processed. This is provided only as a hint, and the factory may encode to a different format.
| Parameters | |
|---|---|
format: Format! |
The |
logSessionId: LogSessionId? |
The optional |
| Throws | |
|---|---|
androidx.media3.transformer.ExportException |
If no suitable |
videoNeedsEncoding
fun videoNeedsEncoding(): Boolean
Returns whether the video needs to be encoded because of encoder specific configuration.