tonihei 468e4aa0c4 Update Javadoc for 2.16.0
PiperOrigin-RevId: 407379522
2021-11-04 01:03:22 +00:00

1358 lines
84 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>BaseRenderer (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="BaseRenderer (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"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};
var tabs = {65535:["t0","All 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</a></div>
<h2 title="Class BaseRenderer" class="title">Class BaseRenderer</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>com.google.android.exoplayer2.BaseRenderer</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>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="video/spherical/CameraMotionRenderer.html" title="class in com.google.android.exoplayer2.video.spherical">CameraMotionRenderer</a></code>, <code><a href="audio/DecoderAudioRenderer.html" title="class in com.google.android.exoplayer2.audio">DecoderAudioRenderer</a></code>, <code><a href="video/DecoderVideoRenderer.html" title="class in com.google.android.exoplayer2.video">DecoderVideoRenderer</a></code>, <code><a href="testutil/FakeRenderer.html" title="class in com.google.android.exoplayer2.testutil">FakeRenderer</a></code>, <code><a href="mediacodec/MediaCodecRenderer.html" title="class in com.google.android.exoplayer2.mediacodec">MediaCodecRenderer</a></code>, <code><a href="metadata/MetadataRenderer.html" title="class in com.google.android.exoplayer2.metadata">MetadataRenderer</a></code>, <code><a href="text/TextRenderer.html" title="class in com.google.android.exoplayer2.text">TextRenderer</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">BaseRenderer</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>
implements <a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>, <a href="RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a></pre>
<div class="block">An abstract base class suitable for most <a href="Renderer.html" title="interface in com.google.android.exoplayer2"><code>Renderer</code></a> implementations.</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>
<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.MessageType.html" title="annotation in com.google.android.exoplayer2">Renderer.MessageType</a>, <a href="Renderer.State.html" title="annotation in com.google.android.exoplayer2">Renderer.State</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.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_CHANGE_FRAME_RATE_STRATEGY">MSG_SET_CHANGE_FRAME_RATE_STRATEGY</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></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(@com.google.android.exoplayer2.C.TrackTypeint)">BaseRenderer</a></span>&#8203;(@com.google.android.exoplayer2.C.TrackType int&nbsp;trackType)</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="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="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createRendererException(java.lang.Throwable,com.google.android.exoplayer2.Format,@com.google.android.exoplayer2.PlaybackException.ErrorCodeint)">createRendererException</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="Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
@com.google.android.exoplayer2.PlaybackException.ErrorCode int&nbsp;errorCode)</code></th>
<td class="colLast">
<div class="block">Creates an <a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2"><code>ExoPlaybackException</code></a> of type <a href="ExoPlaybackException.html#TYPE_RENDERER"><code>ExoPlaybackException.TYPE_RENDERER</code></a> for
this renderer.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected <a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createRendererException(java.lang.Throwable,com.google.android.exoplayer2.Format,boolean,@com.google.android.exoplayer2.PlaybackException.ErrorCodeint)">createRendererException</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="Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
boolean&nbsp;isRecoverable,
@com.google.android.exoplayer2.PlaybackException.ErrorCode int&nbsp;errorCode)</code></th>
<td class="colLast">
<div class="block">Creates an <a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2"><code>ExoPlaybackException</code></a> of type <a href="ExoPlaybackException.html#TYPE_RENDERER"><code>ExoPlaybackException.TYPE_RENDERER</code></a> for
this renderer.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disable()">disable</a></span>()</code></th>
<td class="colLast">
<div class="block">Disable the renderer, transitioning it to the <a href="Renderer.html#STATE_DISABLED"><code>Renderer.STATE_DISABLED</code></a> state.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#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></span>&#8203;(<a href="RendererConfiguration.html" title="class in com.google.android.exoplayer2">RendererConfiguration</a>&nbsp;configuration,
<a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;formats,
<a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a>&nbsp;stream,
long&nbsp;positionUs,
boolean&nbsp;joining,
boolean&nbsp;mayRenderStartOfStream,
long&nbsp;startPositionUs,
long&nbsp;offsetUs)</code></th>
<td class="colLast">
<div class="block">Enables the renderer to consume from the specified <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCapabilities()">getCapabilities</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the capabilities of the renderer.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="RendererConfiguration.html" title="class in com.google.android.exoplayer2">RendererConfiguration</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getConfiguration()">getConfiguration</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the configuration set when the renderer was most recently enabled.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected <a href="FormatHolder.html" title="class in com.google.android.exoplayer2">FormatHolder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFormatHolder()">getFormatHolder</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a clear <a href="FormatHolder.html" title="class in com.google.android.exoplayer2"><code>FormatHolder</code></a>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIndex()">getIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the index of the renderer within the player.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLastResetPositionUs()">getLastResetPositionUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the position passed to the most recent call to <a href="#enable(com.google.android.exoplayer2.RendererConfiguration,com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,boolean,boolean,long,long)"><code>enable(com.google.android.exoplayer2.RendererConfiguration, com.google.android.exoplayer2.Format[], com.google.android.exoplayer2.source.SampleStream, long, boolean, boolean, long, long)</code></a> or <a href="#resetPosition(long)"><code>resetPosition(long)</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="util/MediaClock.html" title="interface in com.google.android.exoplayer2.util">MediaClock</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMediaClock()">getMediaClock</a></span>()</code></th>
<td class="colLast">
<div class="block">If the renderer advances its own playback position then this method returns a corresponding
<a href="util/MediaClock.html" title="interface in com.google.android.exoplayer2.util"><code>MediaClock</code></a>.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReadingPositionUs()">getReadingPositionUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the renderer time up to which the renderer has read samples, in microseconds, or <a href="C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> if the renderer has read the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> to the end.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getState()">getState</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the current state of the renderer.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStream()">getStream</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> being consumed, or null if the renderer is disabled.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>protected <a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStreamFormats()">getStreamFormats</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the formats of the currently enabled stream.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>@com.google.android.exoplayer2.C.TrackType int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTrackType()">getTrackType</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the track type that the renderer handles.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<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="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasReadStreamToEnd()">hasReadStreamToEnd</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the renderer has read the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> to the end.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCurrentStreamFinal()">isCurrentStreamFinal</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> will be the final one supplied before the
renderer is next disabled or reset.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSourceReady()">isSourceReady</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the upstream source is ready.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeThrowStreamError()">maybeThrowStreamError</a></span>()</code></th>
<td class="colLast">
<div class="block">Throws an error that's preventing the renderer from reading from its <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a>.</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 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="i23" 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="i24" 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="i25" 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="i26" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onStreamChanged(com.google.android.exoplayer2.Format%5B%5D,long,long)">onStreamChanged</a></span>&#8203;(<a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;formats,
long&nbsp;startPositionUs,
long&nbsp;offsetUs)</code></th>
<td class="colLast">
<div class="block">Called when the renderer's stream has changed.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readSource(com.google.android.exoplayer2.FormatHolder,com.google.android.exoplayer2.decoder.DecoderInputBuffer,int)">readSource</a></span>&#8203;(<a href="FormatHolder.html" title="class in com.google.android.exoplayer2">FormatHolder</a>&nbsp;formatHolder,
<a href="decoder/DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a>&nbsp;buffer,
int&nbsp;readFlags)</code></th>
<td class="colLast">
<div class="block">Reads from the enabled upstream source.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replaceStream(com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,long)">replaceStream</a></span>&#8203;(<a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;formats,
<a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a>&nbsp;stream,
long&nbsp;startPositionUs,
long&nbsp;offsetUs)</code></th>
<td class="colLast">
<div class="block">Replaces the <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> from which samples will be consumed.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset()">reset</a></span>()</code></th>
<td class="colLast">
<div class="block">Forces the renderer to give up any resources (e.g.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetPosition(long)">resetPosition</a></span>&#8203;(long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Signals to the renderer that a position discontinuity has occurred.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCurrentStreamFinal()">setCurrentStreamFinal</a></span>()</code></th>
<td class="colLast">
<div class="block">Signals to the renderer that the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> will be the final one supplied
before it is next disabled or reset.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIndex(int)">setIndex</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Sets the index of this renderer within the player.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skipSource(long)">skipSource</a></span>&#8203;(long&nbsp;positionUs)</code></th>
<td class="colLast">
<div class="block">Attempts to skip to the keyframe before the specified position, or to the end of the stream if
<code>positionUs</code> is beyond it.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#start()">start</a></span>()</code></th>
<td class="colLast">
<div class="block">Starts the renderer, meaning that calls to <a href="Renderer.html#render(long,long)"><code>Renderer.render(long, long)</code></a> will cause media to be
rendered.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stop()">stop</a></span>()</code></th>
<td class="colLast">
<div class="block">Stops the renderer, transitioning it to the <a href="Renderer.html#STATE_ENABLED"><code>Renderer.STATE_ENABLED</code></a> state.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#supportsMixedMimeTypeAdaptation()">supportsMixedMimeTypeAdaptation</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the extent to which the <a href="Renderer.html" title="interface in com.google.android.exoplayer2"><code>Renderer</code></a> supports adapting between supported formats
that have different MIME types.</div>
</td>
</tr>
</table>
<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>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.Renderer">
<!-- -->
</a>
<h3>Methods 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#getName()">getName</a>, <a href="Renderer.html#isEnded()">isEnded</a>, <a href="Renderer.html#isReady()">isReady</a>, <a href="Renderer.html#render(long,long)">render</a>, <a href="Renderer.html#setPlaybackSpeed(float,float)">setPlaybackSpeed</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.RendererCapabilities">
<!-- -->
</a>
<h3>Methods 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#getName()">getName</a>, <a href="RendererCapabilities.html#supportsFormat(com.google.android.exoplayer2.Format)">supportsFormat</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;(@com.google.android.exoplayer2.C.TrackTypeint)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BaseRenderer</h4>
<pre>public&nbsp;BaseRenderer&#8203;(@com.google.android.exoplayer2.C.TrackType int&nbsp;trackType)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>trackType</code> - The track type that the renderer handles. One of the <a href="C.html" title="class in com.google.android.exoplayer2"><code>C</code></a> <code>
TRACK_TYPE_*</code> constants.</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="getTrackType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTrackType</h4>
<pre class="methodSignature">public final&nbsp;@com.google.android.exoplayer2.C.TrackType int&nbsp;getTrackType()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#getTrackType()">Renderer</a></code></span></div>
<div class="block">Returns the track type that the renderer handles.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#getTrackType()">getTrackType</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">Specified by:</span></dt>
<dd><code><a href="RendererCapabilities.html#getTrackType()">getTrackType</a></code>&nbsp;in interface&nbsp;<code><a href="RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="C.TrackType.html" title="annotation in com.google.android.exoplayer2"><code>track type</code></a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="ExoPlayer.html#getRendererType(int)"><code>ExoPlayer.getRendererType(int)</code></a></dd>
</dl>
</li>
</ul>
<a id="getCapabilities()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCapabilities</h4>
<pre class="methodSignature">public final&nbsp;<a href="RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a>&nbsp;getCapabilities()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#getCapabilities()">Renderer</a></code></span></div>
<div class="block">Returns the capabilities of the renderer.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#getCapabilities()">getCapabilities</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="returnLabel">Returns:</span></dt>
<dd>The capabilities of the renderer.</dd>
</dl>
</li>
</ul>
<a id="setIndex(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndex</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setIndex&#8203;(int&nbsp;index)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#setIndex(int)">Renderer</a></code></span></div>
<div class="block">Sets the index of this renderer within the player.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#setIndex(int)">setIndex</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="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The renderer index.</dd>
</dl>
</li>
</ul>
<a id="getMediaClock()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaClock</h4>
<pre class="methodSignature">@Nullable
public&nbsp;<a href="util/MediaClock.html" title="interface in com.google.android.exoplayer2.util">MediaClock</a>&nbsp;getMediaClock()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#getMediaClock()">Renderer</a></code></span></div>
<div class="block">If the renderer advances its own playback position then this method returns a corresponding
<a href="util/MediaClock.html" title="interface in com.google.android.exoplayer2.util"><code>MediaClock</code></a>. If provided, the player will use the returned <a href="util/MediaClock.html" title="interface in com.google.android.exoplayer2.util"><code>MediaClock</code></a> as its
source of time during playback. A player may have at most one renderer that returns a <a href="util/MediaClock.html" title="interface in com.google.android.exoplayer2.util"><code>MediaClock</code></a> from this method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#getMediaClock()">getMediaClock</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="returnLabel">Returns:</span></dt>
<dd>The <a href="util/MediaClock.html" title="interface in com.google.android.exoplayer2.util"><code>MediaClock</code></a> tracking the playback position of the renderer, or null.</dd>
</dl>
</li>
</ul>
<a id="getState()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getState</h4>
<pre class="methodSignature">public final&nbsp;int&nbsp;getState()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#getState()">Renderer</a></code></span></div>
<div class="block">Returns the current state of the renderer.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#getState()">getState</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="returnLabel">Returns:</span></dt>
<dd>The current state. One of <a href="Renderer.html#STATE_DISABLED"><code>Renderer.STATE_DISABLED</code></a>, <a href="Renderer.html#STATE_ENABLED"><code>Renderer.STATE_ENABLED</code></a> and <a href="Renderer.html#STATE_STARTED"><code>Renderer.STATE_STARTED</code></a>.</dd>
</dl>
</li>
</ul>
<a id="enable(com.google.android.exoplayer2.RendererConfiguration,com.google.android.exoplayer2.Format[],com.google.android.exoplayer2.source.SampleStream,long,boolean,boolean,long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>enable</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;enable&#8203;(<a href="RendererConfiguration.html" title="class in com.google.android.exoplayer2">RendererConfiguration</a>&nbsp;configuration,
<a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;formats,
<a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a>&nbsp;stream,
long&nbsp;positionUs,
boolean&nbsp;joining,
boolean&nbsp;mayRenderStartOfStream,
long&nbsp;startPositionUs,
long&nbsp;offsetUs)
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#enable(com.google.android.exoplayer2.RendererConfiguration,com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,boolean,boolean,long,long)">Renderer</a></code></span></div>
<div class="block">Enables the renderer to consume from the specified <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a>.
<p>This method may be called when the renderer is in the following states: <a href="Renderer.html#STATE_DISABLED"><code>Renderer.STATE_DISABLED</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.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></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>configuration</code> - The renderer configuration.</dd>
<dd><code>formats</code> - The enabled formats.</dd>
<dd><code>stream</code> - The <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> from which the renderer should consume.</dd>
<dd><code>positionUs</code> - The player's current position.</dd>
<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>
<dd><code>startPositionUs</code> - The start position of the stream in renderer time (microseconds).</dd>
<dd><code>offsetUs</code> - The offset to be added to timestamps of buffers read from <code>stream</code> before
they are rendered.</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="start()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;start()
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#start()">Renderer</a></code></span></div>
<div class="block">Starts the renderer, meaning that calls to <a href="Renderer.html#render(long,long)"><code>Renderer.render(long, long)</code></a> will cause media to be
rendered.
<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>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#start()">start</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="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="replaceStream(com.google.android.exoplayer2.Format[],com.google.android.exoplayer2.source.SampleStream,long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>replaceStream</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;replaceStream&#8203;(<a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;formats,
<a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a>&nbsp;stream,
long&nbsp;startPositionUs,
long&nbsp;offsetUs)
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#replaceStream(com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,long)">Renderer</a></code></span></div>
<div class="block">Replaces the <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> from which samples will be consumed.
<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#replaceStream(com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,long)">replaceStream</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="paramLabel">Parameters:</span></dt>
<dd><code>formats</code> - The enabled formats.</dd>
<dd><code>stream</code> - The <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> from which the renderer should consume.</dd>
<dd><code>startPositionUs</code> - The start position of the new stream in renderer time (microseconds).</dd>
<dd><code>offsetUs</code> - The offset to be added to timestamps of buffers read from <code>stream</code> before
they are rendered.</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="getStream()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStream</h4>
<pre class="methodSignature">@Nullable
public final&nbsp;<a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source">SampleStream</a>&nbsp;getStream()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#getStream()">Renderer</a></code></span></div>
<div class="block">Returns the <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> being consumed, or null if the renderer is disabled.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#getStream()">getStream</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="hasReadStreamToEnd()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasReadStreamToEnd</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;hasReadStreamToEnd()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#hasReadStreamToEnd()">Renderer</a></code></span></div>
<div class="block">Returns whether the renderer has read the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> to the end.
<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#hasReadStreamToEnd()">hasReadStreamToEnd</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="getReadingPositionUs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadingPositionUs</h4>
<pre class="methodSignature">public final&nbsp;long&nbsp;getReadingPositionUs()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#getReadingPositionUs()">Renderer</a></code></span></div>
<div class="block">Returns the renderer time up to which the renderer has read samples, in microseconds, or <a href="C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> if the renderer has read the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> to the end.
<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#getReadingPositionUs()">getReadingPositionUs</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="setCurrentStreamFinal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCurrentStreamFinal</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setCurrentStreamFinal()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#setCurrentStreamFinal()">Renderer</a></code></span></div>
<div class="block">Signals to the renderer that the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> will be the final one supplied
before it is next disabled or reset.
<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#setCurrentStreamFinal()">setCurrentStreamFinal</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="isCurrentStreamFinal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCurrentStreamFinal</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;isCurrentStreamFinal()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#isCurrentStreamFinal()">Renderer</a></code></span></div>
<div class="block">Returns whether the current <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> will be the final one supplied before the
renderer is next disabled or reset.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#isCurrentStreamFinal()">isCurrentStreamFinal</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="maybeThrowStreamError()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maybeThrowStreamError</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;maybeThrowStreamError()
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#maybeThrowStreamError()">Renderer</a></code></span></div>
<div class="block">Throws an error that's preventing the renderer from reading from its <a href="source/SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a>. Does
nothing if no such error exists.
<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#maybeThrowStreamError()">maybeThrowStreamError</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="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - An error that's preventing the renderer from making progress or buffering
more data.</dd>
</dl>
</li>
</ul>
<a id="resetPosition(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetPosition</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;resetPosition&#8203;(long&nbsp;positionUs)
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#resetPosition(long)">Renderer</a></code></span></div>
<div class="block">Signals to the renderer that a position discontinuity has occurred.
<p>After a position discontinuity, 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>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#resetPosition(long)">resetPosition</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="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The new playback position in microseconds.</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 reset.</dd>
</dl>
</li>
</ul>
<a id="stop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;stop()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#stop()">Renderer</a></code></span></div>
<div class="block">Stops the renderer, transitioning it to the <a href="Renderer.html#STATE_ENABLED"><code>Renderer.STATE_ENABLED</code></a> state.
<p>This method may be called when the renderer is in the following states: <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#stop()">stop</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="disable()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disable</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;disable()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#disable()">Renderer</a></code></span></div>
<div class="block">Disable the renderer, transitioning it to the <a href="Renderer.html#STATE_DISABLED"><code>Renderer.STATE_DISABLED</code></a> state.
<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>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#disable()">disable</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="reset()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;reset()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Renderer.html#reset()">Renderer</a></code></span></div>
<div class="block">Forces the renderer to give up any resources (e.g. media decoders) that it may be holding. If
the renderer is not holding any resources, the call is a no-op.
<p>This method may be called when the renderer is in the following states: <a href="Renderer.html#STATE_DISABLED"><code>Renderer.STATE_DISABLED</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Renderer.html#reset()">reset</a></code>&nbsp;in interface&nbsp;<code><a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a></code></dd>
</dl>
</li>
</ul>
<a id="supportsMixedMimeTypeAdaptation()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>supportsMixedMimeTypeAdaptation</h4>
<pre class="methodSignature"><a href="RendererCapabilities.AdaptiveSupport.html" title="annotation in com.google.android.exoplayer2">@AdaptiveSupport</a>
public&nbsp;int&nbsp;supportsMixedMimeTypeAdaptation()
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="RendererCapabilities.html#supportsMixedMimeTypeAdaptation()">RendererCapabilities</a></code></span></div>
<div class="block">Returns the extent to which the <a href="Renderer.html" title="interface in com.google.android.exoplayer2"><code>Renderer</code></a> supports adapting between supported formats
that have different MIME types.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="RendererCapabilities.html#supportsMixedMimeTypeAdaptation()">supportsMixedMimeTypeAdaptation</a></code>&nbsp;in interface&nbsp;<code><a href="RendererCapabilities.html" title="interface in com.google.android.exoplayer2">RendererCapabilities</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="RendererCapabilities.AdaptiveSupport.html" title="annotation in com.google.android.exoplayer2"><code>RendererCapabilities.AdaptiveSupport</code></a> for adapting between supported formats that have different
MIME types.</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="handleMessage(int,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleMessage</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;handleMessage&#8203;(<a href="Renderer.MessageType.html" title="annotation in com.google.android.exoplayer2">@MessageType</a>
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="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="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">Called when the renderer is enabled.
<p>The default implementation is a no-op.</div>
<dl>
<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="onStreamChanged(com.google.android.exoplayer2.Format[],long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onStreamChanged</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onStreamChanged&#8203;(<a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;formats,
long&nbsp;startPositionUs,
long&nbsp;offsetUs)
throws <a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block">Called when the renderer's stream has changed. This occurs when the renderer is enabled after
<a href="#onEnabled(boolean,boolean)"><code>onEnabled(boolean, boolean)</code></a> has been called, and also when the stream has been
replaced whilst the renderer is enabled or started.
<p>The default implementation is a no-op.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>formats</code> - The enabled formats.</dd>
<dd><code>startPositionUs</code> - The start position of the new stream in renderer time (microseconds).</dd>
<dd><code>offsetUs</code> - The offset that will be added to the timestamps of buffers read via <a href="#readSource(com.google.android.exoplayer2.FormatHolder,com.google.android.exoplayer2.decoder.DecoderInputBuffer,int)"><code>readSource(com.google.android.exoplayer2.FormatHolder, com.google.android.exoplayer2.decoder.DecoderInputBuffer, int)</code></a> so that decoder input buffers have monotonically increasing timestamps.</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">Called when the position is reset. This occurs when the renderer is enabled after <a href="#onStreamChanged(com.google.android.exoplayer2.Format%5B%5D,long,long)"><code>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="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="onStarted()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onStarted</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onStarted()
throws <a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></pre>
<div class="block">Called when the renderer is started.
<p>The default implementation is a no-op.</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> - If an error occurs.</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">Called when the renderer is stopped.
<p>The default implementation is a no-op.</div>
</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">Called when the renderer is disabled.
<p>The default implementation is a no-op.</div>
</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">Called when the renderer is reset.
<p>The default implementation is a no-op.</div>
</li>
</ul>
<a id="getLastResetPositionUs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLastResetPositionUs</h4>
<pre class="methodSignature">protected final&nbsp;long&nbsp;getLastResetPositionUs()</pre>
<div class="block">Returns the position passed to the most recent call to <a href="#enable(com.google.android.exoplayer2.RendererConfiguration,com.google.android.exoplayer2.Format%5B%5D,com.google.android.exoplayer2.source.SampleStream,long,boolean,boolean,long,long)"><code>enable(com.google.android.exoplayer2.RendererConfiguration, com.google.android.exoplayer2.Format[], com.google.android.exoplayer2.source.SampleStream, long, boolean, boolean, long, long)</code></a> or <a href="#resetPosition(long)"><code>resetPosition(long)</code></a>.</div>
</li>
</ul>
<a id="getFormatHolder()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFormatHolder</h4>
<pre class="methodSignature">protected final&nbsp;<a href="FormatHolder.html" title="class in com.google.android.exoplayer2">FormatHolder</a>&nbsp;getFormatHolder()</pre>
<div class="block">Returns a clear <a href="FormatHolder.html" title="class in com.google.android.exoplayer2"><code>FormatHolder</code></a>.</div>
</li>
</ul>
<a id="getStreamFormats()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStreamFormats</h4>
<pre class="methodSignature">protected final&nbsp;<a href="Format.html" title="class in com.google.android.exoplayer2">Format</a>[]&nbsp;getStreamFormats()</pre>
<div class="block">Returns the formats of the currently enabled stream.
<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>
</li>
</ul>
<a id="getConfiguration()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfiguration</h4>
<pre class="methodSignature">protected final&nbsp;<a href="RendererConfiguration.html" title="class in com.google.android.exoplayer2">RendererConfiguration</a>&nbsp;getConfiguration()</pre>
<div class="block">Returns the configuration set when the renderer was most recently enabled.
<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>
</li>
</ul>
<a id="getIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIndex</h4>
<pre class="methodSignature">protected final&nbsp;int&nbsp;getIndex()</pre>
<div class="block">Returns the index of the renderer within the player.</div>
</li>
</ul>
<a id="createRendererException(java.lang.Throwable,com.google.android.exoplayer2.Format,@com.google.android.exoplayer2.PlaybackException.ErrorCodeint)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRendererException</h4>
<pre class="methodSignature">protected final&nbsp;<a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a>&nbsp;createRendererException&#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="Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
<a href="PlaybackException.ErrorCode.html" title="annotation in com.google.android.exoplayer2">@ErrorCode</a>
@com.google.android.exoplayer2.PlaybackException.ErrorCode int&nbsp;errorCode)</pre>
<div class="block">Creates an <a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2"><code>ExoPlaybackException</code></a> of type <a href="ExoPlaybackException.html#TYPE_RENDERER"><code>ExoPlaybackException.TYPE_RENDERER</code></a> for
this renderer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cause</code> - The cause of the exception.</dd>
<dd><code>format</code> - The current format used by the renderer. May be null.</dd>
<dd><code>errorCode</code> - A <a href="PlaybackException.ErrorCode.html" title="annotation in com.google.android.exoplayer2"><code>PlaybackException.ErrorCode</code></a> to identify the cause of the playback
failure.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created instance, in which <a href="ExoPlaybackException.html#isRecoverable"><code>ExoPlaybackException.isRecoverable</code></a> is <code>
false</code>.</dd>
</dl>
</li>
</ul>
<a id="createRendererException(java.lang.Throwable,com.google.android.exoplayer2.Format,boolean,@com.google.android.exoplayer2.PlaybackException.ErrorCodeint)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRendererException</h4>
<pre class="methodSignature">protected final&nbsp;<a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a>&nbsp;createRendererException&#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="Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
boolean&nbsp;isRecoverable,
<a href="PlaybackException.ErrorCode.html" title="annotation in com.google.android.exoplayer2">@ErrorCode</a>
@com.google.android.exoplayer2.PlaybackException.ErrorCode int&nbsp;errorCode)</pre>
<div class="block">Creates an <a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2"><code>ExoPlaybackException</code></a> of type <a href="ExoPlaybackException.html#TYPE_RENDERER"><code>ExoPlaybackException.TYPE_RENDERER</code></a> for
this renderer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cause</code> - The cause of the exception.</dd>
<dd><code>format</code> - The current format used by the renderer. May be null.</dd>
<dd><code>isRecoverable</code> - If the error is recoverable by disabling and re-enabling the renderer.</dd>
<dd><code>errorCode</code> - A <a href="PlaybackException.ErrorCode.html" title="annotation in com.google.android.exoplayer2"><code>PlaybackException.ErrorCode</code></a> to identify the cause of the playback
failure.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created instance.</dd>
</dl>
</li>
</ul>
<a id="readSource(com.google.android.exoplayer2.FormatHolder,com.google.android.exoplayer2.decoder.DecoderInputBuffer,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readSource</h4>
<pre class="methodSignature"><a href="source/SampleStream.ReadDataResult.html" title="annotation in com.google.android.exoplayer2.source">@ReadDataResult</a>
protected final&nbsp;int&nbsp;readSource&#8203;(<a href="FormatHolder.html" title="class in com.google.android.exoplayer2">FormatHolder</a>&nbsp;formatHolder,
<a href="decoder/DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer</a>&nbsp;buffer,
<a href="source/SampleStream.ReadFlags.html" title="annotation in com.google.android.exoplayer2.source">@ReadFlags</a>
int&nbsp;readFlags)</pre>
<div class="block">Reads from the enabled upstream source. If the upstream source has been read to the end then
<a href="C.html#RESULT_BUFFER_READ"><code>C.RESULT_BUFFER_READ</code></a> is only returned if <a href="#setCurrentStreamFinal()"><code>setCurrentStreamFinal()</code></a> has been
called. <a href="C.html#RESULT_NOTHING_READ"><code>C.RESULT_NOTHING_READ</code></a> is returned otherwise.
<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="paramLabel">Parameters:</span></dt>
<dd><code>formatHolder</code> - A <a href="FormatHolder.html" title="class in com.google.android.exoplayer2"><code>FormatHolder</code></a> to populate in the case of reading a format.</dd>
<dd><code>buffer</code> - A <a href="decoder/DecoderInputBuffer.html" title="class in com.google.android.exoplayer2.decoder"><code>DecoderInputBuffer</code></a> to populate in the case of reading a sample or the
end of the stream. If the end of the stream has been reached, the <a href="C.html#BUFFER_FLAG_END_OF_STREAM"><code>C.BUFFER_FLAG_END_OF_STREAM</code></a> flag will be set on the buffer.</dd>
<dd><code>readFlags</code> - Flags controlling the behavior of this read operation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="source/SampleStream.ReadDataResult.html" title="annotation in com.google.android.exoplayer2.source"><code>result</code></a> of the read operation.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="decoder/DecoderInputBuffer.InsufficientCapacityException.html" title="class in com.google.android.exoplayer2.decoder">DecoderInputBuffer.InsufficientCapacityException</a></code> - If the <code>buffer</code> has insufficient capacity to hold
the data of a sample being read. The buffer <a href="decoder/DecoderInputBuffer.html#timeUs"><code>timestamp</code></a> and
flags are populated if this exception is thrown, but the read position is not advanced.</dd>
</dl>
</li>
</ul>
<a id="skipSource(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipSource</h4>
<pre class="methodSignature">protected&nbsp;int&nbsp;skipSource&#8203;(long&nbsp;positionUs)</pre>
<div class="block">Attempts to skip to the keyframe before the specified position, or to the end of the stream if
<code>positionUs</code> is beyond it.
<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="paramLabel">Parameters:</span></dt>
<dd><code>positionUs</code> - The position in microseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of samples that were skipped.</dd>
</dl>
</li>
</ul>
<a id="isSourceReady()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isSourceReady</h4>
<pre class="methodSignature">protected final&nbsp;boolean&nbsp;isSourceReady()</pre>
<div class="block">Returns whether the upstream source is ready.
<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>
</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>