1020 lines
49 KiB
HTML
1020 lines
49 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>DefaultLoadControl (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="DefaultLoadControl (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};
|
|
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 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: </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 id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </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> <a href="package-summary.html">com.google.android.exoplayer2</a></div>
|
|
<h2 title="Class DefaultLoadControl" class="title">Class DefaultLoadControl</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.DefaultLoadControl</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public class <span class="typeNameLabel">DefaultLoadControl</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="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></pre>
|
|
<div class="block">The default <a href="LoadControl.html" title="interface in com.google.android.exoplayer2"><code>LoadControl</code></a> implementation.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Class</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLoadControl.Builder.html" title="class in com.google.android.exoplayer2">DefaultLoadControl.Builder</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Builder for <a href="DefaultLoadControl.html" title="class in com.google.android.exoplayer2"><code>DefaultLoadControl</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Field</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_AUDIO_BUFFER_SIZE">DEFAULT_AUDIO_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A default size in bytes for an audio buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_BACK_BUFFER_DURATION_MS">DEFAULT_BACK_BUFFER_DURATION_MS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default back buffer duration in milliseconds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS">DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default duration of media that must be buffered for playback to resume after a rebuffer, in
|
|
milliseconds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_BUFFER_FOR_PLAYBACK_MS">DEFAULT_BUFFER_FOR_PLAYBACK_MS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default duration of media that must be buffered for playback to start or resume following a
|
|
user action such as a seek, in milliseconds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_CAMERA_MOTION_BUFFER_SIZE">DEFAULT_CAMERA_MOTION_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A default size in bytes for a camera motion buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_IMAGE_BUFFER_SIZE">DEFAULT_IMAGE_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A default size in bytes for an image buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_MAX_BUFFER_MS">DEFAULT_MAX_BUFFER_MS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default maximum duration of media that the player will attempt to buffer, in milliseconds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_METADATA_BUFFER_SIZE">DEFAULT_METADATA_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A default size in bytes for a metadata buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_MIN_BUFFER_MS">DEFAULT_MIN_BUFFER_MS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default minimum duration of media that the player will attempt to ensure is buffered at all
|
|
times, in milliseconds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_MIN_BUFFER_SIZE">DEFAULT_MIN_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The buffer size in bytes that will be used as a minimum target buffer in all cases.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_MUXED_BUFFER_SIZE">DEFAULT_MUXED_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A default size in bytes for a muxed buffer (e.g.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS">DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default prioritization of buffer time constraints over size constraints.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME">DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default for whether the back buffer is retained from the previous keyframe.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_TARGET_BUFFER_BYTES">DEFAULT_TARGET_BUFFER_BYTES</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The default target buffer size in bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_TEXT_BUFFER_SIZE">DEFAULT_TEXT_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A default size in bytes for a text buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_VIDEO_BUFFER_SIZE">DEFAULT_VIDEO_BUFFER_SIZE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A default size in bytes for a video buffer.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</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"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier</th>
|
|
<th class="colSecond" scope="col">Constructor</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code> </code></td>
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">DefaultLoadControl</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<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="colFirst"><code>protected </code></td>
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(com.google.android.exoplayer2.upstream.DefaultAllocator,int,int,int,int,int,boolean,int,boolean)">DefaultLoadControl</a></span>​(<a href="upstream/DefaultAllocator.html" title="class in com.google.android.exoplayer2.upstream">DefaultAllocator</a> allocator,
|
|
int minBufferMs,
|
|
int maxBufferMs,
|
|
int bufferForPlaybackMs,
|
|
int bufferForPlaybackAfterRebufferMs,
|
|
int targetBufferBytes,
|
|
boolean prioritizeTimeOverSizeThresholds,
|
|
int backBufferDurationMs,
|
|
boolean retainBackBufferFromKeyframe)</code></th>
|
|
<td class="colLast"> </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"> </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="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>protected int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#calculateTargetBufferBytes(com.google.android.exoplayer2.Renderer%5B%5D,com.google.android.exoplayer2.trackselection.ExoTrackSelection%5B%5D)">calculateTargetBufferBytes</a></span>​(<a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[] renderers,
|
|
<a href="trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[] trackSelectionArray)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Calculate target buffer size in bytes based on the selected tracks.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code><a href="upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAllocator()">getAllocator</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream"><code>Allocator</code></a> that should be used to obtain media buffer allocations.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBackBufferDurationUs()">getBackBufferDurationUs</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the duration of media to retain in the buffer prior to the current playback position,
|
|
for fast backward seeking.</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="#onPrepared()">onPrepared</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called by the player when prepared with a new source.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onReleased()">onReleased</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called by the player when released.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>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 by the player when stopped.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onTracksSelected(com.google.android.exoplayer2.Renderer%5B%5D,com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.trackselection.ExoTrackSelection%5B%5D)">onTracksSelected</a></span>​(<a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[] renderers,
|
|
<a href="source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a> trackGroups,
|
|
<a href="trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[] trackSelections)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called by the player when a track selection occurs.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#retainBackBufferFromKeyframe()">retainBackBufferFromKeyframe</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether media should be retained from the keyframe before the current playback position
|
|
minus <a href="LoadControl.html#getBackBufferDurationUs()"><code>LoadControl.getBackBufferDurationUs()</code></a>, rather than any sample before or at that position.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldContinueLoading(long,long,float)">shouldContinueLoading</a></span>​(long playbackPositionUs,
|
|
long bufferedDurationUs,
|
|
float playbackSpeed)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called by the player to determine whether it should continue to load the source.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldStartPlayback(long,float,boolean,long)">shouldStartPlayback</a></span>​(long bufferedDurationUs,
|
|
float playbackSpeed,
|
|
boolean rebuffering,
|
|
long targetLiveOffsetUs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called repeatedly by the player when it's loading the source, has yet to start playback, and
|
|
has the minimum amount of data necessary for playback to be started.</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 java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
|
|
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a id="DEFAULT_MIN_BUFFER_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_MIN_BUFFER_MS</h4>
|
|
<pre>public static final int DEFAULT_MIN_BUFFER_MS</pre>
|
|
<div class="block">The default minimum duration of media that the player will attempt to ensure is buffered at all
|
|
times, in milliseconds.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MIN_BUFFER_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_MAX_BUFFER_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_MAX_BUFFER_MS</h4>
|
|
<pre>public static final int DEFAULT_MAX_BUFFER_MS</pre>
|
|
<div class="block">The default maximum duration of media that the player will attempt to buffer, in milliseconds.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MAX_BUFFER_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_BUFFER_FOR_PLAYBACK_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_BUFFER_FOR_PLAYBACK_MS</h4>
|
|
<pre>public static final int DEFAULT_BUFFER_FOR_PLAYBACK_MS</pre>
|
|
<div class="block">The default duration of media that must be buffered for playback to start or resume following a
|
|
user action such as a seek, in milliseconds.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS</h4>
|
|
<pre>public static final int DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS</pre>
|
|
<div class="block">The default duration of media that must be buffered for playback to resume after a rebuffer, in
|
|
milliseconds. A rebuffer is defined to be caused by buffer depletion rather than a user action.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_TARGET_BUFFER_BYTES">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_TARGET_BUFFER_BYTES</h4>
|
|
<pre>public static final int DEFAULT_TARGET_BUFFER_BYTES</pre>
|
|
<div class="block">The default target buffer size in bytes. The value (<a href="C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a>) means that the load
|
|
control will calculate the target buffer size based on the selected tracks.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_TARGET_BUFFER_BYTES">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS</h4>
|
|
<pre>public static final boolean DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS</pre>
|
|
<div class="block">The default prioritization of buffer time constraints over size constraints.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_BACK_BUFFER_DURATION_MS">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_BACK_BUFFER_DURATION_MS</h4>
|
|
<pre>public static final int DEFAULT_BACK_BUFFER_DURATION_MS</pre>
|
|
<div class="block">The default back buffer duration in milliseconds.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_BACK_BUFFER_DURATION_MS">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME</h4>
|
|
<pre>public static final boolean DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME</pre>
|
|
<div class="block">The default for whether the back buffer is retained from the previous keyframe.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_VIDEO_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_VIDEO_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_VIDEO_BUFFER_SIZE</pre>
|
|
<div class="block">A default size in bytes for a video buffer.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_VIDEO_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_AUDIO_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_AUDIO_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_AUDIO_BUFFER_SIZE</pre>
|
|
<div class="block">A default size in bytes for an audio buffer.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_AUDIO_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_TEXT_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_TEXT_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_TEXT_BUFFER_SIZE</pre>
|
|
<div class="block">A default size in bytes for a text buffer.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_TEXT_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_METADATA_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_METADATA_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_METADATA_BUFFER_SIZE</pre>
|
|
<div class="block">A default size in bytes for a metadata buffer.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_METADATA_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_CAMERA_MOTION_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_CAMERA_MOTION_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_CAMERA_MOTION_BUFFER_SIZE</pre>
|
|
<div class="block">A default size in bytes for a camera motion buffer.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_CAMERA_MOTION_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_IMAGE_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_IMAGE_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_IMAGE_BUFFER_SIZE</pre>
|
|
<div class="block">A default size in bytes for an image buffer.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_IMAGE_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_MUXED_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_MUXED_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_MUXED_BUFFER_SIZE</pre>
|
|
<div class="block">A default size in bytes for a muxed buffer (e.g. containing video, audio and text).</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MUXED_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="DEFAULT_MIN_BUFFER_SIZE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_MIN_BUFFER_SIZE</h4>
|
|
<pre>public static final int DEFAULT_MIN_BUFFER_SIZE</pre>
|
|
<div class="block">The buffer size in bytes that will be used as a minimum target buffer in all cases. This is
|
|
also the default target buffer before tracks are selected.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MIN_BUFFER_SIZE">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a id="<init>()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DefaultLoadControl</h4>
|
|
<pre>public DefaultLoadControl()</pre>
|
|
<div class="block">Constructs a new instance, using the <code>DEFAULT_*</code> constants defined in this class.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="<init>(com.google.android.exoplayer2.upstream.DefaultAllocator,int,int,int,int,int,boolean,int,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DefaultLoadControl</h4>
|
|
<pre>protected DefaultLoadControl​(<a href="upstream/DefaultAllocator.html" title="class in com.google.android.exoplayer2.upstream">DefaultAllocator</a> allocator,
|
|
int minBufferMs,
|
|
int maxBufferMs,
|
|
int bufferForPlaybackMs,
|
|
int bufferForPlaybackAfterRebufferMs,
|
|
int targetBufferBytes,
|
|
boolean prioritizeTimeOverSizeThresholds,
|
|
int backBufferDurationMs,
|
|
boolean retainBackBufferFromKeyframe)</pre>
|
|
</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="onPrepared()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onPrepared</h4>
|
|
<pre class="methodSignature">public void onPrepared()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#onPrepared()">LoadControl</a></code></span></div>
|
|
<div class="block">Called by the player when prepared with a new source.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#onPrepared()">onPrepared</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="onTracksSelected(com.google.android.exoplayer2.Renderer[],com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.trackselection.ExoTrackSelection[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onTracksSelected</h4>
|
|
<pre class="methodSignature">public void onTracksSelected​(<a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[] renderers,
|
|
<a href="source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a> trackGroups,
|
|
<a href="trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[] trackSelections)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#onTracksSelected(com.google.android.exoplayer2.Renderer%5B%5D,com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.trackselection.ExoTrackSelection%5B%5D)">LoadControl</a></code></span></div>
|
|
<div class="block">Called by the player when a track selection occurs.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#onTracksSelected(com.google.android.exoplayer2.Renderer%5B%5D,com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.trackselection.ExoTrackSelection%5B%5D)">onTracksSelected</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>renderers</code> - The renderers.</dd>
|
|
<dd><code>trackGroups</code> - The <a href="source/TrackGroup.html" title="class in com.google.android.exoplayer2.source"><code>TrackGroup</code></a>s from which the selection was made.</dd>
|
|
<dd><code>trackSelections</code> - The track selections that were made.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="onStopped()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onStopped</h4>
|
|
<pre class="methodSignature">public void onStopped()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#onStopped()">LoadControl</a></code></span></div>
|
|
<div class="block">Called by the player when stopped.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#onStopped()">onStopped</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="onReleased()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onReleased</h4>
|
|
<pre class="methodSignature">public void onReleased()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#onReleased()">LoadControl</a></code></span></div>
|
|
<div class="block">Called by the player when released.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#onReleased()">onReleased</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAllocator()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAllocator</h4>
|
|
<pre class="methodSignature">public <a href="upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a> getAllocator()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#getAllocator()">LoadControl</a></code></span></div>
|
|
<div class="block">Returns the <a href="upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream"><code>Allocator</code></a> that should be used to obtain media buffer allocations.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#getAllocator()">getAllocator</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getBackBufferDurationUs()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBackBufferDurationUs</h4>
|
|
<pre class="methodSignature">public long getBackBufferDurationUs()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#getBackBufferDurationUs()">LoadControl</a></code></span></div>
|
|
<div class="block">Returns the duration of media to retain in the buffer prior to the current playback position,
|
|
for fast backward seeking.
|
|
|
|
<p>Note: If <a href="LoadControl.html#retainBackBufferFromKeyframe()"><code>LoadControl.retainBackBufferFromKeyframe()</code></a> is false then seeking in the back-buffer
|
|
will only be fast if the back-buffer contains a keyframe prior to the seek position.
|
|
|
|
<p>Note: Implementations should return a single value. Dynamic changes to the back-buffer are
|
|
not currently supported.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#getBackBufferDurationUs()">getBackBufferDurationUs</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The duration of media to retain in the buffer prior to the current playback position,
|
|
in microseconds.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="retainBackBufferFromKeyframe()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>retainBackBufferFromKeyframe</h4>
|
|
<pre class="methodSignature">public boolean retainBackBufferFromKeyframe()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#retainBackBufferFromKeyframe()">LoadControl</a></code></span></div>
|
|
<div class="block">Returns whether media should be retained from the keyframe before the current playback position
|
|
minus <a href="LoadControl.html#getBackBufferDurationUs()"><code>LoadControl.getBackBufferDurationUs()</code></a>, rather than any sample before or at that position.
|
|
|
|
<p>Warning: Returning true will cause the back-buffer size to depend on the spacing of
|
|
keyframes in the media being played. Returning true is not recommended unless you control the
|
|
media and are comfortable with the back-buffer size exceeding <a href="LoadControl.html#getBackBufferDurationUs()"><code>LoadControl.getBackBufferDurationUs()</code></a> by as much as the maximum duration between adjacent keyframes in
|
|
the media.
|
|
|
|
<p>Note: Implementations should return a single value. Dynamic changes to the back-buffer are
|
|
not currently supported.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#retainBackBufferFromKeyframe()">retainBackBufferFromKeyframe</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether media should be retained from the keyframe before the current playback position
|
|
minus <a href="LoadControl.html#getBackBufferDurationUs()"><code>LoadControl.getBackBufferDurationUs()</code></a>, rather than any sample before or at that
|
|
position.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="shouldContinueLoading(long,long,float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>shouldContinueLoading</h4>
|
|
<pre class="methodSignature">public boolean shouldContinueLoading​(long playbackPositionUs,
|
|
long bufferedDurationUs,
|
|
float playbackSpeed)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#shouldContinueLoading(long,long,float)">LoadControl</a></code></span></div>
|
|
<div class="block">Called by the player to determine whether it should continue to load the source.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#shouldContinueLoading(long,long,float)">shouldContinueLoading</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playbackPositionUs</code> - The current playback position in microseconds, relative to the start
|
|
of the <a href="Timeline.Period.html" title="class in com.google.android.exoplayer2"><code>period</code></a> that will continue to be loaded if this method
|
|
returns <code>true</code>. If playback of this period has not yet started, the value will be
|
|
negative and equal in magnitude to the duration of any media in previous periods still to
|
|
be played.</dd>
|
|
<dd><code>bufferedDurationUs</code> - The duration of media that's currently buffered.</dd>
|
|
<dd><code>playbackSpeed</code> - The current factor by which playback is sped up.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the loading should continue.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="shouldStartPlayback(long,float,boolean,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>shouldStartPlayback</h4>
|
|
<pre class="methodSignature">public boolean shouldStartPlayback​(long bufferedDurationUs,
|
|
float playbackSpeed,
|
|
boolean rebuffering,
|
|
long targetLiveOffsetUs)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="LoadControl.html#shouldStartPlayback(long,float,boolean,long)">LoadControl</a></code></span></div>
|
|
<div class="block">Called repeatedly by the player when it's loading the source, has yet to start playback, and
|
|
has the minimum amount of data necessary for playback to be started. The value returned
|
|
determines whether playback is actually started. The load control may opt to return <code>
|
|
false</code> until some condition has been met (e.g. a certain amount of media is buffered).</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="LoadControl.html#shouldStartPlayback(long,float,boolean,long)">shouldStartPlayback</a></code> in interface <code><a href="LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bufferedDurationUs</code> - The duration of media that's currently buffered.</dd>
|
|
<dd><code>playbackSpeed</code> - The current factor by which playback is sped up.</dd>
|
|
<dd><code>rebuffering</code> - Whether the player is rebuffering. A rebuffer is defined to be caused by
|
|
buffer depletion rather than a user action. Hence this parameter is false during initial
|
|
buffering and when buffering as a result of a seek operation.</dd>
|
|
<dd><code>targetLiveOffsetUs</code> - The desired playback position offset to the live edge in
|
|
microseconds, or <a href="C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the media is not a live stream or no offset is
|
|
configured.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether playback should be allowed to start or resume.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="calculateTargetBufferBytes(com.google.android.exoplayer2.Renderer[],com.google.android.exoplayer2.trackselection.ExoTrackSelection[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>calculateTargetBufferBytes</h4>
|
|
<pre class="methodSignature">protected int calculateTargetBufferBytes​(<a href="Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[] renderers,
|
|
<a href="trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[] trackSelectionArray)</pre>
|
|
<div class="block">Calculate target buffer size in bytes based on the selected tracks. The player will try not to
|
|
exceed this target buffer. Only used when <code>targetBufferBytes</code> is <a href="C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>renderers</code> - The renderers for which the track were selected.</dd>
|
|
<dd><code>trackSelectionArray</code> - The selected tracks.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The target buffer size in bytes.</dd>
|
|
</dl>
|
|
</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 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: </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 id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|