media/docs/doc/reference/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.html
christosts 5588dcae21 Update javadoc for 2.15.1
#minor-release

PiperOrigin-RevId: 397976212
2021-09-21 14:35:18 +01:00

1919 lines
145 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>MediaCodecVideoRenderer (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MediaCodecVideoRenderer (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":9,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.video</a></div>
<h2 title="Class MediaCodecVideoRenderer" class="title">Class MediaCodecVideoRenderer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../BaseRenderer.html" title="class in com.google.android.exoplayer2">com.google.android.exoplayer2.BaseRenderer</a></li>
<li>
<ul class="inheritance">
<li><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">com.google.android.exoplayer2.mediacodec.MediaCodecRenderer</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.video.MediaCodecVideoRenderer</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../PlayerMessage.Target.html" title="interface in com.google.android.exoplayer2">PlayerMessage.Target</a></code>, <code><a href="../Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code>, <code><a href="../RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">MediaCodecVideoRenderer</span>
extends <a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></pre>
<div class="block">Decodes and renders video using <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a>.
<p>This renderer accepts the following messages sent via <a href="../ExoPlayer.html#createMessage(com.google.android.exoplayer2.PlayerMessage.Target)"><code>ExoPlayer.createMessage(Target)</code></a>
on the playback thread:
<ul>
<li>Message with type <a href="../Renderer.html#MSG_SET_VIDEO_OUTPUT"><code>Renderer.MSG_SET_VIDEO_OUTPUT</code></a> to set the output. The message payload
should be the target <a href="https://developer.android.com/reference/android/view/Surface.html" title="class or interface in android.view" class="externalLink" target="_top"><code>Surface</code></a>, or null to clear the output. Other non-null payloads
have the effect of clearing the output.
<li>Message with type <a href="../Renderer.html#MSG_SET_SCALING_MODE"><code>Renderer.MSG_SET_SCALING_MODE</code></a> to set the video scaling mode. The message
payload should be one of the integer scaling modes in <a href="../C.VideoScalingMode.html" title="annotation in com.google.android.exoplayer2"><code>C.VideoScalingMode</code></a>. Note that
the scaling mode only applies if the <a href="https://developer.android.com/reference/android/view/Surface.html" title="class or interface in android.view" class="externalLink" target="_top"><code>Surface</code></a> targeted by this renderer is owned by
a <a href="https://developer.android.com/reference/android/view/SurfaceView.html" title="class or interface in android.view" class="externalLink" target="_top"><code>SurfaceView</code></a>.
<li>Message with type <a href="../Renderer.html#MSG_SET_VIDEO_FRAME_METADATA_LISTENER"><code>Renderer.MSG_SET_VIDEO_FRAME_METADATA_LISTENER</code></a> to set a listener for
metadata associated with frames being rendered. The message payload should be the <a href="VideoFrameMetadataListener.html" title="interface in com.google.android.exoplayer2.video"><code>VideoFrameMetadataListener</code></a>, or null.
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video">MediaCodecVideoRenderer.CodecMaxValues</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.mediacodec.MediaCodecRenderer">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;com.google.android.exoplayer2.mediacodec.<a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></h3>
<code><a href="../mediacodec/MediaCodecRenderer.DecoderInitializationException.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer.DecoderInitializationException</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.Renderer">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.<a href="../Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></h3>
<code><a href="../Renderer.State.html" title="annotation in com.google.android.exoplayer2">Renderer.State</a>, <a href="../Renderer.VideoScalingMode.html" title="annotation in com.google.android.exoplayer2">Renderer.VideoScalingMode</a>, <a href="../Renderer.WakeupListener.html" title="interface in com.google.android.exoplayer2">Renderer.WakeupListener</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.RendererCapabilities">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.<a href="../RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a></h3>
<code><a href="../RendererCapabilities.AdaptiveSupport.html" title="annotation in com.google.android.exoplayer2">RendererCapabilities.AdaptiveSupport</a>, <a href="../RendererCapabilities.Capabilities.html" title="annotation in com.google.android.exoplayer2">RendererCapabilities.Capabilities</a>, <a href="../RendererCapabilities.FormatSupport.html" title="annotation in com.google.android.exoplayer2">RendererCapabilities.FormatSupport</a>, <a href="../RendererCapabilities.TunnelingSupport.html" title="annotation in com.google.android.exoplayer2">RendererCapabilities.TunnelingSupport</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.mediacodec.MediaCodecRenderer">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;com.google.android.exoplayer2.mediacodec.<a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></h3>
<code><a href="../mediacodec/MediaCodecRenderer.html#CODEC_OPERATING_RATE_UNSET">CODEC_OPERATING_RATE_UNSET</a>, <a href="../mediacodec/MediaCodecRenderer.html#decoderCounters">decoderCounters</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.Renderer">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;com.google.android.exoplayer2.<a href="../Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></h3>
<code><a href="../Renderer.html#MSG_CUSTOM_BASE">MSG_CUSTOM_BASE</a>, <a href="../Renderer.html#MSG_SET_AUDIO_ATTRIBUTES">MSG_SET_AUDIO_ATTRIBUTES</a>, <a href="../Renderer.html#MSG_SET_AUDIO_SESSION_ID">MSG_SET_AUDIO_SESSION_ID</a>, <a href="../Renderer.html#MSG_SET_AUX_EFFECT_INFO">MSG_SET_AUX_EFFECT_INFO</a>, <a href="../Renderer.html#MSG_SET_CAMERA_MOTION_LISTENER">MSG_SET_CAMERA_MOTION_LISTENER</a>, <a href="../Renderer.html#MSG_SET_SCALING_MODE">MSG_SET_SCALING_MODE</a>, <a href="../Renderer.html#MSG_SET_SKIP_SILENCE_ENABLED">MSG_SET_SKIP_SILENCE_ENABLED</a>, <a href="../Renderer.html#MSG_SET_VIDEO_FRAME_METADATA_LISTENER">MSG_SET_VIDEO_FRAME_METADATA_LISTENER</a>, <a href="../Renderer.html#MSG_SET_VIDEO_OUTPUT">MSG_SET_VIDEO_OUTPUT</a>, <a href="../Renderer.html#MSG_SET_VOLUME">MSG_SET_VOLUME</a>, <a href="../Renderer.html#MSG_SET_WAKEUP_LISTENER">MSG_SET_WAKEUP_LISTENER</a>, <a href="../Renderer.html#STATE_DISABLED">STATE_DISABLED</a>, <a href="../Renderer.html#STATE_ENABLED">STATE_ENABLED</a>, <a href="../Renderer.html#STATE_STARTED">STATE_STARTED</a>, <a href="../Renderer.html#VIDEO_SCALING_MODE_DEFAULT">VIDEO_SCALING_MODE_DEFAULT</a>, <a href="../Renderer.html#VIDEO_SCALING_MODE_SCALE_TO_FIT">VIDEO_SCALING_MODE_SCALE_TO_FIT</a>, <a href="../Renderer.html#VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING">VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.RendererCapabilities">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;com.google.android.exoplayer2.<a href="../RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a></h3>
<code><a href="../RendererCapabilities.html#ADAPTIVE_NOT_SEAMLESS">ADAPTIVE_NOT_SEAMLESS</a>, <a href="../RendererCapabilities.html#ADAPTIVE_NOT_SUPPORTED">ADAPTIVE_NOT_SUPPORTED</a>, <a href="../RendererCapabilities.html#ADAPTIVE_SEAMLESS">ADAPTIVE_SEAMLESS</a>, <a href="../RendererCapabilities.html#ADAPTIVE_SUPPORT_MASK">ADAPTIVE_SUPPORT_MASK</a>, <a href="../RendererCapabilities.html#FORMAT_EXCEEDS_CAPABILITIES">FORMAT_EXCEEDS_CAPABILITIES</a>, <a href="../RendererCapabilities.html#FORMAT_HANDLED">FORMAT_HANDLED</a>, <a href="../RendererCapabilities.html#FORMAT_SUPPORT_MASK">FORMAT_SUPPORT_MASK</a>, <a href="../RendererCapabilities.html#FORMAT_UNSUPPORTED_DRM">FORMAT_UNSUPPORTED_DRM</a>, <a href="../RendererCapabilities.html#FORMAT_UNSUPPORTED_SUBTYPE">FORMAT_UNSUPPORTED_SUBTYPE</a>, <a href="../RendererCapabilities.html#FORMAT_UNSUPPORTED_TYPE">FORMAT_UNSUPPORTED_TYPE</a>, <a href="../RendererCapabilities.html#TUNNELING_NOT_SUPPORTED">TUNNELING_NOT_SUPPORTED</a>, <a href="../RendererCapabilities.html#TUNNELING_SUPPORT_MASK">TUNNELING_SUPPORT_MASK</a>, <a href="../RendererCapabilities.html#TUNNELING_SUPPORTED">TUNNELING_SUPPORTED</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long,boolean,android.os.Handler,com.google.android.exoplayer2.video.VideoRendererEventListener,int)">MediaCodecVideoRenderer</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecAdapter.Factory.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter.Factory</a>&nbsp;codecAdapterFactory,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs,
boolean&nbsp;enableDecoderFallback,
<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a>&nbsp;eventHandler,
<a href="VideoRendererEventListener.html" title="interface in com.google.android.exoplayer2.video">VideoRendererEventListener</a>&nbsp;eventListener,
int&nbsp;maxDroppedFramesToNotify)</code></th>
<td class="colLast">
<div class="block">Creates a new instance.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector)">MediaCodecVideoRenderer</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long)">MediaCodecVideoRenderer</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long,boolean,android.os.Handler,com.google.android.exoplayer2.video.VideoRendererEventListener,int)">MediaCodecVideoRenderer</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs,
boolean&nbsp;enableDecoderFallback,
<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a>&nbsp;eventHandler,
<a href="VideoRendererEventListener.html" title="interface in com.google.android.exoplayer2.video">VideoRendererEventListener</a>&nbsp;eventListener,
int&nbsp;maxDroppedFramesToNotify)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long,android.os.Handler,com.google.android.exoplayer2.video.VideoRendererEventListener,int)">MediaCodecVideoRenderer</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs,
<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a>&nbsp;eventHandler,
<a href="VideoRendererEventListener.html" title="interface in com.google.android.exoplayer2.video">VideoRendererEventListener</a>&nbsp;eventListener,
int&nbsp;maxDroppedFramesToNotify)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected <a href="../decoder/DecoderReuseEvaluation.html" title="class in com.google.android.exoplayer2.decoder">DecoderReuseEvaluation</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#canReuseCodec(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format)">canReuseCodec</a></span>&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;oldFormat,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;newFormat)</code></th>
<td class="colLast">
<div class="block">Evaluates whether the existing <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink"><code>MediaCodec</code></a> can be kept for a new <a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top"><code>Format</code></a>, and if
it can whether it requires reconfiguration.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#codecNeedsSetOutputSurfaceWorkaround(java.lang.String)">codecNeedsSetOutputSurfaceWorkaround</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Returns whether the codec is known to implement <a href="https://developer.android.com/reference/android/media/MediaCodec.html#setOutputSurface(android.view.Surface)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec.setOutputSurface(Surface)</code></a>
incorrectly.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected <a href="../mediacodec/MediaCodecDecoderException.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecDecoderException</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createDecoderException(java.lang.Throwable,com.google.android.exoplayer2.mediacodec.MediaCodecInfo)">createDecoderException</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/Throwable.html" title="class or interface in java.lang" class="externalLink" target="_top">Throwable</a>&nbsp;cause,
<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dropOutputBuffer(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long)">dropOutputBuffer</a></span>&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs)</code></th>
<td class="colLast">
<div class="block">Drops the output buffer with the specified index.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected <a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video">MediaCodecVideoRenderer.CodecMaxValues</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCodecMaxValues(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format%5B%5D)">getCodecMaxValues</a></span>&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;streamFormats)</code></th>
<td class="colLast">
<div class="block">Returns <a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video"><code>MediaCodecVideoRenderer.CodecMaxValues</code></a> suitable for configuring a codec for <code>format</code> in a way
that will allow possible adaptation to other compatible formats in <code>streamFormats</code>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCodecNeedsEosPropagation()">getCodecNeedsEosPropagation</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the codec needs the renderer to propagate the end-of-stream signal directly,
rather than by using an end-of-stream buffer queued to the codec.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCodecOperatingRateV23(float,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format%5B%5D)">getCodecOperatingRateV23</a></span>&#8203;(float&nbsp;targetPlaybackSpeed,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;streamFormats)</code></th>
<td class="colLast">
<div class="block">Returns the <a href="https://developer.android.com/reference/android/media/MediaFormat.html#KEY_OPERATING_RATE" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaFormat.KEY_OPERATING_RATE</code></a> value for a given playback speed, current
<a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> and set of possible stream formats.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected <a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec" target="_top">MediaCodecInfo</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDecoderInfos(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format,boolean)">getDecoderInfos</a></span>&#8203;(<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
boolean&nbsp;requiresSecureDecoder)</code></th>
<td class="colLast">
<div class="block">Returns a list of decoders that can decode media in the specified format, in priority order.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxInputSize(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format)">getMaxInputSize</a></span>&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format)</code></th>
<td class="colLast">
<div class="block">Returns a maximum input buffer size for a given <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink"><code>MediaCodec</code></a> and <a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top"><code>Format</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected <a href="../mediacodec/MediaCodecAdapter.Configuration.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter.Configuration</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMediaCodecConfiguration(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,android.media.MediaCrypto,float)">getMediaCodecConfiguration</a></span>&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="https://developer.android.com/reference/android/media/MediaCrypto.html" title="class or interface in android.media" class="externalLink" target="_top">MediaCrypto</a>&nbsp;crypto,
float&nbsp;codecOperatingRate)</code></th>
<td class="colLast">
<div class="block">Returns the <a href="../mediacodec/MediaCodecAdapter.Configuration.html" title="class in com.google.android.exoplayer2.mediacodec"><code>MediaCodecAdapter.Configuration</code></a> that will be used to create and configure a
<a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink"><code>MediaCodec</code></a> to decode the given <a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top"><code>Format</code></a> for a playback.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected <a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink" target="_top">MediaFormat</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMediaFormat(com.google.android.exoplayer2.Format,java.lang.String,com.google.android.exoplayer2.video.MediaCodecVideoRenderer.CodecMaxValues,float,boolean,int)">getMediaFormat</a></span>&#8203;(<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;codecMimeType,
<a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video">MediaCodecVideoRenderer.CodecMaxValues</a>&nbsp;codecMaxValues,
float&nbsp;codecOperatingRate,
boolean&nbsp;deviceNeedsNoPostProcessWorkaround,
int&nbsp;tunnelingAudioSessionId)</code></th>
<td class="colLast">
<div class="block">Returns the framework <a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaFormat</code></a> that should be used to configure the decoder.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getName()">getName</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the name of this renderer, for logging and debugging purposes.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>protected <a href="https://developer.android.com/reference/android/view/Surface.html" title="class or interface in android.view" class="externalLink" target="_top">Surface</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSurface()">getSurface</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#handleInputBufferSupplementalData(com.google.android.exoplayer2.decoder.DecoderInputBuffer)">handleInputBufferSupplementalData</a></span>&#8203;(<a href="../decoder/DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a>&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">Handles supplemental data associated with an input buffer.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#handleMessage(int,java.lang.Object)">handleMessage</a></span>&#8203;(int&nbsp;messageType,
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;message)</code></th>
<td class="colLast">
<div class="block">Handles a message delivered to the target.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isReady()">isReady</a></span>()</code></th>
<td class="colLast">
<div class="block">Whether the renderer is able to immediately render media from the current position.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeDropBuffersToKeyframe(long,boolean)">maybeDropBuffersToKeyframe</a></span>&#8203;(long&nbsp;positionUs,
boolean&nbsp;treatDroppedBuffersAsSkipped)</code></th>
<td class="colLast">
<div class="block">Drops frames from the current output buffer to the next keyframe at or before the playback
position.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onCodecError(java.lang.Exception)">onCodecError</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a>&nbsp;codecError)</code></th>
<td class="colLast">
<div class="block">Called when a codec error has occurred.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onCodecInitialized(java.lang.String,long,long)">onCodecInitialized</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;name,
long&nbsp;initializedTimestampMs,
long&nbsp;initializationDurationMs)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a> has been created and configured.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onCodecReleased(java.lang.String)">onCodecReleased</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a> has been released.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onDisabled()">onDisabled</a></span>()</code></th>
<td class="colLast">
<div class="block">Called when the renderer is disabled.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onEnabled(boolean,boolean)">onEnabled</a></span>&#8203;(boolean&nbsp;joining,
boolean&nbsp;mayRenderStartOfStream)</code></th>
<td class="colLast">
<div class="block">Called when the renderer is enabled.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>protected <a href="../decoder/DecoderReuseEvaluation.html" title="class in com.google.android.exoplayer2.decoder">DecoderReuseEvaluation</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onInputFormatChanged(com.google.android.exoplayer2.FormatHolder)">onInputFormatChanged</a></span>&#8203;(<a href="../FormatHolder.html" title="class in com.google.android.exoplayer2">FormatHolder</a>&nbsp;formatHolder)</code></th>
<td class="colLast">
<div class="block">Called when a new <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> is read from the upstream <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a>.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onOutputFormatChanged(com.google.android.exoplayer2.Format,android.media.MediaFormat)">onOutputFormatChanged</a></span>&#8203;(<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink" target="_top">MediaFormat</a>&nbsp;mediaFormat)</code></th>
<td class="colLast">
<div class="block">Called when one of the output formats changes.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPositionReset(long,boolean)">onPositionReset</a></span>&#8203;(long&nbsp;positionUs,
boolean&nbsp;joining)</code></th>
<td class="colLast">
<div class="block">Called when the position is reset.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onProcessedOutputBuffer(long)">onProcessedOutputBuffer</a></span>&#8203;(long&nbsp;presentationTimeUs)</code></th>
<td class="colLast">
<div class="block">Called when an output buffer is successfully processed.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onProcessedStreamChange()">onProcessedStreamChange</a></span>()</code></th>
<td class="colLast">
<div class="block">Called after the last output buffer before a stream change has been processed.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onProcessedTunneledBuffer(long)">onProcessedTunneledBuffer</a></span>&#8203;(long&nbsp;presentationTimeUs)</code></th>
<td class="colLast">
<div class="block">Called when a buffer was processed in tunneling mode.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onQueueInputBuffer(com.google.android.exoplayer2.decoder.DecoderInputBuffer)">onQueueInputBuffer</a></span>&#8203;(<a href="../decoder/DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a>&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">Called immediately before an input buffer is queued into the codec.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onReset()">onReset</a></span>()</code></th>
<td class="colLast">
<div class="block">Called when the renderer is reset.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onStarted()">onStarted</a></span>()</code></th>
<td class="colLast">
<div class="block">Called when the renderer is started.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onStopped()">onStopped</a></span>()</code></th>
<td class="colLast">
<div class="block">Called when the renderer is stopped.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#processOutputBuffer(long,long,com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,java.nio.ByteBuffer,int,int,int,long,boolean,boolean,com.google.android.exoplayer2.Format)">processOutputBuffer</a></span>&#8203;(long&nbsp;positionUs,
long&nbsp;elapsedRealtimeUs,
<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer,
int&nbsp;bufferIndex,
int&nbsp;bufferFlags,
int&nbsp;sampleCount,
long&nbsp;bufferPresentationTimeUs,
boolean&nbsp;isDecodeOnlyBuffer,
boolean&nbsp;isLastBuffer,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format)</code></th>
<td class="colLast">
<div class="block">Processes an output media buffer.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#renderOutputBuffer(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long)">renderOutputBuffer</a></span>&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs)</code></th>
<td class="colLast">
<div class="block">Renders the output buffer with the specified index.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#renderOutputBufferV21(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long,long)">renderOutputBufferV21</a></span>&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs,
long&nbsp;releaseTimeNs)</code></th>
<td class="colLast">
<div class="block">Renders the output buffer with the specified index.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetCodecStateForFlush()">resetCodecStateForFlush</a></span>()</code></th>
<td class="colLast">
<div class="block">Resets the renderer internal state after a codec flush.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOutputSurfaceV23(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,android.view.Surface)">setOutputSurfaceV23</a></span>&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
<a href="https://developer.android.com/reference/android/view/Surface.html" title="class or interface in android.view" class="externalLink" target="_top">Surface</a>&nbsp;surface)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPlaybackSpeed(float,float)">setPlaybackSpeed</a></span>&#8203;(float&nbsp;currentPlaybackSpeed,
float&nbsp;targetPlaybackSpeed)</code></th>
<td class="colLast">
<div class="block">Indicates the playback speed to this renderer.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldDropBuffersToKeyframe(long,long,boolean)">shouldDropBuffersToKeyframe</a></span>&#8203;(long&nbsp;earlyUs,
long&nbsp;elapsedRealtimeUs,
boolean&nbsp;isLastBuffer)</code></th>
<td class="colLast">
<div class="block">Returns whether to drop all buffers from the buffer being processed to the keyframe at or after
the current playback position, if possible.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldDropOutputBuffer(long,long,boolean)">shouldDropOutputBuffer</a></span>&#8203;(long&nbsp;earlyUs,
long&nbsp;elapsedRealtimeUs,
boolean&nbsp;isLastBuffer)</code></th>
<td class="colLast">
<div class="block">Returns whether the buffer being processed should be dropped.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldForceRenderOutputBuffer(long,long)">shouldForceRenderOutputBuffer</a></span>&#8203;(long&nbsp;earlyUs,
long&nbsp;elapsedSinceLastRenderUs)</code></th>
<td class="colLast">
<div class="block">Returns whether to force rendering an output buffer.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldInitCodec(com.google.android.exoplayer2.mediacodec.MediaCodecInfo)">shouldInitCodec</a></span>&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skipOutputBuffer(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long)">skipOutputBuffer</a></span>&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs)</code></th>
<td class="colLast">
<div class="block">Skips the output buffer with the specified index.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#supportsFormat(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format)">supportsFormat</a></span>&#8203;(<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format)</code></th>
<td class="colLast">
<div class="block">Returns the <a href="../RendererCapabilities.Capabilities.html" title="annotation in com.google.android.exoplayer2"><code>RendererCapabilities.Capabilities</code></a> for the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#updateDroppedBufferCounters(int)">updateDroppedBufferCounters</a></span>&#8203;(int&nbsp;droppedBufferCount)</code></th>
<td class="colLast">
<div class="block">Updates local counters and <a href="../decoder/DecoderCounters.html" title="class in com.google.android.exoplayer2.decoder"><code>DecoderCounters</code></a> to reflect that <code>droppedBufferCount</code>
additional buffers were dropped.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#updateVideoFrameProcessingOffsetCounters(long)">updateVideoFrameProcessingOffsetCounters</a></span>&#8203;(long&nbsp;processingOffsetUs)</code></th>
<td class="colLast">
<div class="block">Updates local counters and <a href="../decoder/DecoderCounters.html" title="class in com.google.android.exoplayer2.decoder"><code>DecoderCounters</code></a> with a new video frame processing offset.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.mediacodec.MediaCodecRenderer">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;com.google.android.exoplayer2.mediacodec.<a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></h3>
<code><a href="../mediacodec/MediaCodecRenderer.html#experimentalSetAsynchronousBufferQueueingEnabled(boolean)">experimentalSetAsynchronousBufferQueueingEnabled</a>, <a href="../mediacodec/MediaCodecRenderer.html#experimentalSetForceAsyncQueueingSynchronizationWorkaround(boolean)">experimentalSetForceAsyncQueueingSynchronizationWorkaround</a>, <a href="../mediacodec/MediaCodecRenderer.html#experimentalSetSynchronizeCodecInteractionsWithQueueingEnabled(boolean)">experimentalSetSynchronizeCodecInteractionsWithQueueingEnabled</a>, <a href="../mediacodec/MediaCodecRenderer.html#flushOrReinitializeCodec()">flushOrReinitializeCodec</a>, <a href="../mediacodec/MediaCodecRenderer.html#flushOrReleaseCodec()">flushOrReleaseCodec</a>, <a href="../mediacodec/MediaCodecRenderer.html#getCodec()">getCodec</a>, <a href="../mediacodec/MediaCodecRenderer.html#getCodecInfo()">getCodecInfo</a>, <a href="../mediacodec/MediaCodecRenderer.html#getCodecOperatingRate()">getCodecOperatingRate</a>, <a href="../mediacodec/MediaCodecRenderer.html#getCodecOutputMediaFormat()">getCodecOutputMediaFormat</a>, <a href="../mediacodec/MediaCodecRenderer.html#getOutputStreamOffsetUs()">getOutputStreamOffsetUs</a>, <a href="../mediacodec/MediaCodecRenderer.html#getPlaybackSpeed()">getPlaybackSpeed</a>, <a href="../mediacodec/MediaCodecRenderer.html#isEnded()">isEnded</a>, <a href="../mediacodec/MediaCodecRenderer.html#maybeInitCodecOrBypass()">maybeInitCodecOrBypass</a>, <a href="../mediacodec/MediaCodecRenderer.html#onStreamChanged(com.google.android.exoplayer2.Format%5B%5D,long,long)">onStreamChanged</a>, <a href="../mediacodec/MediaCodecRenderer.html#releaseCodec()">releaseCodec</a>, <a href="../mediacodec/MediaCodecRenderer.html#render(long,long)">render</a>, <a href="../mediacodec/MediaCodecRenderer.html#renderToEndOfStream()">renderToEndOfStream</a>, <a href="../mediacodec/MediaCodecRenderer.html#resetCodecStateForRelease()">resetCodecStateForRelease</a>, <a href="../mediacodec/MediaCodecRenderer.html#setPendingOutputEndOfStream()">setPendingOutputEndOfStream</a>, <a href="../mediacodec/MediaCodecRenderer.html#setPendingPlaybackException(com.google.android.exoplayer2.ExoPlaybackException)">setPendingPlaybackException</a>, <a href="../mediacodec/MediaCodecRenderer.html#setRenderTimeLimitMs(long)">setRenderTimeLimitMs</a>, <a href="../mediacodec/MediaCodecRenderer.html#shouldUseBypass(com.google.android.exoplayer2.Format)">shouldUseBypass</a>, <a href="../mediacodec/MediaCodecRenderer.html#supportsFormat(com.google.android.exoplayer2.Format)">supportsFormat</a>, <a href="../mediacodec/MediaCodecRenderer.html#supportsFormatDrm(com.google.android.exoplayer2.Format)">supportsFormatDrm</a>, <a href="../mediacodec/MediaCodecRenderer.html#supportsMixedMimeTypeAdaptation()">supportsMixedMimeTypeAdaptation</a>, <a href="../mediacodec/MediaCodecRenderer.html#updateCodecOperatingRate()">updateCodecOperatingRate</a>, <a href="../mediacodec/MediaCodecRenderer.html#updateOutputFormatForTime(long)">updateOutputFormatForTime</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.BaseRenderer">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;com.google.android.exoplayer2.<a href="../BaseRenderer.html" title="class in com.google.android.exoplayer2">BaseRenderer</a></h3>
<code><a href="../BaseRenderer.html#createRendererException(java.lang.Throwable,com.google.android.exoplayer2.Format,boolean,int)">createRendererException</a>, <a href="../BaseRenderer.html#createRendererException(java.lang.Throwable,com.google.android.exoplayer2.Format,int)">createRendererException</a>, <a href="../BaseRenderer.html#disable()">disable</a>, <a href="../BaseRenderer.html#enable(com.google.android.exoplayer2.RendererConfiguration,com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,boolean,boolean,long,long)">enable</a>, <a href="../BaseRenderer.html#getCapabilities()">getCapabilities</a>, <a href="../BaseRenderer.html#getConfiguration()">getConfiguration</a>, <a href="../BaseRenderer.html#getFormatHolder()">getFormatHolder</a>, <a href="../BaseRenderer.html#getIndex()">getIndex</a>, <a href="../BaseRenderer.html#getLastResetPositionUs()">getLastResetPositionUs</a>, <a href="../BaseRenderer.html#getMediaClock()">getMediaClock</a>, <a href="../BaseRenderer.html#getReadingPositionUs()">getReadingPositionUs</a>, <a href="../BaseRenderer.html#getState()">getState</a>, <a href="../BaseRenderer.html#getStream()">getStream</a>, <a href="../BaseRenderer.html#getStreamFormats()">getStreamFormats</a>, <a href="../BaseRenderer.html#getTrackType()">getTrackType</a>, <a href="../BaseRenderer.html#hasReadStreamToEnd()">hasReadStreamToEnd</a>, <a href="../BaseRenderer.html#isCurrentStreamFinal()">isCurrentStreamFinal</a>, <a href="../BaseRenderer.html#isSourceReady()">isSourceReady</a>, <a href="../BaseRenderer.html#maybeThrowStreamError()">maybeThrowStreamError</a>, <a href="../BaseRenderer.html#readSource(com.google.android.exoplayer2.FormatHolder,com.google.android.exoplayer2.decoder.DecoderInputBuffer,int)">readSource</a>, <a href="../BaseRenderer.html#replaceStream(com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,long)">replaceStream</a>, <a href="../BaseRenderer.html#reset()">reset</a>, <a href="../BaseRenderer.html#resetPosition(long)">resetPosition</a>, <a href="../BaseRenderer.html#setCurrentStreamFinal()">setCurrentStreamFinal</a>, <a href="../BaseRenderer.html#setIndex(int)">setIndex</a>, <a href="../BaseRenderer.html#skipSource(long)">skipSource</a>, <a href="../BaseRenderer.html#start()">start</a>, <a href="../BaseRenderer.html#stop()">stop</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MediaCodecVideoRenderer</h4>
<pre>public&nbsp;MediaCodecVideoRenderer&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A context.</dd>
<dd><code>mediaCodecSelector</code> - A decoder selector.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MediaCodecVideoRenderer</h4>
<pre>public&nbsp;MediaCodecVideoRenderer&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A context.</dd>
<dd><code>mediaCodecSelector</code> - A decoder selector.</dd>
<dd><code>allowedJoiningTimeMs</code> - The maximum duration in milliseconds for which this video renderer
can attempt to seamlessly join an ongoing playback.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long,android.os.Handler,com.google.android.exoplayer2.video.VideoRendererEventListener,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MediaCodecVideoRenderer</h4>
<pre>public&nbsp;MediaCodecVideoRenderer&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs,
@Nullable
<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a>&nbsp;eventHandler,
@Nullable
<a href="VideoRendererEventListener.html" title="interface in com.google.android.exoplayer2.video">VideoRendererEventListener</a>&nbsp;eventListener,
int&nbsp;maxDroppedFramesToNotify)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A context.</dd>
<dd><code>mediaCodecSelector</code> - A decoder selector.</dd>
<dd><code>allowedJoiningTimeMs</code> - The maximum duration in milliseconds for which this video renderer
can attempt to seamlessly join an ongoing playback.</dd>
<dd><code>eventHandler</code> - A handler to use when delivering events to <code>eventListener</code>. May be
null if delivery of events is not required.</dd>
<dd><code>eventListener</code> - A listener of events. May be null if delivery of events is not required.</dd>
<dd><code>maxDroppedFramesToNotify</code> - The maximum number of frames that can be dropped between
invocations of <a href="VideoRendererEventListener.html#onDroppedFrames(int,long)"><code>VideoRendererEventListener.onDroppedFrames(int, long)</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long,boolean,android.os.Handler,com.google.android.exoplayer2.video.VideoRendererEventListener,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MediaCodecVideoRenderer</h4>
<pre>public&nbsp;MediaCodecVideoRenderer&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs,
boolean&nbsp;enableDecoderFallback,
@Nullable
<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a>&nbsp;eventHandler,
@Nullable
<a href="VideoRendererEventListener.html" title="interface in com.google.android.exoplayer2.video">VideoRendererEventListener</a>&nbsp;eventListener,
int&nbsp;maxDroppedFramesToNotify)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A context.</dd>
<dd><code>mediaCodecSelector</code> - A decoder selector.</dd>
<dd><code>allowedJoiningTimeMs</code> - The maximum duration in milliseconds for which this video renderer
can attempt to seamlessly join an ongoing playback.</dd>
<dd><code>enableDecoderFallback</code> - 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.</dd>
<dd><code>eventHandler</code> - A handler to use when delivering events to <code>eventListener</code>. May be
null if delivery of events is not required.</dd>
<dd><code>eventListener</code> - A listener of events. May be null if delivery of events is not required.</dd>
<dd><code>maxDroppedFramesToNotify</code> - The maximum number of frames that can be dropped between
invocations of <a href="VideoRendererEventListener.html#onDroppedFrames(int,long)"><code>VideoRendererEventListener.onDroppedFrames(int, long)</code></a>.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(android.content.Context,com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Factory,com.google.android.exoplayer2.mediacodec.MediaCodecSelector,long,boolean,android.os.Handler,com.google.android.exoplayer2.video.VideoRendererEventListener,int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MediaCodecVideoRenderer</h4>
<pre>public&nbsp;MediaCodecVideoRenderer&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="../mediacodec/MediaCodecAdapter.Factory.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter.Factory</a>&nbsp;codecAdapterFactory,
<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
long&nbsp;allowedJoiningTimeMs,
boolean&nbsp;enableDecoderFallback,
@Nullable
<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a>&nbsp;eventHandler,
@Nullable
<a href="VideoRendererEventListener.html" title="interface in com.google.android.exoplayer2.video">VideoRendererEventListener</a>&nbsp;eventListener,
int&nbsp;maxDroppedFramesToNotify)</pre>
<div class="block">Creates a new instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A context.</dd>
<dd><code>codecAdapterFactory</code> - The <a href="../mediacodec/MediaCodecAdapter.Factory.html" title="interface in com.google.android.exoplayer2.mediacodec"><code>MediaCodecAdapter.Factory</code></a> used to create <a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec"><code>MediaCodecAdapter</code></a> instances.</dd>
<dd><code>mediaCodecSelector</code> - A decoder selector.</dd>
<dd><code>allowedJoiningTimeMs</code> - The maximum duration in milliseconds for which this video renderer
can attempt to seamlessly join an ongoing playback.</dd>
<dd><code>enableDecoderFallback</code> - 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.</dd>
<dd><code>eventHandler</code> - A handler to use when delivering events to <code>eventListener</code>. May be
null if delivery of events is not required.</dd>
<dd><code>eventListener</code> - A listener of events. May be null if delivery of events is not required.</dd>
<dd><code>maxDroppedFramesToNotify</code> - The maximum number of frames that can be dropped between
invocations of <a href="VideoRendererEventListener.html#onDroppedFrames(int,long)"><code>VideoRendererEventListener.onDroppedFrames(int, long)</code></a>.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre class="methodSignature">public&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;getName()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Renderer.html#getName()">Renderer</a></code></span></div>
<div class="block">Returns the name of this renderer, for logging and debugging purposes. Should typically be the
renderer's (un-obfuscated) class name.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The name of this renderer.</dd>
</dl>
</li>
</ul>
<a id="supportsFormat(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>supportsFormat</h4>
<pre class="methodSignature"><a href="../RendererCapabilities.Capabilities.html" title="annotation in com.google.android.exoplayer2">@Capabilities</a>
protected&nbsp;int&nbsp;supportsFormat&#8203;(<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format)
throws <a href="../mediacodec/MediaCodecUtil.DecoderQueryException.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecUtil.DecoderQueryException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#supportsFormat(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format)">MediaCodecRenderer</a></code></span></div>
<div class="block">Returns the <a href="../RendererCapabilities.Capabilities.html" title="annotation in com.google.android.exoplayer2"><code>RendererCapabilities.Capabilities</code></a> for the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#supportsFormat(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format)">supportsFormat</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaCodecSelector</code> - The decoder selector.</dd>
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="../RendererCapabilities.Capabilities.html" title="annotation in com.google.android.exoplayer2"><code>RendererCapabilities.Capabilities</code></a> for this <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecUtil.DecoderQueryException.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecUtil.DecoderQueryException</a></code> - If there was an error querying decoders.</dd>
</dl>
</li>
</ul>
<a id="getDecoderInfos(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDecoderInfos</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&gt;&nbsp;getDecoderInfos&#8203;(<a href="../mediacodec/MediaCodecSelector.html" title="interface in com.google.android.exoplayer2.mediacodec" target="_top">MediaCodecSelector</a>&nbsp;mediaCodecSelector,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
boolean&nbsp;requiresSecureDecoder)
throws <a href="../mediacodec/MediaCodecUtil.DecoderQueryException.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecUtil.DecoderQueryException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#getDecoderInfos(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format,boolean)">MediaCodecRenderer</a></code></span></div>
<div class="block">Returns a list of decoders that can decode media in the specified format, in priority order.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#getDecoderInfos(com.google.android.exoplayer2.mediacodec.MediaCodecSelector,com.google.android.exoplayer2.Format,boolean)">getDecoderInfos</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaCodecSelector</code> - The decoder selector.</dd>
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which a decoder is required.</dd>
<dd><code>requiresSecureDecoder</code> - Whether a secure decoder is required.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A list of <a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec"><code>MediaCodecInfo</code></a>s corresponding to decoders. May be empty.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecUtil.DecoderQueryException.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecUtil.DecoderQueryException</a></code> - Thrown if there was an error querying decoders.</dd>
</dl>
</li>
</ul>
<a id="onEnabled(boolean,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onEnabled</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onEnabled&#8203;(boolean&nbsp;joining,
boolean&nbsp;mayRenderStartOfStream)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../BaseRenderer.html#onEnabled(boolean,boolean)">BaseRenderer</a></code></span></div>
<div class="block">Called when the renderer is enabled.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onEnabled(boolean,boolean)">onEnabled</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>joining</code> - Whether this renderer is being enabled to join an ongoing playback.</dd>
<dd><code>mayRenderStartOfStream</code> - Whether this renderer is allowed to render the start of the
stream even if the state is not <a href="../Renderer.html#STATE_STARTED"><code>Renderer.STATE_STARTED</code></a> yet.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - If an error occurs.</dd>
</dl>
</li>
</ul>
<a id="onPositionReset(long,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPositionReset</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onPositionReset&#8203;(long&nbsp;positionUs,
boolean&nbsp;joining)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../BaseRenderer.html#onPositionReset(long,boolean)">BaseRenderer</a></code></span></div>
<div class="block">Called when the position is reset. This occurs when the renderer is enabled after <a href="../BaseRenderer.html#onStreamChanged(com.google.android.exoplayer2.Format%5B%5D,long,long)"><code>BaseRenderer.onStreamChanged(Format[], long, long)</code></a> has been called, and also when a position discontinuity
is encountered.
<p>After a position reset, the renderer's <a href="../source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> is guaranteed to provide samples
starting from a key frame.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onPositionReset(long,boolean)">onPositionReset</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The new playback position in microseconds.</dd>
<dd><code>joining</code> - Whether this renderer is being enabled to join an ongoing playback.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - If an error occurs.</dd>
</dl>
</li>
</ul>
<a id="isReady()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReady</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isReady()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Renderer.html#isReady()">Renderer</a></code></span></div>
<div class="block">Whether the renderer is able to immediately render media from the current position.
<p>If the renderer is in the <a href="../Renderer.html#STATE_STARTED"><code>Renderer.STATE_STARTED</code></a> 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.
<p>If the renderer is in the <a href="../Renderer.html#STATE_ENABLED"><code>Renderer.STATE_ENABLED</code></a> state then returning true indicates that
the renderer is ready for playback to be started. Returning false indicates that it is not.
<p>This method may be called when the renderer is in the following states: <a href="../Renderer.html#STATE_ENABLED"><code>Renderer.STATE_ENABLED</code></a>, <a href="../Renderer.html#STATE_STARTED"><code>Renderer.STATE_STARTED</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Renderer.html#isReady()">isReady</a></code>&nbsp;in interface&nbsp;<code><a href="../Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#isReady()">isReady</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether the renderer is ready to render media.</dd>
</dl>
</li>
</ul>
<a id="onStarted()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onStarted</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onStarted()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../BaseRenderer.html#onStarted()">BaseRenderer</a></code></span></div>
<div class="block">Called when the renderer is started.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onStarted()">onStarted</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="onStopped()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onStopped</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onStopped()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../BaseRenderer.html#onStopped()">BaseRenderer</a></code></span></div>
<div class="block">Called when the renderer is stopped.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onStopped()">onStopped</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="onDisabled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onDisabled</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onDisabled()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../BaseRenderer.html#onDisabled()">BaseRenderer</a></code></span></div>
<div class="block">Called when the renderer is disabled.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onDisabled()">onDisabled</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="onReset()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onReset</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onReset()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../BaseRenderer.html#onReset()">BaseRenderer</a></code></span></div>
<div class="block">Called when the renderer is reset.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onReset()">onReset</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="handleMessage(int,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleMessage</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;handleMessage&#8203;(int&nbsp;messageType,
@Nullable
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;message)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../PlayerMessage.Target.html#handleMessage(int,java.lang.Object)">PlayerMessage.Target</a></code></span></div>
<div class="block">Handles a message delivered to the target.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../PlayerMessage.Target.html#handleMessage(int,java.lang.Object)">handleMessage</a></code>&nbsp;in interface&nbsp;<code><a href="../PlayerMessage.Target.html" title="interface in com.google.android.exoplayer2">PlayerMessage.Target</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../BaseRenderer.html#handleMessage(int,java.lang.Object)">handleMessage</a></code>&nbsp;in class&nbsp;<code><a href="../BaseRenderer.html" title="class in com.google.android.exoplayer2">BaseRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>messageType</code> - The message type.</dd>
<dd><code>message</code> - The message payload.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - If an error occurred whilst handling the message. Should only be
thrown by targets that handle messages on the playback thread.</dd>
</dl>
</li>
</ul>
<a id="shouldInitCodec(com.google.android.exoplayer2.mediacodec.MediaCodecInfo)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldInitCodec</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;shouldInitCodec&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#shouldInitCodec(com.google.android.exoplayer2.mediacodec.MediaCodecInfo)">shouldInitCodec</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="getCodecNeedsEosPropagation()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCodecNeedsEosPropagation</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;getCodecNeedsEosPropagation()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#getCodecNeedsEosPropagation()">MediaCodecRenderer</a></code></span></div>
<div class="block">Returns whether the codec needs the renderer to propagate the end-of-stream signal directly,
rather than by using an end-of-stream buffer queued to the codec.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#getCodecNeedsEosPropagation()">getCodecNeedsEosPropagation</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="getMediaCodecConfiguration(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,android.media.MediaCrypto,float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaCodecConfiguration</h4>
<pre class="methodSignature">protected&nbsp;<a href="../mediacodec/MediaCodecAdapter.Configuration.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter.Configuration</a>&nbsp;getMediaCodecConfiguration&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
@Nullable
<a href="https://developer.android.com/reference/android/media/MediaCrypto.html" title="class or interface in android.media" class="externalLink" target="_top">MediaCrypto</a>&nbsp;crypto,
float&nbsp;codecOperatingRate)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#getMediaCodecConfiguration(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,android.media.MediaCrypto,float)">MediaCodecRenderer</a></code></span></div>
<div class="block">Returns the <a href="../mediacodec/MediaCodecAdapter.Configuration.html" title="class in com.google.android.exoplayer2.mediacodec"><code>MediaCodecAdapter.Configuration</code></a> that will be used to create and configure a
<a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink"><code>MediaCodec</code></a> to decode the given <a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top"><code>Format</code></a> for a playback.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#getMediaCodecConfiguration(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,android.media.MediaCrypto,float)">getMediaCodecConfiguration</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codecInfo</code> - Information about the <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a> being configured.</dd>
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which the codec is being configured.</dd>
<dd><code>crypto</code> - For drm protected playbacks, a <a href="https://developer.android.com/reference/android/media/MediaCrypto.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCrypto</code></a> to use for decryption.</dd>
<dd><code>codecOperatingRate</code> - The codec operating rate, or <a href="../mediacodec/MediaCodecRenderer.html#CODEC_OPERATING_RATE_UNSET"><code>MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET</code></a> if
no codec operating rate should be set.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The parameters needed to call <a href="https://developer.android.com/reference/android/media/MediaCodec.html#configure(android.media.MediaFormat,android.view.Surface,android.media.MediaCrypto,int)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec.configure(android.media.MediaFormat, android.view.Surface, android.media.MediaCrypto, int)</code></a>.</dd>
</dl>
</li>
</ul>
<a id="canReuseCodec(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canReuseCodec</h4>
<pre class="methodSignature">protected&nbsp;<a href="../decoder/DecoderReuseEvaluation.html" title="class in com.google.android.exoplayer2.decoder">DecoderReuseEvaluation</a>&nbsp;canReuseCodec&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;oldFormat,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;newFormat)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#canReuseCodec(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format)">MediaCodecRenderer</a></code></span></div>
<div class="block">Evaluates whether the existing <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink"><code>MediaCodec</code></a> can be kept for a new <a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top"><code>Format</code></a>, and if
it can whether it requires reconfiguration.
<p>The default implementation does not allow decoder reuse.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#canReuseCodec(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format)">canReuseCodec</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codecInfo</code> - A <a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec"><code>MediaCodecInfo</code></a> describing the decoder.</dd>
<dd><code>oldFormat</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which the existing instance is configured.</dd>
<dd><code>newFormat</code> - The new <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The result of the evaluation.</dd>
</dl>
</li>
</ul>
<a id="resetCodecStateForFlush()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetCodecStateForFlush</h4>
<pre class="methodSignature">@CallSuper
protected&nbsp;void&nbsp;resetCodecStateForFlush()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#resetCodecStateForFlush()">MediaCodecRenderer</a></code></span></div>
<div class="block">Resets the renderer internal state after a codec flush.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#resetCodecStateForFlush()">resetCodecStateForFlush</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="setPlaybackSpeed(float,float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPlaybackSpeed</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setPlaybackSpeed&#8203;(float&nbsp;currentPlaybackSpeed,
float&nbsp;targetPlaybackSpeed)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Renderer.html#setPlaybackSpeed(float,float)">Renderer</a></code></span></div>
<div class="block">Indicates the playback speed to this renderer.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Renderer.html#setPlaybackSpeed(float,float)">setPlaybackSpeed</a></code>&nbsp;in interface&nbsp;<code><a href="../Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#setPlaybackSpeed(float,float)">setPlaybackSpeed</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>currentPlaybackSpeed</code> - The factor by which playback is currently sped up.</dd>
<dd><code>targetPlaybackSpeed</code> - The target factor by which playback should be sped up. This may be
different from <code>currentPlaybackSpeed</code>, for example, if the speed is temporarily
adjusted for live playback.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - If an error occurs handling the playback speed.</dd>
</dl>
</li>
</ul>
<a id="getCodecOperatingRateV23(float,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCodecOperatingRateV23</h4>
<pre class="methodSignature">protected&nbsp;float&nbsp;getCodecOperatingRateV23&#8203;(float&nbsp;targetPlaybackSpeed,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;streamFormats)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#getCodecOperatingRateV23(float,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format%5B%5D)">MediaCodecRenderer</a></code></span></div>
<div class="block">Returns the <a href="https://developer.android.com/reference/android/media/MediaFormat.html#KEY_OPERATING_RATE" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaFormat.KEY_OPERATING_RATE</code></a> value for a given playback speed, current
<a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> and set of possible stream formats.
<p>The default implementation returns <a href="../mediacodec/MediaCodecRenderer.html#CODEC_OPERATING_RATE_UNSET"><code>MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#getCodecOperatingRateV23(float,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format%5B%5D)">getCodecOperatingRateV23</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>targetPlaybackSpeed</code> - The target factor by which playback should be sped up. This may be
different from the current playback speed, for example, if the speed is temporarily
adjusted for live playback.</dd>
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which the codec is being configured.</dd>
<dd><code>streamFormats</code> - The possible stream formats.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The codec operating rate, or <a href="../mediacodec/MediaCodecRenderer.html#CODEC_OPERATING_RATE_UNSET"><code>MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET</code></a> if no codec operating
rate should be set.</dd>
</dl>
</li>
</ul>
<a id="onCodecInitialized(java.lang.String,long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onCodecInitialized</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onCodecInitialized&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;name,
long&nbsp;initializedTimestampMs,
long&nbsp;initializationDurationMs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#onCodecInitialized(java.lang.String,long,long)">MediaCodecRenderer</a></code></span></div>
<div class="block">Called when a <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a> has been created and configured.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onCodecInitialized(java.lang.String,long,long)">onCodecInitialized</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the codec that was initialized.</dd>
<dd><code>initializedTimestampMs</code> - <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()" title="class or interface in android.os" class="externalLink" target="_top"><code>SystemClock.elapsedRealtime()</code></a> when initialization
finished.</dd>
<dd><code>initializationDurationMs</code> - The time taken to initialize the codec in milliseconds.</dd>
</dl>
</li>
</ul>
<a id="onCodecReleased(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onCodecReleased</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onCodecReleased&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;name)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#onCodecReleased(java.lang.String)">MediaCodecRenderer</a></code></span></div>
<div class="block">Called when a <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a> has been released.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onCodecReleased(java.lang.String)">onCodecReleased</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the codec that was released.</dd>
</dl>
</li>
</ul>
<a id="onCodecError(java.lang.Exception)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onCodecError</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onCodecError&#8203;(<a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a>&nbsp;codecError)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#onCodecError(java.lang.Exception)">MediaCodecRenderer</a></code></span></div>
<div class="block">Called when a codec error has occurred.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onCodecError(java.lang.Exception)">onCodecError</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codecError</code> - The error.</dd>
</dl>
</li>
</ul>
<a id="onInputFormatChanged(com.google.android.exoplayer2.FormatHolder)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onInputFormatChanged</h4>
<pre class="methodSignature">@Nullable
protected&nbsp;<a href="../decoder/DecoderReuseEvaluation.html" title="class in com.google.android.exoplayer2.decoder">DecoderReuseEvaluation</a>&nbsp;onInputFormatChanged&#8203;(<a href="../FormatHolder.html" title="class in com.google.android.exoplayer2">FormatHolder</a>&nbsp;formatHolder)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#onInputFormatChanged(com.google.android.exoplayer2.FormatHolder)">MediaCodecRenderer</a></code></span></div>
<div class="block">Called when a new <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> is read from the upstream <a href="../source/MediaPeriod.html" title="interface in com.google.android.exoplayer2.source"><code>MediaPeriod</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onInputFormatChanged(com.google.android.exoplayer2.FormatHolder)">onInputFormatChanged</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>formatHolder</code> - A <a href="../FormatHolder.html" title="class in com.google.android.exoplayer2"><code>FormatHolder</code></a> that holds the new <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The result of the evaluation to determine whether the existing decoder instance can be
reused for the new format, or <code>null</code> if the renderer did not have a decoder.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - If an error occurs re-initializing the <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a>.</dd>
</dl>
</li>
</ul>
<a id="onQueueInputBuffer(com.google.android.exoplayer2.decoder.DecoderInputBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onQueueInputBuffer</h4>
<pre class="methodSignature">@CallSuper
protected&nbsp;void&nbsp;onQueueInputBuffer&#8203;(<a href="../decoder/DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a>&nbsp;buffer)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block">Called immediately before an input buffer is queued into the codec.
<p>In tunneling mode for pre Marshmallow, the buffer is treated as if immediately output.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onQueueInputBuffer(com.google.android.exoplayer2.decoder.DecoderInputBuffer)">onQueueInputBuffer</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The buffer to be queued.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - Thrown if an error occurs handling the input buffer.</dd>
</dl>
</li>
</ul>
<a id="onOutputFormatChanged(com.google.android.exoplayer2.Format,android.media.MediaFormat)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onOutputFormatChanged</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onOutputFormatChanged&#8203;(<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
@Nullable
<a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink" target="_top">MediaFormat</a>&nbsp;mediaFormat)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#onOutputFormatChanged(com.google.android.exoplayer2.Format,android.media.MediaFormat)">MediaCodecRenderer</a></code></span></div>
<div class="block">Called when one of the output formats changes.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onOutputFormatChanged(com.google.android.exoplayer2.Format,android.media.MediaFormat)">onOutputFormatChanged</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>format</code> - The input <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> to which future output now corresponds. If the renderer
is in bypass mode, this is also the output format.</dd>
<dd><code>mediaFormat</code> - The codec output <a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaFormat</code></a>, or <code>null</code> if the renderer is in
bypass mode.</dd>
</dl>
</li>
</ul>
<a id="handleInputBufferSupplementalData(com.google.android.exoplayer2.decoder.DecoderInputBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleInputBufferSupplementalData</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;handleInputBufferSupplementalData&#8203;(<a href="../decoder/DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a>&nbsp;buffer)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#handleInputBufferSupplementalData(com.google.android.exoplayer2.decoder.DecoderInputBuffer)">MediaCodecRenderer</a></code></span></div>
<div class="block">Handles supplemental data associated with an input buffer.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#handleInputBufferSupplementalData(com.google.android.exoplayer2.decoder.DecoderInputBuffer)">handleInputBufferSupplementalData</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The input buffer that is about to be queued.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - Thrown if an error occurs handling supplemental data.</dd>
</dl>
</li>
</ul>
<a id="processOutputBuffer(long,long,com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,java.nio.ByteBuffer,int,int,int,long,boolean,boolean,com.google.android.exoplayer2.Format)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processOutputBuffer</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;processOutputBuffer&#8203;(long&nbsp;positionUs,
long&nbsp;elapsedRealtimeUs,
@Nullable
<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
@Nullable
<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer,
int&nbsp;bufferIndex,
int&nbsp;bufferFlags,
int&nbsp;sampleCount,
long&nbsp;bufferPresentationTimeUs,
boolean&nbsp;isDecodeOnlyBuffer,
boolean&nbsp;isLastBuffer,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#processOutputBuffer(long,long,com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,java.nio.ByteBuffer,int,int,int,long,boolean,boolean,com.google.android.exoplayer2.Format)">MediaCodecRenderer</a></code></span></div>
<div class="block">Processes an output media buffer.
<p>When a new <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a> 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.
<p>Note that the first call to this method following a call to <a href="../mediacodec/MediaCodecRenderer.html#onPositionReset(long,boolean)"><code>MediaCodecRenderer.onPositionReset(long,
boolean)</code></a> will always receive a new <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a> to be processed.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#processOutputBuffer(long,long,com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,java.nio.ByteBuffer,int,int,int,long,boolean,boolean,com.google.android.exoplayer2.Format)">processOutputBuffer</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The current media time in microseconds, measured at the start of the current
iteration of the rendering loop.</dd>
<dd><code>elapsedRealtimeUs</code> - <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()" title="class or interface in android.os" class="externalLink" target="_top"><code>SystemClock.elapsedRealtime()</code></a> in microseconds, measured at the
start of the current iteration of the rendering loop.</dd>
<dd><code>codec</code> - The <a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec"><code>MediaCodecAdapter</code></a> instance, or null in bypass mode were no codec is
used.</dd>
<dd><code>buffer</code> - The output buffer to process, or null if the buffer data is not made available to
the application layer (see <a href="https://developer.android.com/reference/android/media/MediaCodec.html#getOutputBuffer(int)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec.getOutputBuffer(int)</code></a>). This <code>buffer</code>
can only be null for video data. Note that the buffer data can still be rendered in this
case by using the <code>bufferIndex</code>.</dd>
<dd><code>bufferIndex</code> - The index of the output buffer.</dd>
<dd><code>bufferFlags</code> - The flags attached to the output buffer.</dd>
<dd><code>sampleCount</code> - The number of samples extracted from the sample queue in the buffer. This
allows handling multiple samples as a batch for efficiency.</dd>
<dd><code>bufferPresentationTimeUs</code> - The presentation time of the output buffer in microseconds.</dd>
<dd><code>isDecodeOnlyBuffer</code> - Whether the buffer was marked with <a href="../C.html#BUFFER_FLAG_DECODE_ONLY"><code>C.BUFFER_FLAG_DECODE_ONLY</code></a>
by the source.</dd>
<dd><code>isLastBuffer</code> - Whether the buffer is known to contain the last sample of the current
stream. This flag is set on a best effort basis, and any logic relying on it should degrade
gracefully to handle cases where it's not set.</dd>
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> associated with the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether the output buffer was fully processed (for example, rendered or skipped).</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - If an error occurs processing the output buffer.</dd>
</dl>
</li>
</ul>
<a id="onProcessedTunneledBuffer(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onProcessedTunneledBuffer</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onProcessedTunneledBuffer&#8203;(long&nbsp;presentationTimeUs)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block">Called when a buffer was processed in tunneling mode.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code></dd>
</dl>
</li>
</ul>
<a id="onProcessedOutputBuffer(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onProcessedOutputBuffer</h4>
<pre class="methodSignature">@CallSuper
protected&nbsp;void&nbsp;onProcessedOutputBuffer&#8203;(long&nbsp;presentationTimeUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#onProcessedOutputBuffer(long)">MediaCodecRenderer</a></code></span></div>
<div class="block">Called when an output buffer is successfully processed.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onProcessedOutputBuffer(long)">onProcessedOutputBuffer</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>presentationTimeUs</code> - The timestamp associated with the output buffer.</dd>
</dl>
</li>
</ul>
<a id="onProcessedStreamChange()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onProcessedStreamChange</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onProcessedStreamChange()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html#onProcessedStreamChange()">MediaCodecRenderer</a></code></span></div>
<div class="block">Called after the last output buffer before a stream change has been processed.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#onProcessedStreamChange()">onProcessedStreamChange</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="shouldDropOutputBuffer(long,long,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldDropOutputBuffer</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;shouldDropOutputBuffer&#8203;(long&nbsp;earlyUs,
long&nbsp;elapsedRealtimeUs,
boolean&nbsp;isLastBuffer)</pre>
<div class="block">Returns whether the buffer being processed should be dropped.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>earlyUs</code> - The time until the buffer should be presented in microseconds. A negative value
indicates that the buffer is late.</dd>
<dd><code>elapsedRealtimeUs</code> - <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()" title="class or interface in android.os" class="externalLink" target="_top"><code>SystemClock.elapsedRealtime()</code></a> in microseconds,
measured at the start of the current iteration of the rendering loop.</dd>
<dd><code>isLastBuffer</code> - Whether the buffer is the last buffer in the current stream.</dd>
</dl>
</li>
</ul>
<a id="shouldDropBuffersToKeyframe(long,long,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldDropBuffersToKeyframe</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;shouldDropBuffersToKeyframe&#8203;(long&nbsp;earlyUs,
long&nbsp;elapsedRealtimeUs,
boolean&nbsp;isLastBuffer)</pre>
<div class="block">Returns whether to drop all buffers from the buffer being processed to the keyframe at or after
the current playback position, if possible.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>earlyUs</code> - The time until the current buffer should be presented in microseconds. A
negative value indicates that the buffer is late.</dd>
<dd><code>elapsedRealtimeUs</code> - <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()" title="class or interface in android.os" class="externalLink" target="_top"><code>SystemClock.elapsedRealtime()</code></a> in microseconds,
measured at the start of the current iteration of the rendering loop.</dd>
<dd><code>isLastBuffer</code> - Whether the buffer is the last buffer in the current stream.</dd>
</dl>
</li>
</ul>
<a id="shouldForceRenderOutputBuffer(long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldForceRenderOutputBuffer</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;shouldForceRenderOutputBuffer&#8203;(long&nbsp;earlyUs,
long&nbsp;elapsedSinceLastRenderUs)</pre>
<div class="block">Returns whether to force rendering an output buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>earlyUs</code> - The time until the current buffer should be presented in microseconds. A
negative value indicates that the buffer is late.</dd>
<dd><code>elapsedSinceLastRenderUs</code> - The elapsed time since the last output buffer was rendered, in
microseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns whether to force rendering an output buffer.</dd>
</dl>
</li>
</ul>
<a id="skipOutputBuffer(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipOutputBuffer</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;skipOutputBuffer&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs)</pre>
<div class="block">Skips the output buffer with the specified index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codec</code> - The codec that owns the output buffer.</dd>
<dd><code>index</code> - The index of the output buffer to skip.</dd>
<dd><code>presentationTimeUs</code> - The presentation time of the output buffer, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="dropOutputBuffer(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropOutputBuffer</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;dropOutputBuffer&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs)</pre>
<div class="block">Drops the output buffer with the specified index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codec</code> - The codec that owns the output buffer.</dd>
<dd><code>index</code> - The index of the output buffer to drop.</dd>
<dd><code>presentationTimeUs</code> - The presentation time of the output buffer, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="maybeDropBuffersToKeyframe(long,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maybeDropBuffersToKeyframe</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;maybeDropBuffersToKeyframe&#8203;(long&nbsp;positionUs,
boolean&nbsp;treatDroppedBuffersAsSkipped)
throws <a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block">Drops frames from the current output buffer to the next keyframe at or before the playback
position. If no such keyframe exists, as the playback position is inside the same group of
pictures as the buffer being processed, returns <code>false</code>. Returns <code>true</code> otherwise.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The current playback position, in microseconds.</dd>
<dd><code>treatDroppedBuffersAsSkipped</code> - Whether dropped buffers should be treated as intentionally
skipped.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether any buffers were dropped.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code> - If an error occurs flushing the codec.</dd>
</dl>
</li>
</ul>
<a id="updateDroppedBufferCounters(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateDroppedBufferCounters</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;updateDroppedBufferCounters&#8203;(int&nbsp;droppedBufferCount)</pre>
<div class="block">Updates local counters and <a href="../decoder/DecoderCounters.html" title="class in com.google.android.exoplayer2.decoder"><code>DecoderCounters</code></a> to reflect that <code>droppedBufferCount</code>
additional buffers were dropped.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>droppedBufferCount</code> - The number of additional dropped buffers.</dd>
</dl>
</li>
</ul>
<a id="updateVideoFrameProcessingOffsetCounters(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateVideoFrameProcessingOffsetCounters</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;updateVideoFrameProcessingOffsetCounters&#8203;(long&nbsp;processingOffsetUs)</pre>
<div class="block">Updates local counters and <a href="../decoder/DecoderCounters.html" title="class in com.google.android.exoplayer2.decoder"><code>DecoderCounters</code></a> with a new video frame processing offset.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>processingOffsetUs</code> - The video frame processing offset.</dd>
</dl>
</li>
</ul>
<a id="renderOutputBuffer(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>renderOutputBuffer</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;renderOutputBuffer&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs)</pre>
<div class="block">Renders the output buffer with the specified index. This method is only called if the platform
API version of the device is less than 21.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codec</code> - The codec that owns the output buffer.</dd>
<dd><code>index</code> - The index of the output buffer to drop.</dd>
<dd><code>presentationTimeUs</code> - The presentation time of the output buffer, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="renderOutputBufferV21(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,int,long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>renderOutputBufferV21</h4>
<pre class="methodSignature">@RequiresApi(21)
protected&nbsp;void&nbsp;renderOutputBufferV21&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
int&nbsp;index,
long&nbsp;presentationTimeUs,
long&nbsp;releaseTimeNs)</pre>
<div class="block">Renders the output buffer with the specified index. This method is only called if the platform
API version of the device is 21 or later.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codec</code> - The codec that owns the output buffer.</dd>
<dd><code>index</code> - The index of the output buffer to drop.</dd>
<dd><code>presentationTimeUs</code> - The presentation time of the output buffer, in microseconds.</dd>
<dd><code>releaseTimeNs</code> - The wallclock time at which the frame should be displayed, in nanoseconds.</dd>
</dl>
</li>
</ul>
<a id="setOutputSurfaceV23(com.google.android.exoplayer2.mediacodec.MediaCodecAdapter,android.view.Surface)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOutputSurfaceV23</h4>
<pre class="methodSignature">@RequiresApi(23)
protected&nbsp;void&nbsp;setOutputSurfaceV23&#8203;(<a href="../mediacodec/MediaCodecAdapter.html" title="interface in com.google.android.exoplayer2.mediacodec">MediaCodecAdapter</a>&nbsp;codec,
<a href="https://developer.android.com/reference/android/view/Surface.html" title="class or interface in android.view" class="externalLink" target="_top">Surface</a>&nbsp;surface)</pre>
</li>
</ul>
<a id="getMediaFormat(com.google.android.exoplayer2.Format,java.lang.String,com.google.android.exoplayer2.video.MediaCodecVideoRenderer.CodecMaxValues,float,boolean,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaFormat</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink">MediaFormat</a>&nbsp;getMediaFormat&#8203;(<a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top">Format</a>&nbsp;format,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;codecMimeType,
<a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video">MediaCodecVideoRenderer.CodecMaxValues</a>&nbsp;codecMaxValues,
float&nbsp;codecOperatingRate,
boolean&nbsp;deviceNeedsNoPostProcessWorkaround,
int&nbsp;tunnelingAudioSessionId)</pre>
<div class="block">Returns the framework <a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaFormat</code></a> that should be used to configure the decoder.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> of media.</dd>
<dd><code>codecMimeType</code> - The MIME type handled by the codec.</dd>
<dd><code>codecMaxValues</code> - Codec max values that should be used when configuring the decoder.</dd>
<dd><code>codecOperatingRate</code> - The codec operating rate, or <a href="../mediacodec/MediaCodecRenderer.html#CODEC_OPERATING_RATE_UNSET"><code>MediaCodecRenderer.CODEC_OPERATING_RATE_UNSET</code></a> if
no codec operating rate should be set.</dd>
<dd><code>deviceNeedsNoPostProcessWorkaround</code> - Whether the device is known to do post processing by
default that isn't compatible with ExoPlayer.</dd>
<dd><code>tunnelingAudioSessionId</code> - The audio session id to use for tunneling, or <a href="../C.html#AUDIO_SESSION_ID_UNSET"><code>C.AUDIO_SESSION_ID_UNSET</code></a> if tunneling should not be enabled.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The framework <a href="https://developer.android.com/reference/android/media/MediaFormat.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaFormat</code></a> that should be used to configure the decoder.</dd>
</dl>
</li>
</ul>
<a id="getCodecMaxValues(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.Format[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCodecMaxValues</h4>
<pre class="methodSignature">protected&nbsp;<a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video">MediaCodecVideoRenderer.CodecMaxValues</a>&nbsp;getCodecMaxValues&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;streamFormats)</pre>
<div class="block">Returns <a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video"><code>MediaCodecVideoRenderer.CodecMaxValues</code></a> suitable for configuring a codec for <code>format</code> in a way
that will allow possible adaptation to other compatible formats in <code>streamFormats</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codecInfo</code> - Information about the <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a> being configured.</dd>
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which the codec is being configured.</dd>
<dd><code>streamFormats</code> - The possible stream formats.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Suitable <a href="MediaCodecVideoRenderer.CodecMaxValues.html" title="class in com.google.android.exoplayer2.video"><code>MediaCodecVideoRenderer.CodecMaxValues</code></a>.</dd>
</dl>
</li>
</ul>
<a id="createDecoderException(java.lang.Throwable,com.google.android.exoplayer2.mediacodec.MediaCodecInfo)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createDecoderException</h4>
<pre class="methodSignature">protected&nbsp;<a href="../mediacodec/MediaCodecDecoderException.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecDecoderException</a>&nbsp;createDecoderException&#8203;(<a href="https://developer.android.com/reference/java/lang/Throwable.html" title="class or interface in java.lang" class="externalLink" target="_top">Throwable</a>&nbsp;cause,
@Nullable
<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../mediacodec/MediaCodecRenderer.html#createDecoderException(java.lang.Throwable,com.google.android.exoplayer2.mediacodec.MediaCodecInfo)">createDecoderException</a></code>&nbsp;in class&nbsp;<code><a href="../mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code></dd>
</dl>
</li>
</ul>
<a id="getMaxInputSize(com.google.android.exoplayer2.mediacodec.MediaCodecInfo,com.google.android.exoplayer2.Format)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxInputSize</h4>
<pre class="methodSignature">protected static&nbsp;int&nbsp;getMaxInputSize&#8203;(<a href="../mediacodec/MediaCodecInfo.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecInfo</a>&nbsp;codecInfo,
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format)</pre>
<div class="block">Returns a maximum input buffer size for a given <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink"><code>MediaCodec</code></a> and <a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top"><code>Format</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>codecInfo</code> - Information about the <a href="https://developer.android.com/reference/android/media/MediaCodec.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec</code></a> being configured.</dd>
<dd><code>format</code> - The format.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A maximum input buffer size in bytes, or <a href="../Format.html#NO_VALUE"><code>Format.NO_VALUE</code></a> if a maximum could not
be determined.</dd>
</dl>
</li>
</ul>
<a id="codecNeedsSetOutputSurfaceWorkaround(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>codecNeedsSetOutputSurfaceWorkaround</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;codecNeedsSetOutputSurfaceWorkaround&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;name)</pre>
<div class="block">Returns whether the codec is known to implement <a href="https://developer.android.com/reference/android/media/MediaCodec.html#setOutputSurface(android.view.Surface)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec.setOutputSurface(Surface)</code></a>
incorrectly.
<p>If true is returned then we fall back to releasing and re-instantiating the codec instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The name of the codec.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if the device is known to implement <a href="https://developer.android.com/reference/android/media/MediaCodec.html#setOutputSurface(android.view.Surface)" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaCodec.setOutputSurface(Surface)</code></a>
incorrectly.</dd>
</dl>
</li>
</ul>
<a id="getSurface()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getSurface</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://developer.android.com/reference/android/view/Surface.html" title="class or interface in android.view" class="externalLink" target="_top">Surface</a>&nbsp;getSurface()</pre>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>