public final class FfmpegAudioRenderer extends SimpleDecoderAudioRenderer
STATE_DISABLED, STATE_ENABLED, STATE_STARTEDADAPTIVE_NOT_SEAMLESS, ADAPTIVE_NOT_SUPPORTED, ADAPTIVE_SEAMLESS, ADAPTIVE_SUPPORT_MASK, FORMAT_EXCEEDS_CAPABILITIES, FORMAT_HANDLED, FORMAT_SUPPORT_MASK, FORMAT_UNSUPPORTED_DRM, FORMAT_UNSUPPORTED_SUBTYPE, FORMAT_UNSUPPORTED_TYPE, TUNNELING_NOT_SUPPORTED, TUNNELING_SUPPORT_MASK, TUNNELING_SUPPORTED| Constructor and Description |
|---|
FfmpegAudioRenderer() |
FfmpegAudioRenderer(Handler eventHandler,
AudioRendererEventListener eventListener,
AudioProcessor... audioProcessors) |
| Modifier and Type | Method and Description |
|---|---|
protected com.google.android.exoplayer2.ext.ffmpeg.FfmpegDecoder |
createDecoder(Format format,
ExoMediaCrypto mediaCrypto)
Creates a decoder for the given format.
|
Format |
getOutputFormat()
Returns the format of audio buffers output by the decoder.
|
protected int |
supportsFormatInternal(Format format)
Returns the
RendererCapabilities.FORMAT_SUPPORT_MASK component of the return value for
SimpleDecoderAudioRenderer.supportsFormat(Format). |
int |
supportsMixedMimeTypeAdaptation()
Returns the extent to which the
Renderer supports adapting between supported formats
that have different mime types. |
getMediaClock, getPlaybackParameters, getPositionUs, handleMessage, isEnded, isReady, onAudioSessionId, onAudioTrackPositionDiscontinuity, onAudioTrackUnderrun, onDisabled, onEnabled, onPositionReset, onStarted, onStopped, render, setPlaybackParameters, supportsFormatdisable, enable, getCapabilities, getConfiguration, getIndex, getState, getStream, getTrackType, hasReadStreamToEnd, isCurrentStreamFinal, isSourceReady, maybeThrowStreamError, onStreamChanged, readSource, replaceStream, resetPosition, setCurrentStreamFinal, setIndex, skipSource, start, stoppublic FfmpegAudioRenderer()
public FfmpegAudioRenderer(Handler eventHandler, AudioRendererEventListener eventListener, AudioProcessor... audioProcessors)
eventHandler - A handler to use when delivering events to eventListener. May be
null if delivery of events is not required.eventListener - A listener of events. May be null if delivery of events is not required.audioProcessors - Optional AudioProcessors that will process audio before output.protected int supportsFormatInternal(Format format)
SimpleDecoderAudioRendererRendererCapabilities.FORMAT_SUPPORT_MASK component of the return value for
SimpleDecoderAudioRenderer.supportsFormat(Format).supportsFormatInternal in class SimpleDecoderAudioRendererformat - The format.public final int supportsMixedMimeTypeAdaptation()
throws ExoPlaybackException
RendererCapabilitiesRenderer supports adapting between supported formats
that have different mime types.supportsMixedMimeTypeAdaptation in interface RendererCapabilitiessupportsMixedMimeTypeAdaptation in class BaseRendererRendererCapabilities.ADAPTIVE_SEAMLESS, RendererCapabilities.ADAPTIVE_NOT_SEAMLESS and
RendererCapabilities.ADAPTIVE_NOT_SUPPORTED.ExoPlaybackException - If an error occurs.protected com.google.android.exoplayer2.ext.ffmpeg.FfmpegDecoder createDecoder(Format format, ExoMediaCrypto mediaCrypto) throws FfmpegDecoderException
SimpleDecoderAudioRenderercreateDecoder in class SimpleDecoderAudioRendererformat - The format for which a decoder is required.mediaCrypto - The ExoMediaCrypto object required for decoding encrypted content.
Maybe null and can be ignored if decoder does not handle encrypted content.FfmpegDecoderExceptionpublic Format getOutputFormat()
SimpleDecoderAudioRendererThe default implementation returns a 16-bit PCM format with the same channel count and sample rate as the input.
getOutputFormat in class SimpleDecoderAudioRenderer