605 lines
34 KiB
HTML
605 lines
34 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>DefaultLoadControl (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="DefaultLoadControl (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":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";
|
|
</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/DecoderInfo.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.EventListener.html" title="interface 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/DefaultLoadControl.html" target="_top">Frames</a></li>
|
|
<li><a href="DefaultLoadControl.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><a href="#nested.class.summary">Nested</a> | </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 DefaultLoadControl" class="title">Class DefaultLoadControl</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.DefaultLoadControl</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/LoadControl.html" title="interface in com.google.android.exoplayer">LoadControl</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public final class <span class="typeNameLabel">DefaultLoadControl</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/LoadControl.html" title="interface in com.google.android.exoplayer">LoadControl</a></pre>
|
|
<div class="block">A <a href="../../../../com/google/android/exoplayer/LoadControl.html" title="interface in com.google.android.exoplayer"><code>LoadControl</code></a> implementation that allows loads to continue in a sequence that prevents
|
|
any loader from getting too far ahead or behind any of the other loaders.
|
|
<p>
|
|
Loads are scheduled so as to fill the available buffer space as rapidly as possible. Once the
|
|
duration of buffered media and the buffer utilization both exceed respective thresholds, the
|
|
control switches to a draining state during which no loads are permitted to start. During
|
|
draining periods, resources such as the device radio have an opportunity to switch into low
|
|
power modes. The control reverts back to the loading state when either the duration of buffered
|
|
media or the buffer utilization fall below respective thresholds.
|
|
<p>
|
|
This implementation of <a href="../../../../com/google/android/exoplayer/LoadControl.html" title="interface in com.google.android.exoplayer"><code>LoadControl</code></a> integrates with <a href="../../../../com/google/android/exoplayer/upstream/NetworkLock.html" title="class in com.google.android.exoplayer.upstream"><code>NetworkLock</code></a>, by registering
|
|
itself as a task with priority <a href="../../../../com/google/android/exoplayer/upstream/NetworkLock.html#STREAMING_PRIORITY"><code>NetworkLock.STREAMING_PRIORITY</code></a> during loading periods,
|
|
and unregistering itself during draining periods.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Class and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static interface </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.EventListener.html" title="interface in com.google.android.exoplayer">DefaultLoadControl.EventListener</a></span></code>
|
|
<div class="block">Interface definition for a callback to be notified of <a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html" title="class in com.google.android.exoplayer"><code>DefaultLoadControl</code></a> events.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- =========== 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 float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#DEFAULT_HIGH_BUFFER_LOAD">DEFAULT_HIGH_BUFFER_LOAD</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#DEFAULT_HIGH_WATERMARK_MS">DEFAULT_HIGH_WATERMARK_MS</a></span></code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#DEFAULT_LOW_BUFFER_LOAD">DEFAULT_LOW_BUFFER_LOAD</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#DEFAULT_LOW_WATERMARK_MS">DEFAULT_LOW_WATERMARK_MS</a></span></code> </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/DefaultLoadControl.html#DefaultLoadControl-com.google.android.exoplayer.upstream.Allocator-">DefaultLoadControl</a></span>(<a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a> allocator)</code>
|
|
<div class="block">Constructs a new instance, using the <code>DEFAULT_*</code> constants defined in this class.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#DefaultLoadControl-com.google.android.exoplayer.upstream.Allocator-android.os.Handler-com.google.android.exoplayer.DefaultLoadControl.EventListener-">DefaultLoadControl</a></span>(<a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a> allocator,
|
|
<a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os">Handler</a> eventHandler,
|
|
<a href="../../../../com/google/android/exoplayer/DefaultLoadControl.EventListener.html" title="interface in com.google.android.exoplayer">DefaultLoadControl.EventListener</a> eventListener)</code>
|
|
<div class="block">Constructs a new instance, using the <code>DEFAULT_*</code> constants defined in this class.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#DefaultLoadControl-com.google.android.exoplayer.upstream.Allocator-android.os.Handler-com.google.android.exoplayer.DefaultLoadControl.EventListener-int-int-float-float-">DefaultLoadControl</a></span>(<a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a> allocator,
|
|
<a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os">Handler</a> eventHandler,
|
|
<a href="../../../../com/google/android/exoplayer/DefaultLoadControl.EventListener.html" title="interface in com.google.android.exoplayer">DefaultLoadControl.EventListener</a> eventListener,
|
|
int lowWatermarkMs,
|
|
int highWatermarkMs,
|
|
float lowBufferLoad,
|
|
float highBufferLoad)</code>
|
|
<div class="block">Constructs a new instance.</div>
|
|
</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="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><a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#getAllocator--">getAllocator</a></span>()</code>
|
|
<div class="block">Gets the <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a> that loaders should use to obtain memory allocations into which
|
|
data can be loaded.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#register-java.lang.Object-int-">register</a></span>(<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> loader,
|
|
int bufferSizeContribution)</code>
|
|
<div class="block">Registers a loader.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#trimAllocator--">trimAllocator</a></span>()</code>
|
|
<div class="block">Hints to the control that it should consider trimming any unused memory being held in order
|
|
to satisfy allocation requests.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#unregister-java.lang.Object-">unregister</a></span>(<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> loader)</code>
|
|
<div class="block">Unregisters a loader.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.html#update-java.lang.Object-long-long-boolean-">update</a></span>(<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> loader,
|
|
long playbackPositionUs,
|
|
long nextLoadPositionUs,
|
|
boolean loading)</code>
|
|
<div class="block">Invoked by a loader to update the control with its current state.</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="DEFAULT_LOW_WATERMARK_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_LOW_WATERMARK_MS</h4>
|
|
<pre>public static final int DEFAULT_LOW_WATERMARK_MS</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.DefaultLoadControl.DEFAULT_LOW_WATERMARK_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DEFAULT_HIGH_WATERMARK_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_HIGH_WATERMARK_MS</h4>
|
|
<pre>public static final int DEFAULT_HIGH_WATERMARK_MS</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.DefaultLoadControl.DEFAULT_HIGH_WATERMARK_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DEFAULT_LOW_BUFFER_LOAD">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_LOW_BUFFER_LOAD</h4>
|
|
<pre>public static final float DEFAULT_LOW_BUFFER_LOAD</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.DefaultLoadControl.DEFAULT_LOW_BUFFER_LOAD">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DEFAULT_HIGH_BUFFER_LOAD">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_HIGH_BUFFER_LOAD</h4>
|
|
<pre>public static final float DEFAULT_HIGH_BUFFER_LOAD</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.DefaultLoadControl.DEFAULT_HIGH_BUFFER_LOAD">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="DefaultLoadControl-com.google.android.exoplayer.upstream.Allocator-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DefaultLoadControl</h4>
|
|
<pre>public DefaultLoadControl(<a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a> allocator)</pre>
|
|
<div class="block">Constructs a new instance, using the <code>DEFAULT_*</code> constants defined in this class.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>allocator</code> - The <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a> used by the loader.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DefaultLoadControl-com.google.android.exoplayer.upstream.Allocator-android.os.Handler-com.google.android.exoplayer.DefaultLoadControl.EventListener-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DefaultLoadControl</h4>
|
|
<pre>public DefaultLoadControl(<a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a> allocator,
|
|
<a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os">Handler</a> eventHandler,
|
|
<a href="../../../../com/google/android/exoplayer/DefaultLoadControl.EventListener.html" title="interface in com.google.android.exoplayer">DefaultLoadControl.EventListener</a> eventListener)</pre>
|
|
<div class="block">Constructs a new instance, using the <code>DEFAULT_*</code> constants defined in this class.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>allocator</code> - The <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a> used by the loader.</dd>
|
|
<dd><code>eventHandler</code> - A handler to use when delivering events to <code>eventListener</code>. May be
|
|
null if delivery of events is not required.</dd>
|
|
<dd><code>eventListener</code> - A listener of events. May be null if delivery of events is not required.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DefaultLoadControl-com.google.android.exoplayer.upstream.Allocator-android.os.Handler-com.google.android.exoplayer.DefaultLoadControl.EventListener-int-int-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DefaultLoadControl</h4>
|
|
<pre>public DefaultLoadControl(<a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a> allocator,
|
|
<a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os">Handler</a> eventHandler,
|
|
<a href="../../../../com/google/android/exoplayer/DefaultLoadControl.EventListener.html" title="interface in com.google.android.exoplayer">DefaultLoadControl.EventListener</a> eventListener,
|
|
int lowWatermarkMs,
|
|
int highWatermarkMs,
|
|
float lowBufferLoad,
|
|
float highBufferLoad)</pre>
|
|
<div class="block">Constructs a new instance.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>allocator</code> - The <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a> used by the loader.</dd>
|
|
<dd><code>eventHandler</code> - A handler to use when delivering events to <code>eventListener</code>. May be
|
|
null if delivery of events is not required.</dd>
|
|
<dd><code>eventListener</code> - A listener of events. May be null if delivery of events is not required.</dd>
|
|
<dd><code>lowWatermarkMs</code> - The minimum duration of media that can be buffered for the control to
|
|
be in the draining state. If less media is buffered, then the control will transition to
|
|
the filling state.</dd>
|
|
<dd><code>highWatermarkMs</code> - The minimum duration of media that can be buffered for the control to
|
|
transition from filling to draining.</dd>
|
|
<dd><code>lowBufferLoad</code> - The minimum fraction of the buffer that must be utilized for the control
|
|
to be in the draining state. If the utilization is lower, then the control will transition
|
|
to the filling state.</dd>
|
|
<dd><code>highBufferLoad</code> - The minimum fraction of the buffer that must be utilized for the control
|
|
to transition from the loading state to the draining state.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="register-java.lang.Object-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>register</h4>
|
|
<pre>public void register(<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> loader,
|
|
int bufferSizeContribution)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/LoadControl.html#register-java.lang.Object-int-">LoadControl</a></code></span></div>
|
|
<div class="block">Registers a loader.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/LoadControl.html#register-java.lang.Object-int-">register</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/LoadControl.html" title="interface in com.google.android.exoplayer">LoadControl</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>loader</code> - The loader being registered.</dd>
|
|
<dd><code>bufferSizeContribution</code> - For instances whose <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a> maintains a pool of memory
|
|
for the purpose of satisfying allocation requests, this is a hint indicating the loader's
|
|
desired contribution to the size of the pool, in bytes.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="unregister-java.lang.Object-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unregister</h4>
|
|
<pre>public void unregister(<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> loader)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/LoadControl.html#unregister-java.lang.Object-">LoadControl</a></code></span></div>
|
|
<div class="block">Unregisters a loader.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/LoadControl.html#unregister-java.lang.Object-">unregister</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/LoadControl.html" title="interface in com.google.android.exoplayer">LoadControl</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>loader</code> - The loader being unregistered.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="trimAllocator--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>trimAllocator</h4>
|
|
<pre>public void trimAllocator()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/LoadControl.html#trimAllocator--">LoadControl</a></code></span></div>
|
|
<div class="block">Hints to the control that it should consider trimming any unused memory being held in order
|
|
to satisfy allocation requests.
|
|
<p>
|
|
This method is typically invoked by a recently unregistered loader, once it has released all
|
|
of its allocations back to the <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/LoadControl.html#trimAllocator--">trimAllocator</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/LoadControl.html" title="interface in com.google.android.exoplayer">LoadControl</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAllocator--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAllocator</h4>
|
|
<pre>public <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream">Allocator</a> getAllocator()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/LoadControl.html#getAllocator--">LoadControl</a></code></span></div>
|
|
<div class="block">Gets the <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a> that loaders should use to obtain memory allocations into which
|
|
data can be loaded.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/LoadControl.html#getAllocator--">getAllocator</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/LoadControl.html" title="interface in com.google.android.exoplayer">LoadControl</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The <a href="../../../../com/google/android/exoplayer/upstream/Allocator.html" title="interface in com.google.android.exoplayer.upstream"><code>Allocator</code></a> to use.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="update-java.lang.Object-long-long-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>update</h4>
|
|
<pre>public boolean update(<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> loader,
|
|
long playbackPositionUs,
|
|
long nextLoadPositionUs,
|
|
boolean loading)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/LoadControl.html#update-java.lang.Object-long-long-boolean-">LoadControl</a></code></span></div>
|
|
<div class="block">Invoked by a loader to update the control with its current state.
|
|
<p>
|
|
This method must be called by a registered loader whenever its state changes. This is true
|
|
even if the registered loader does not itself wish to start its next load (since the state of
|
|
the loader will still affect whether other registered loaders are allowed to proceed).</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/LoadControl.html#update-java.lang.Object-long-long-boolean-">update</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/LoadControl.html" title="interface in com.google.android.exoplayer">LoadControl</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>loader</code> - The loader invoking the update.</dd>
|
|
<dd><code>playbackPositionUs</code> - The loader's playback position.</dd>
|
|
<dd><code>nextLoadPositionUs</code> - The loader's next load position. -1 if finished, failed, or if the
|
|
next load position is not yet known.</dd>
|
|
<dd><code>loading</code> - Whether the loader is currently loading data.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>True if the loader is allowed to start its next load. False otherwise.</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/DecoderInfo.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer/DefaultLoadControl.EventListener.html" title="interface 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/DefaultLoadControl.html" target="_top">Frames</a></li>
|
|
<li><a href="DefaultLoadControl.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><a href="#nested.class.summary">Nested</a> | </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>
|