PlayerMessage.Target
, Renderer
, RendererCapabilities
, MediaClock
public class MediaCodecAudioRenderer extends MediaCodecRenderer implements MediaClock
MediaCodec
and an AudioSink
.
This renderer accepts the following messages sent via ExoPlayer.createMessage(Target)
on the playback thread:
Renderer.MSG_SET_VOLUME
to set the volume. The message payload should be
a Float
with 0 being silence and 1 being unity gain.
Renderer.MSG_SET_AUDIO_ATTRIBUTES
to set the audio attributes. The
message payload should be an AudioAttributes
instance that will configure the underlying audio track.
Renderer.MSG_SET_AUX_EFFECT_INFO
to set the auxiliary effect. The message
payload should be an AuxEffectInfo
instance that will configure the underlying
audio track.
Renderer.MSG_SET_SKIP_SILENCE_ENABLED
to enable or disable skipping
silences. The message payload should be a Boolean
.
Renderer.MSG_SET_AUDIO_SESSION_ID
to set the audio session ID. The
message payload should be a session ID Integer
that will be attached to the
underlying audio track.
MediaCodecRenderer.DecoderInitializationException, MediaCodecRenderer.KeepCodecResult, MediaCodecRenderer.MediaCodecOperationMode
Renderer.State, Renderer.VideoScalingMode, Renderer.WakeupListener
RendererCapabilities.AdaptiveSupport, RendererCapabilities.Capabilities, RendererCapabilities.FormatSupport, RendererCapabilities.TunnelingSupport
CODEC_OPERATING_RATE_UNSET, decoderCounters, KEEP_CODEC_RESULT_NO, KEEP_CODEC_RESULT_YES_WITH_FLUSH, KEEP_CODEC_RESULT_YES_WITH_RECONFIGURATION, KEEP_CODEC_RESULT_YES_WITHOUT_RECONFIGURATION, OPERATION_MODE_ASYNCHRONOUS_DEDICATED_THREAD, OPERATION_MODE_ASYNCHRONOUS_DEDICATED_THREAD_ASYNCHRONOUS_QUEUEING, OPERATION_MODE_SYNCHRONOUS
MSG_CUSTOM_BASE, MSG_SET_AUDIO_ATTRIBUTES, MSG_SET_AUDIO_SESSION_ID, MSG_SET_AUX_EFFECT_INFO, MSG_SET_CAMERA_MOTION_LISTENER, MSG_SET_SCALING_MODE, MSG_SET_SKIP_SILENCE_ENABLED, MSG_SET_SURFACE, MSG_SET_VIDEO_DECODER_OUTPUT_BUFFER_RENDERER, MSG_SET_VIDEO_FRAME_METADATA_LISTENER, MSG_SET_VOLUME, MSG_SET_WAKEUP_LISTENER, STATE_DISABLED, STATE_ENABLED, STATE_STARTED, VIDEO_SCALING_MODE_DEFAULT, VIDEO_SCALING_MODE_SCALE_TO_FIT, VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
ADAPTIVE_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 | Description |
---|---|
MediaCodecAudioRenderer(Context context,
MediaCodecSelector mediaCodecSelector) |
|
MediaCodecAudioRenderer(Context context,
MediaCodecSelector mediaCodecSelector,
boolean enableDecoderFallback,
Handler eventHandler,
AudioRendererEventListener eventListener,
AudioSink audioSink) |
|
MediaCodecAudioRenderer(Context context,
MediaCodecSelector mediaCodecSelector,
Handler eventHandler,
AudioRendererEventListener eventListener) |
|
MediaCodecAudioRenderer(Context context,
MediaCodecSelector mediaCodecSelector,
Handler eventHandler,
AudioRendererEventListener eventListener,
AudioCapabilities audioCapabilities,
AudioProcessor... audioProcessors) |
|
MediaCodecAudioRenderer(Context context,
MediaCodecSelector mediaCodecSelector,
Handler eventHandler,
AudioRendererEventListener eventListener,
AudioSink audioSink) |
Modifier and Type | Method | Description |
---|---|---|
protected int |
canKeepCodec(MediaCodec codec,
MediaCodecInfo codecInfo,
Format oldFormat,
Format newFormat) |
Determines whether the existing
MediaCodec can be kept for a new Format , and if
it can whether it requires reconfiguration. |
protected boolean |
canKeepCodecWithFlush(Format oldFormat,
Format newFormat) |
Returns whether the codec can be flushed and reused when switching to a new format.
|
protected void |
configureCodec(MediaCodecInfo codecInfo,
MediaCodecAdapter codecAdapter,
Format format,
MediaCrypto crypto,
float codecOperatingRate) |
Configures a newly created
MediaCodec . |
void |
experimentalSetEnableKeepAudioTrackOnSeek(boolean enableKeepAudioTrackOnSeek) |
Sets whether to enable the experimental feature that keeps and flushes the
AudioTrack when a seek occurs, as opposed to releasing and reinitialising. |
protected int |
getCodecMaxInputSize(MediaCodecInfo codecInfo,
Format format,
Format[] streamFormats) |
Returns a maximum input size suitable for configuring a codec for
format in a way that
will allow possible adaptation to other compatible formats in streamFormats . |
protected float |
getCodecOperatingRateV23(float operatingRate,
Format format,
Format[] streamFormats) |
Returns the
MediaFormat.KEY_OPERATING_RATE value for a given renderer operating rate,
current Format and set of possible stream formats. |
protected List<MediaCodecInfo> |
getDecoderInfos(MediaCodecSelector mediaCodecSelector,
Format format,
boolean requiresSecureDecoder) |
Returns a list of decoders that can decode media in the specified format, in priority order.
|
MediaClock |
getMediaClock() |
If the renderer advances its own playback position then this method returns a corresponding
MediaClock . |
protected MediaFormat |
getMediaFormat(Format format,
String codecMimeType,
int codecMaxInputSize,
float codecOperatingRate) |
Returns the framework
MediaFormat that can be used to configure a MediaCodec
for decoding the given Format for playback. |
String |
getName() |
Returns the name of this renderer, for logging and debugging purposes.
|
PlaybackParameters |
getPlaybackParameters() |
Returns the active playback parameters.
|
long |
getPositionUs() |
Returns the current media position in microseconds.
|
void |
handleMessage(int messageType,
Object message) |
Handles a message delivered to the target.
|
boolean |
isEnded() |
Whether the renderer is ready for the
ExoPlayer instance to transition to Player.STATE_ENDED . |
boolean |
isReady() |
Whether the renderer is able to immediately render media from the current position.
|
protected void |
onAudioSessionId(int audioSessionId) |
Called when the audio session id becomes known.
|
protected void |
onCodecInitialized(String name,
long initializedTimestampMs,
long initializationDurationMs) |
Called when a
MediaCodec has been created and configured. |
protected void |
onDisabled() |
Called when the renderer is disabled.
|
protected void |
onEnabled(boolean joining,
boolean mayRenderStartOfStream) |
Called when the renderer is enabled.
|
protected void |
onInputFormatChanged(FormatHolder formatHolder) |
Called when a new
Format is read from the upstream MediaPeriod . |
protected void |
onOutputFormatChanged(Format format,
MediaFormat mediaFormat) |
Called when one of the output formats changes.
|
protected void |
onPositionDiscontinuity() |
|
protected void |
onPositionReset(long positionUs,
boolean joining) |
Called when the position is reset.
|
protected void |
onProcessedStreamChange() |
Called after the last output buffer before a stream change has been processed.
|
protected void |
onQueueInputBuffer(DecoderInputBuffer buffer) |
Called immediately before an input buffer is queued into the codec.
|
protected void |
onReset() |
Called when the renderer is reset.
|
protected void |
onStarted() |
Called when the renderer is started.
|
protected void |
onStopped() |
Called when the renderer is stopped.
|
protected boolean |
processOutputBuffer(long positionUs,
long elapsedRealtimeUs,
MediaCodec codec,
ByteBuffer buffer,
int bufferIndex,
int bufferFlags,
int sampleCount,
long bufferPresentationTimeUs,
boolean isDecodeOnlyBuffer,
boolean isLastBuffer,
Format format) |
Processes an output media buffer.
|
protected void |
renderToEndOfStream() |
Incrementally renders any remaining output.
|
void |
setPlaybackParameters(PlaybackParameters playbackParameters) |
Attempts to set the playback parameters.
|
protected boolean |
shouldUseBypass(Format format) |
Returns whether buffers in the input format can be processed without a codec.
|
protected int |
supportsFormat(MediaCodecSelector mediaCodecSelector,
Format format) |
Returns the
RendererCapabilities.Capabilities for the given Format . |
createRendererException, disable, enable, getCapabilities, getConfiguration, getFormatHolder, getIndex, getLastResetPositionUs, getReadingPositionUs, getState, getStream, getStreamFormats, getTrackType, hasReadStreamToEnd, isCurrentStreamFinal, isSourceReady, maybeThrowStreamError, readSource, replaceStream, reset, resetPosition, setCurrentStreamFinal, setIndex, skipSource, start, stop
createDecoderException, experimentalSetMediaCodecOperationMode, flushOrReinitializeCodec, flushOrReleaseCodec, getCodec, getCodecInfo, getCodecNeedsEosPropagation, getCodecOperatingRate, getCodecOutputMediaFormat, getInputFormat, getLargestQueuedPresentationTimeUs, getOperatingRate, getOutputFormat, getOutputStreamOffsetUs, getOutputStreamStartPositionUs, handleInputBufferSupplementalData, legacyKeepAvailableCodecInfosWithoutCodec, maybeInitCodecOrBypass, onProcessedOutputBuffer, onStreamChanged, releaseCodec, render, resetCodecStateForFlush, resetCodecStateForRelease, setOperatingRate, setPendingOutputEndOfStream, setPendingPlaybackException, setRenderTimeLimitMs, shouldInitCodec, supportsFormat, supportsFormatDrm, supportsMixedMimeTypeAdaptation, updateOutputFormatForTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MediaCodecAudioRenderer(Context context, MediaCodecSelector mediaCodecSelector)
context
- A context.mediaCodecSelector
- A decoder selector.public MediaCodecAudioRenderer(Context context, MediaCodecSelector mediaCodecSelector, @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener)
context
- A context.mediaCodecSelector
- A decoder selector.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.public MediaCodecAudioRenderer(Context context, MediaCodecSelector mediaCodecSelector, @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, @Nullable AudioCapabilities audioCapabilities, AudioProcessor... audioProcessors)
context
- A context.mediaCodecSelector
- A decoder selector.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.audioCapabilities
- The audio capabilities for playback on this device. May be null if the
default capabilities (no encoded audio passthrough support) should be assumed.audioProcessors
- Optional AudioProcessor
s that will process PCM audio before
output.public MediaCodecAudioRenderer(Context context, MediaCodecSelector mediaCodecSelector, @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, AudioSink audioSink)
context
- A context.mediaCodecSelector
- A decoder selector.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.audioSink
- The sink to which audio will be output.public MediaCodecAudioRenderer(Context context, MediaCodecSelector mediaCodecSelector, boolean enableDecoderFallback, @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, AudioSink audioSink)
context
- A context.mediaCodecSelector
- A decoder selector.enableDecoderFallback
- Whether to enable fallback to lower-priority decoders if decoder
initialization fails. This may result in using a decoder that is slower/less efficient than
the primary decoder.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.audioSink
- The sink to which audio will be output.public String getName()
Renderer
getName
in interface Renderer
getName
in interface RendererCapabilities
public void experimentalSetEnableKeepAudioTrackOnSeek(boolean enableKeepAudioTrackOnSeek)
AudioTrack
when a seek occurs, as opposed to releasing and reinitialising. Off
by default.
This method is experimental, and will be renamed or removed in a future release.
enableKeepAudioTrackOnSeek
- Whether to keep the AudioTrack
on seek.@Capabilities protected int supportsFormat(MediaCodecSelector mediaCodecSelector, Format format) throws MediaCodecUtil.DecoderQueryException
MediaCodecRenderer
RendererCapabilities.Capabilities
for the given Format
.supportsFormat
in class MediaCodecRenderer
mediaCodecSelector
- The decoder selector.format
- The Format
.RendererCapabilities.Capabilities
for this Format
.MediaCodecUtil.DecoderQueryException
- If there was an error querying decoders.protected List<MediaCodecInfo> getDecoderInfos(MediaCodecSelector mediaCodecSelector, Format format, boolean requiresSecureDecoder) throws MediaCodecUtil.DecoderQueryException
MediaCodecRenderer
getDecoderInfos
in class MediaCodecRenderer
mediaCodecSelector
- The decoder selector.format
- The Format
for which a decoder is required.requiresSecureDecoder
- Whether a secure decoder is required.MediaCodecInfo
s corresponding to decoders. May be empty.MediaCodecUtil.DecoderQueryException
- Thrown if there was an error querying decoders.protected boolean shouldUseBypass(Format format)
MediaCodecRenderer
This method is only called if the content is not DRM protected, because if the content is DRM protected use of bypass is never possible.
shouldUseBypass
in class MediaCodecRenderer
format
- The input Format
.MediaCodec
is supported.protected void configureCodec(MediaCodecInfo codecInfo, MediaCodecAdapter codecAdapter, Format format, @Nullable MediaCrypto crypto, float codecOperatingRate)
MediaCodecRenderer
MediaCodec
.configureCodec
in class MediaCodecRenderer
codecInfo
- Information about the MediaCodec
being configured.codecAdapter
- The MediaCodecAdapter
to configure.format
- The Format
for which the codec is being configured.crypto
- For drm protected playbacks, a MediaCrypto
to use for decryption.codecOperatingRate
- The codec operating rate, or MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET
if
no codec operating rate should be set.@KeepCodecResult protected int canKeepCodec(MediaCodec codec, MediaCodecInfo codecInfo, Format oldFormat, Format newFormat)
MediaCodecRenderer
MediaCodec
can be kept for a new Format
, and if
it can whether it requires reconfiguration.
The default implementation returns MediaCodecRenderer.KEEP_CODEC_RESULT_NO
.
canKeepCodec
in class MediaCodecRenderer
codec
- The existing MediaCodec
instance.codecInfo
- A MediaCodecInfo
describing the decoder.oldFormat
- The Format
for which the existing instance is configured.newFormat
- The new Format
.protected boolean canKeepCodecWithFlush(Format oldFormat, Format newFormat)
MediaFormat.KEY_MAX_INPUT_SIZE
and configuration that does not come
from the Format
).oldFormat
- The first format.newFormat
- The second format.@Nullable public MediaClock getMediaClock()
Renderer
MediaClock
. If provided, the player will use the returned MediaClock
as its
source of time during playback. A player may have at most one renderer that returns a MediaClock
from this method.getMediaClock
in interface Renderer
getMediaClock
in class BaseRenderer
MediaClock
tracking the playback position of the renderer, or null.protected float getCodecOperatingRateV23(float operatingRate, Format format, Format[] streamFormats)
MediaCodecRenderer
MediaFormat.KEY_OPERATING_RATE
value for a given renderer operating rate,
current Format
and set of possible stream formats.
The default implementation returns MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET
.
getCodecOperatingRateV23
in class MediaCodecRenderer
operatingRate
- The renderer operating rate.format
- The Format
for which the codec is being configured.streamFormats
- The possible stream formats.MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET
if no codec operating
rate should be set.protected void onCodecInitialized(String name, long initializedTimestampMs, long initializationDurationMs)
MediaCodecRenderer
MediaCodec
has been created and configured.
The default implementation is a no-op.
onCodecInitialized
in class MediaCodecRenderer
name
- The name of the codec that was initialized.initializedTimestampMs
- SystemClock.elapsedRealtime()
when initialization
finished.initializationDurationMs
- The time taken to initialize the codec in milliseconds.protected void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException
MediaCodecRenderer
Format
is read from the upstream MediaPeriod
.onInputFormatChanged
in class MediaCodecRenderer
formatHolder
- A FormatHolder
that holds the new Format
.ExoPlaybackException
- If an error occurs re-initializing the MediaCodec
.protected void onOutputFormatChanged(Format format, @Nullable MediaFormat mediaFormat) throws ExoPlaybackException
MediaCodecRenderer
The default implementation is a no-op.
onOutputFormatChanged
in class MediaCodecRenderer
format
- The input Format
to which future output now corresponds. If the renderer
is in bypass mode, this is also the output format.mediaFormat
- The codec output MediaFormat
, or null
if the renderer is in
bypass mode.ExoPlaybackException
- Thrown if an error occurs configuring the output.protected void onAudioSessionId(int audioSessionId)
Virtualizer
in
order to spatialize the audio channels. For this use case, any Virtualizer
instances
should be released in onDisabled()
(if not before).
@CallSuper protected void onPositionDiscontinuity()
protected void onEnabled(boolean joining, boolean mayRenderStartOfStream) throws ExoPlaybackException
BaseRenderer
The default implementation is a no-op.
onEnabled
in class MediaCodecRenderer
joining
- Whether this renderer is being enabled to join an ongoing playback.mayRenderStartOfStream
- Whether this renderer is allowed to render the start of the
stream even if the state is not Renderer.STATE_STARTED
yet.ExoPlaybackException
- If an error occurs.protected void onPositionReset(long positionUs, boolean joining) throws ExoPlaybackException
BaseRenderer
BaseRenderer.onStreamChanged(Format[], long, long)
has been called, and also when a position discontinuity
is encountered.
After a position reset, the renderer's SampleStream
is guaranteed to provide samples
starting from a key frame.
The default implementation is a no-op.
onPositionReset
in class MediaCodecRenderer
positionUs
- The new playback position in microseconds.joining
- Whether this renderer is being enabled to join an ongoing playback.ExoPlaybackException
- If an error occurs.protected void onStarted()
BaseRenderer
The default implementation is a no-op.
onStarted
in class MediaCodecRenderer
protected void onStopped()
BaseRenderer
The default implementation is a no-op.
onStopped
in class MediaCodecRenderer
protected void onDisabled()
BaseRenderer
The default implementation is a no-op.
onDisabled
in class MediaCodecRenderer
protected void onReset()
BaseRenderer
The default implementation is a no-op.
onReset
in class MediaCodecRenderer
public boolean isEnded()
Renderer
ExoPlayer
instance to transition to Player.STATE_ENDED
. The player will make this transition as soon as true
is returned
by all of its renderers.
This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED
, Renderer.STATE_STARTED
.
isEnded
in interface Renderer
isEnded
in class MediaCodecRenderer
public boolean isReady()
Renderer
If the renderer is in the Renderer.STATE_STARTED
state then returning true indicates that the
renderer has everything that it needs to continue playback. Returning false indicates that
the player should pause until the renderer is ready.
If the renderer is in the Renderer.STATE_ENABLED
state then returning true indicates that the
renderer is ready for playback to be started. Returning false indicates that it is not.
This method may be called when the renderer is in the following states:
Renderer.STATE_ENABLED
, Renderer.STATE_STARTED
.
isReady
in interface Renderer
isReady
in class MediaCodecRenderer
public long getPositionUs()
MediaClock
getPositionUs
in interface MediaClock
public void setPlaybackParameters(PlaybackParameters playbackParameters)
MediaClock
setPlaybackParameters
in interface MediaClock
playbackParameters
- The playback parameters to attempt to set.public PlaybackParameters getPlaybackParameters()
MediaClock
getPlaybackParameters
in interface MediaClock
protected void onQueueInputBuffer(DecoderInputBuffer buffer)
MediaCodecRenderer
The default implementation is a no-op.
onQueueInputBuffer
in class MediaCodecRenderer
buffer
- The buffer to be queued.protected void onProcessedStreamChange()
MediaCodecRenderer
onProcessedStreamChange
in class MediaCodecRenderer
protected boolean processOutputBuffer(long positionUs, long elapsedRealtimeUs, @Nullable MediaCodec codec, @Nullable ByteBuffer buffer, int bufferIndex, int bufferFlags, int sampleCount, long bufferPresentationTimeUs, boolean isDecodeOnlyBuffer, boolean isLastBuffer, Format format) throws ExoPlaybackException
MediaCodecRenderer
When a new ByteBuffer
is passed to this method its position and limit delineate the
data to be processed. The return value indicates whether the buffer was processed in full. If
true is returned then the next call to this method will receive a new buffer to be processed.
If false is returned then the same buffer will be passed to the next call. An implementation of
this method is free to modify the buffer and can assume that the buffer will not be externally
modified between successive calls. Hence an implementation can, for example, modify the
buffer's position to keep track of how much of the data it has processed.
Note that the first call to this method following a call to MediaCodecRenderer.onPositionReset(long,
boolean)
will always receive a new ByteBuffer
to be processed.
processOutputBuffer
in class MediaCodecRenderer
positionUs
- The current media time in microseconds, measured at the start of the current
iteration of the rendering loop.elapsedRealtimeUs
- SystemClock.elapsedRealtime()
in microseconds, measured at the
start of the current iteration of the rendering loop.codec
- The MediaCodec
instance, or null in bypass mode were no codec is used.buffer
- The output buffer to process, or null if the buffer data is not made available to
the application layer (see MediaCodec.getOutputBuffer(int)
). This buffer
can only be null for video data. Note that the buffer data can still be rendered in this
case by using the bufferIndex
.bufferIndex
- The index of the output buffer.bufferFlags
- The flags attached to the output buffer.sampleCount
- The number of samples extracted from the sample queue in the buffer. This
allows handling multiple samples as a batch for efficiency.bufferPresentationTimeUs
- The presentation time of the output buffer in microseconds.isDecodeOnlyBuffer
- Whether the buffer was marked with C.BUFFER_FLAG_DECODE_ONLY
by the source.isLastBuffer
- Whether the buffer is the last sample of the current stream.format
- The Format
associated with the buffer.ExoPlaybackException
- If an error occurs processing the output buffer.protected void renderToEndOfStream() throws ExoPlaybackException
MediaCodecRenderer
The default implementation is a no-op.
renderToEndOfStream
in class MediaCodecRenderer
ExoPlaybackException
- Thrown if an error occurs rendering remaining output.public void handleMessage(int messageType, @Nullable Object message) throws ExoPlaybackException
PlayerMessage.Target
handleMessage
in interface PlayerMessage.Target
handleMessage
in class BaseRenderer
messageType
- The message type.message
- The message payload.ExoPlaybackException
- If an error occurred whilst handling the message. Should only be
thrown by targets that handle messages on the playback thread.protected int getCodecMaxInputSize(MediaCodecInfo codecInfo, Format format, Format[] streamFormats)
format
in a way that
will allow possible adaptation to other compatible formats in streamFormats
.codecInfo
- A MediaCodecInfo
describing the decoder.format
- The Format
for which the codec is being configured.streamFormats
- The possible stream formats.protected MediaFormat getMediaFormat(Format format, String codecMimeType, int codecMaxInputSize, float codecOperatingRate)
MediaFormat
that can be used to configure a MediaCodec
for decoding the given Format
for playback.format
- The Format
of the media.codecMimeType
- The MIME type handled by the codec.codecMaxInputSize
- The maximum input size supported by the codec.codecOperatingRate
- The codec operating rate, or MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET
if
no codec operating rate should be set.MediaFormat
.