938 lines
47 KiB
HTML
938 lines
47 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Wed Dec 14 17:18:31 GMT 2016 -->
|
|
<title>TrackRenderer (ExoPlayer library)</title>
|
|
<meta name="date" content="2016-12-14">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="TrackRenderer (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":10,"i6":10,"i7":6,"i8":10,"i9":6,"i10":6,"i11":6,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":6};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.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">
|
|
<li><a href="../../../../com/google/android/exoplayer/TimeRange.StaticTimeRange.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer/VideoFrameReleaseTimeHelper.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/google/android/exoplayer/TrackRenderer.html" target="_top">Frames</a></li>
|
|
<li><a href="TrackRenderer.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.google.android.exoplayer</div>
|
|
<h2 title="Class TrackRenderer" class="title">Class TrackRenderer</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.google.android.exoplayer.TrackRenderer</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><a href="../../../../com/google/android/exoplayer/ExoPlayer.ExoPlayerComponent.html" title="interface in com.google.android.exoplayer">ExoPlayer.ExoPlayerComponent</a></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><a href="../../../../com/google/android/exoplayer/DummyTrackRenderer.html" title="class in com.google.android.exoplayer">DummyTrackRenderer</a>, <a href="../../../../com/google/android/exoplayer/SampleSourceTrackRenderer.html" title="class in com.google.android.exoplayer">SampleSourceTrackRenderer</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public abstract class <span class="typeNameLabel">TrackRenderer</span>
|
|
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
|
|
implements <a href="../../../../com/google/android/exoplayer/ExoPlayer.ExoPlayerComponent.html" title="interface in com.google.android.exoplayer">ExoPlayer.ExoPlayerComponent</a></pre>
|
|
<div class="block">Renders a single component of media.
|
|
|
|
<p>Internally, a renderer's lifecycle is managed by the owning <a href="../../../../com/google/android/exoplayer/ExoPlayer.html" title="interface in com.google.android.exoplayer"><code>ExoPlayer</code></a>. The player
|
|
will transition its renderers through various states as the overall playback state changes. The
|
|
valid state transitions are shown below, annotated with the methods that are invoked during each
|
|
transition.
|
|
<p align="center"><img src="doc-files/trackrenderer-states.png"
|
|
alt="TrackRenderer state transitions"
|
|
border="0"></p></div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#END_OF_TRACK_US">END_OF_TRACK_US</a></span></code>
|
|
<div class="block">Represents the time of the end of the track.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#MATCH_LONGEST_US">MATCH_LONGEST_US</a></span></code>
|
|
<div class="block">Represents a time or duration that should match the duration of the longest track whose
|
|
duration is known.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED">STATE_ENABLED</a></span></code>
|
|
<div class="block">The renderer is enabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_PREPARED">STATE_PREPARED</a></span></code>
|
|
<div class="block">The renderer has completed necessary preparation.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_RELEASED">STATE_RELEASED</a></span></code>
|
|
<div class="block">The renderer has been released and should not be used.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED">STATE_STARTED</a></span></code>
|
|
<div class="block">The renderer is started.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_UNPREPARED">STATE_UNPREPARED</a></span></code>
|
|
<div class="block">The renderer has not yet been prepared.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#UNKNOWN_TIME_US">UNKNOWN_TIME_US</a></span></code>
|
|
<div class="block">Represents an unknown time or duration.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#TrackRenderer--">TrackRenderer</a></span>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>protected abstract boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#doPrepare-long-">doPrepare</a></span>(long positionUs)</code>
|
|
<div class="block">Invoked to make progress when the renderer is in the <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_UNPREPARED"><code>STATE_UNPREPARED</code></a> state.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>protected abstract void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#doSomeWork-long-long-">doSomeWork</a></span>(long positionUs,
|
|
long elapsedRealtimeUs)</code>
|
|
<div class="block">Invoked to make progress when the renderer is in the <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a> or
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a> states.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>protected abstract long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#getBufferedPositionUs--">getBufferedPositionUs</a></span>()</code>
|
|
<div class="block">Returns an estimate of the absolute position in microseconds up to which data is buffered.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>protected abstract long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#getDurationUs--">getDurationUs</a></span>()</code>
|
|
<div class="block">Returns the duration of the media being rendered.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>protected abstract <a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#getFormat-int-">getFormat</a></span>(int track)</code>
|
|
<div class="block">Returns the format of the specified track.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>protected <a href="../../../../com/google/android/exoplayer/MediaClock.html" title="interface in com.google.android.exoplayer">MediaClock</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#getMediaClock--">getMediaClock</a></span>()</code>
|
|
<div class="block">If the renderer advances its own playback position then this method returns a corresponding
|
|
<a href="../../../../com/google/android/exoplayer/MediaClock.html" title="interface in com.google.android.exoplayer"><code>MediaClock</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>protected int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#getState--">getState</a></span>()</code>
|
|
<div class="block">Returns the current state of the renderer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>protected abstract int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#getTrackCount--">getTrackCount</a></span>()</code>
|
|
<div class="block">Returns the number of tracks exposed by the renderer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#handleMessage-int-java.lang.Object-">handleMessage</a></span>(int what,
|
|
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)</code>
|
|
<div class="block">Handles a message delivered to the component.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>protected abstract boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#isEnded--">isEnded</a></span>()</code>
|
|
<div class="block">Whether the renderer is ready for the <a href="../../../../com/google/android/exoplayer/ExoPlayer.html" title="interface in com.google.android.exoplayer"><code>ExoPlayer</code></a> instance to transition to
|
|
<a href="../../../../com/google/android/exoplayer/ExoPlayer.html#STATE_ENDED"><code>ExoPlayer.STATE_ENDED</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>protected abstract boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#isReady--">isReady</a></span>()</code>
|
|
<div class="block">Whether the renderer is able to immediately render media from the current position.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>protected abstract void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#maybeThrowError--">maybeThrowError</a></span>()</code>
|
|
<div class="block">Throws an error that's preventing the renderer from making progress or buffering more data at
|
|
this point in time.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#onDisabled--">onDisabled</a></span>()</code>
|
|
<div class="block">Called when the renderer is disabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#onEnabled-int-long-boolean-">onEnabled</a></span>(int track,
|
|
long positionUs,
|
|
boolean joining)</code>
|
|
<div class="block">Called when the renderer is enabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#onReleased--">onReleased</a></span>()</code>
|
|
<div class="block">Called when the renderer is released.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#onStarted--">onStarted</a></span>()</code>
|
|
<div class="block">Called when the renderer is started.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#onStopped--">onStopped</a></span>()</code>
|
|
<div class="block">Called when the renderer is stopped.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>protected abstract void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/TrackRenderer.html#seekTo-long-">seekTo</a></span>(long positionUs)</code>
|
|
<div class="block">Seeks to a specified time in the track.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
|
|
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="UNKNOWN_TIME_US">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>UNKNOWN_TIME_US</h4>
|
|
<pre>public static final long UNKNOWN_TIME_US</pre>
|
|
<div class="block">Represents an unknown time or duration. Equal to <a href="../../../../com/google/android/exoplayer/C.html#UNKNOWN_TIME_US"><code>C.UNKNOWN_TIME_US</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.UNKNOWN_TIME_US">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="MATCH_LONGEST_US">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>MATCH_LONGEST_US</h4>
|
|
<pre>public static final long MATCH_LONGEST_US</pre>
|
|
<div class="block">Represents a time or duration that should match the duration of the longest track whose
|
|
duration is known. Equal to <a href="../../../../com/google/android/exoplayer/C.html#MATCH_LONGEST_US"><code>C.MATCH_LONGEST_US</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.MATCH_LONGEST_US">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="END_OF_TRACK_US">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>END_OF_TRACK_US</h4>
|
|
<pre>public static final long END_OF_TRACK_US</pre>
|
|
<div class="block">Represents the time of the end of the track.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.END_OF_TRACK_US">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_RELEASED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_RELEASED</h4>
|
|
<pre>protected static final int STATE_RELEASED</pre>
|
|
<div class="block">The renderer has been released and should not be used.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.STATE_RELEASED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_UNPREPARED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_UNPREPARED</h4>
|
|
<pre>protected static final int STATE_UNPREPARED</pre>
|
|
<div class="block">The renderer has not yet been prepared.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.STATE_UNPREPARED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_PREPARED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_PREPARED</h4>
|
|
<pre>protected static final int STATE_PREPARED</pre>
|
|
<div class="block">The renderer has completed necessary preparation. Preparation may include, for example,
|
|
reading the header of a media file to determine the track format and duration.
|
|
<p>
|
|
The renderer should not hold scarce or expensive system resources (e.g. media decoders) and
|
|
should not be actively buffering media data when in this state.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.STATE_PREPARED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_ENABLED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>STATE_ENABLED</h4>
|
|
<pre>protected static final int STATE_ENABLED</pre>
|
|
<div class="block">The renderer is enabled. It should either be ready to be started, or be actively working
|
|
towards this state (e.g. a renderer in this state will typically hold any resources that it
|
|
requires, such as media decoders, and will have buffered or be buffering any media data that
|
|
is required to start playback).</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.STATE_ENABLED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="STATE_STARTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>STATE_STARTED</h4>
|
|
<pre>protected static final int STATE_STARTED</pre>
|
|
<div class="block">The renderer is started. Calls to <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#doSomeWork-long-long-"><code>doSomeWork(long, long)</code></a> should cause the media to be
|
|
rendered.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.TrackRenderer.STATE_STARTED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="TrackRenderer--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>TrackRenderer</h4>
|
|
<pre>public TrackRenderer()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="getMediaClock--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMediaClock</h4>
|
|
<pre>protected <a href="../../../../com/google/android/exoplayer/MediaClock.html" title="interface in com.google.android.exoplayer">MediaClock</a> getMediaClock()</pre>
|
|
<div class="block">If the renderer advances its own playback position then this method returns a corresponding
|
|
<a href="../../../../com/google/android/exoplayer/MediaClock.html" title="interface in com.google.android.exoplayer"><code>MediaClock</code></a>. If provided, the player will use the returned <a href="../../../../com/google/android/exoplayer/MediaClock.html" title="interface in com.google.android.exoplayer"><code>MediaClock</code></a> as its
|
|
source of time during playback. A player may have at most one renderer that returns a
|
|
<a href="../../../../com/google/android/exoplayer/MediaClock.html" title="interface in com.google.android.exoplayer"><code>MediaClock</code></a> from this method.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The <a href="../../../../com/google/android/exoplayer/MediaClock.html" title="interface in com.google.android.exoplayer"><code>MediaClock</code></a> tracking the playback position of the renderer, or null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getState--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getState</h4>
|
|
<pre>protected final int getState()</pre>
|
|
<div class="block">Returns the current state of the renderer.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The current state (one of the STATE_* constants).</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="doPrepare-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>doPrepare</h4>
|
|
<pre>protected abstract boolean doPrepare(long positionUs)
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block">Invoked to make progress when the renderer is in the <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_UNPREPARED"><code>STATE_UNPREPARED</code></a> state. This
|
|
method will be called repeatedly until <code>true</code> is returned.
|
|
<p>
|
|
This method should return quickly, and should not block if the renderer is currently unable to
|
|
make any useful progress.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>positionUs</code> - The player's current playback position.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>True if the renderer is now prepared. False otherwise.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getTrackCount--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTrackCount</h4>
|
|
<pre>protected abstract int getTrackCount()</pre>
|
|
<div class="block">Returns the number of tracks exposed by the renderer.
|
|
<p>
|
|
This method may be called when the renderer is in the following states:
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_PREPARED"><code>STATE_PREPARED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The number of tracks.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getFormat-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getFormat</h4>
|
|
<pre>protected abstract <a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> getFormat(int track)</pre>
|
|
<div class="block">Returns the format of the specified track.
|
|
<p>
|
|
This method may be called when the renderer is in the following states:
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_PREPARED"><code>STATE_PREPARED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>track</code> - The track index.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The format of the specified track.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onEnabled-int-long-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onEnabled</h4>
|
|
<pre>protected void onEnabled(int track,
|
|
long positionUs,
|
|
boolean joining)
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">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>track</code> - The track for which the renderer is being enabled.</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>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onStarted--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onStarted</h4>
|
|
<pre>protected void onStarted()
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">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="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onStopped--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onStopped</h4>
|
|
<pre>protected void onStopped()
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block">Called when the renderer is stopped.
|
|
<p>
|
|
The default implementation is a no-op.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onDisabled--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onDisabled</h4>
|
|
<pre>protected void onDisabled()
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block">Called when the renderer is disabled.
|
|
<p>
|
|
The default implementation is a no-op.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onReleased--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onReleased</h4>
|
|
<pre>protected void onReleased()
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block">Called when the renderer is released.
|
|
<p>
|
|
The default implementation is a no-op.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isEnded--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isEnded</h4>
|
|
<pre>protected abstract boolean isEnded()</pre>
|
|
<div class="block">Whether the renderer is ready for the <a href="../../../../com/google/android/exoplayer/ExoPlayer.html" title="interface in com.google.android.exoplayer"><code>ExoPlayer</code></a> instance to transition to
|
|
<a href="../../../../com/google/android/exoplayer/ExoPlayer.html#STATE_ENDED"><code>ExoPlayer.STATE_ENDED</code></a>. The player will make this transition as soon as <code>true</code> is
|
|
returned by all of its <a href="../../../../com/google/android/exoplayer/TrackRenderer.html" title="class in com.google.android.exoplayer"><code>TrackRenderer</code></a>s.
|
|
<p>
|
|
This method may be called when the renderer is in the following states:
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the renderer is ready for the player to transition to the ended state.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isReady--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isReady</h4>
|
|
<pre>protected abstract boolean isReady()</pre>
|
|
<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="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>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="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>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="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>True if the renderer is ready to render media. False otherwise.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="doSomeWork-long-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>doSomeWork</h4>
|
|
<pre>protected abstract void doSomeWork(long positionUs,
|
|
long elapsedRealtimeUs)
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block">Invoked to make progress when the renderer is in the <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a> or
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a> states.
|
|
<p>
|
|
If the renderer's state is <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a>, then repeated calls to this method should
|
|
cause the media track to be rendered. If the state is <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, then repeated
|
|
calls should make progress towards getting the renderer into a position where it is ready to
|
|
render the track.
|
|
<p>
|
|
This method should return quickly, and should not block if the renderer is currently unable to
|
|
make any useful progress.
|
|
<p>
|
|
This method may be called when the renderer is in the following states:
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a></div>
|
|
<dl>
|
|
<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?is-external=true#elapsedRealtime--" title="class or interface in android.os"><code>SystemClock.elapsedRealtime()</code></a> in microseconds,
|
|
measured at the start of the current iteration of the rendering loop.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="maybeThrowError--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>maybeThrowError</h4>
|
|
<pre>protected abstract void maybeThrowError()
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block">Throws an error that's preventing the renderer from making progress or buffering more data at
|
|
this point in time.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - An error that's preventing the renderer from making progress or
|
|
buffering more data.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDurationUs--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDurationUs</h4>
|
|
<pre>protected abstract long getDurationUs()</pre>
|
|
<div class="block">Returns the duration of the media being rendered.
|
|
<p>
|
|
This method may be called when the renderer is in the following states:
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_PREPARED"><code>STATE_PREPARED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The duration of the track in microseconds, or <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#MATCH_LONGEST_US"><code>MATCH_LONGEST_US</code></a> if
|
|
the track's duration should match that of the longest track whose duration is known, or
|
|
or <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#UNKNOWN_TIME_US"><code>UNKNOWN_TIME_US</code></a> if the duration is not known.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getBufferedPositionUs--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBufferedPositionUs</h4>
|
|
<pre>protected abstract long getBufferedPositionUs()</pre>
|
|
<div class="block">Returns an estimate of the absolute position in microseconds up to which data is buffered.
|
|
<p>
|
|
This method may be called when the renderer is in the following states:
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a>, <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_STARTED"><code>STATE_STARTED</code></a></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>An estimate of the absolute position in microseconds up to which data is buffered,
|
|
or <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#END_OF_TRACK_US"><code>END_OF_TRACK_US</code></a> if the track is fully buffered, or <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#UNKNOWN_TIME_US"><code>UNKNOWN_TIME_US</code></a> if
|
|
no estimate is available.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="seekTo-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>seekTo</h4>
|
|
<pre>protected abstract void seekTo(long positionUs)
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block">Seeks to a specified time in the track.
|
|
<p>
|
|
This method may be called when the renderer is in the following states:
|
|
<a href="../../../../com/google/android/exoplayer/TrackRenderer.html#STATE_ENABLED"><code>STATE_ENABLED</code></a></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>positionUs</code> - The desired playback position in microseconds.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="handleMessage-int-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>handleMessage</h4>
|
|
<pre>public void handleMessage(int what,
|
|
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)
|
|
throws <a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/ExoPlayer.ExoPlayerComponent.html#handleMessage-int-java.lang.Object-">ExoPlayer.ExoPlayerComponent</a></code></span></div>
|
|
<div class="block">Handles a message delivered to the component. Invoked on the playback thread.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlayer.ExoPlayerComponent.html#handleMessage-int-java.lang.Object-">handleMessage</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/ExoPlayer.ExoPlayerComponent.html" title="interface in com.google.android.exoplayer">ExoPlayer.ExoPlayerComponent</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>what</code> - An integer identifying the type of message.</dd>
|
|
<dd><code>object</code> - The message object.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/ExoPlaybackException.html" title="class in com.google.android.exoplayer">ExoPlaybackException</a></code> - If an error occurred whilst handling the message.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.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">
|
|
<li><a href="../../../../com/google/android/exoplayer/TimeRange.StaticTimeRange.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer/VideoFrameReleaseTimeHelper.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/google/android/exoplayer/TrackRenderer.html" target="_top">Frames</a></li>
|
|
<li><a href="TrackRenderer.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All 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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|