907 lines
60 KiB
HTML
907 lines
60 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>SingleSampleSource (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="SingleSampleSource (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10};
|
|
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/SampleSourceTrackRenderer.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer/SingleSampleSource.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/SingleSampleSource.html" target="_top">Frames</a></li>
|
|
<li><a href="SingleSampleSource.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 SingleSampleSource" class="title">Class SingleSampleSource</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.SingleSampleSource</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/SampleSource.html" title="interface in com.google.android.exoplayer">SampleSource</a>, <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a>, <a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html" title="interface in com.google.android.exoplayer.upstream">Loader.Callback</a>, <a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public final class <span class="typeNameLabel">SingleSampleSource</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/SampleSource.html" title="interface in com.google.android.exoplayer">SampleSource</a>, <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a>, <a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html" title="interface in com.google.android.exoplayer.upstream">Loader.Callback</a>, <a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a></pre>
|
|
<div class="block">A <a href="../../../../com/google/android/exoplayer/SampleSource.html" title="interface in com.google.android.exoplayer"><code>SampleSource</code></a> that loads the data at a given <a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net"><code>Uri</code></a> as a single sample.</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/SingleSampleSource.EventListener.html" title="interface in com.google.android.exoplayer">SingleSampleSource.EventListener</a></span></code>
|
|
<div class="block">Interface definition for a callback to be notified of <a href="../../../../com/google/android/exoplayer/SingleSampleSource.html" title="class in com.google.android.exoplayer"><code>SingleSampleSource</code></a> events.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.classes.inherited.from.class.com.google.android.exoplayer.SampleSource">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested classes/interfaces inherited from interface com.google.android.exoplayer.<a href="../../../../com/google/android/exoplayer/SampleSource.html" title="interface in com.google.android.exoplayer">SampleSource</a></h3>
|
|
<code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></li>
|
|
</ul>
|
|
</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 int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#DEFAULT_MIN_LOADABLE_RETRY_COUNT">DEFAULT_MIN_LOADABLE_RETRY_COUNT</a></span></code>
|
|
<div class="block">The default minimum number of times to retry loading data prior to failing.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.com.google.android.exoplayer.SampleSource">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from interface com.google.android.exoplayer.<a href="../../../../com/google/android/exoplayer/SampleSource.html" title="interface in com.google.android.exoplayer">SampleSource</a></h3>
|
|
<code><a href="../../../../com/google/android/exoplayer/SampleSource.html#END_OF_STREAM">END_OF_STREAM</a>, <a href="../../../../com/google/android/exoplayer/SampleSource.html#FORMAT_READ">FORMAT_READ</a>, <a href="../../../../com/google/android/exoplayer/SampleSource.html#NO_DISCONTINUITY">NO_DISCONTINUITY</a>, <a href="../../../../com/google/android/exoplayer/SampleSource.html#NOTHING_READ">NOTHING_READ</a>, <a href="../../../../com/google/android/exoplayer/SampleSource.html#SAMPLE_READ">SAMPLE_READ</a></code></li>
|
|
</ul>
|
|
</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/SingleSampleSource.html#SingleSampleSource-android.net.Uri-com.google.android.exoplayer.upstream.DataSource-com.google.android.exoplayer.MediaFormat-">SingleSampleSource</a></span>(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a> uri,
|
|
<a href="../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a> dataSource,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> format)</code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#SingleSampleSource-android.net.Uri-com.google.android.exoplayer.upstream.DataSource-com.google.android.exoplayer.MediaFormat-int-">SingleSampleSource</a></span>(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a> uri,
|
|
<a href="../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a> dataSource,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> format,
|
|
int minLoadableRetryCount)</code> </td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#SingleSampleSource-android.net.Uri-com.google.android.exoplayer.upstream.DataSource-com.google.android.exoplayer.MediaFormat-int-android.os.Handler-com.google.android.exoplayer.SingleSampleSource.EventListener-int-">SingleSampleSource</a></span>(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a> uri,
|
|
<a href="../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a> dataSource,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> format,
|
|
int minLoadableRetryCount,
|
|
<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/SingleSampleSource.EventListener.html" title="interface in com.google.android.exoplayer">SingleSampleSource.EventListener</a> eventListener,
|
|
int eventSourceId)</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="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>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#cancelLoad--">cancelLoad</a></span>()</code>
|
|
<div class="block">Cancels the load.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#continueBuffering-int-long-">continueBuffering</a></span>(int track,
|
|
long positionUs)</code>
|
|
<div class="block">Indicates to the source that it should still be buffering data for the specified track.</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/SingleSampleSource.html#disable-int-">disable</a></span>(int track)</code>
|
|
<div class="block">Disable the specified track.</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/SingleSampleSource.html#enable-int-long-">enable</a></span>(int track,
|
|
long positionUs)</code>
|
|
<div class="block">Enable the specified track.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#getBufferedPositionUs--">getBufferedPositionUs</a></span>()</code>
|
|
<div class="block">Returns an estimate of the position up to which data is buffered.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code><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/SingleSampleSource.html#getFormat-int-">getFormat</a></span>(int track)</code>
|
|
<div class="block">Returns the format of the specified track.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#getTrackCount--">getTrackCount</a></span>()</code>
|
|
<div class="block">Returns the number of tracks exposed by the source.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#isLoadCanceled--">isLoadCanceled</a></span>()</code>
|
|
<div class="block">Whether the load has been canceled.</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/SingleSampleSource.html#load--">load</a></span>()</code>
|
|
<div class="block">Performs the load, returning on completion or cancelation.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#maybeThrowError--">maybeThrowError</a></span>()</code>
|
|
<div class="block">If the source is currently having difficulty preparing or loading samples, then this method
|
|
throws the underlying error.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#onLoadCanceled-com.google.android.exoplayer.upstream.Loader.Loadable-">onLoadCanceled</a></span>(<a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a> loadable)</code>
|
|
<div class="block">Invoked when loading has been canceled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#onLoadCompleted-com.google.android.exoplayer.upstream.Loader.Loadable-">onLoadCompleted</a></span>(<a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a> loadable)</code>
|
|
<div class="block">Invoked when the data source has been fully loaded.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#onLoadError-com.google.android.exoplayer.upstream.Loader.Loadable-java.io.IOException-">onLoadError</a></span>(<a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a> loadable,
|
|
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a> e)</code>
|
|
<div class="block">Invoked when the data source is stopped due to an error.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#prepare-long-">prepare</a></span>(long positionUs)</code>
|
|
<div class="block">Prepares the source.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#readData-int-long-com.google.android.exoplayer.MediaFormatHolder-com.google.android.exoplayer.SampleHolder-">readData</a></span>(int track,
|
|
long positionUs,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormatHolder.html" title="class in com.google.android.exoplayer">MediaFormatHolder</a> formatHolder,
|
|
<a href="../../../../com/google/android/exoplayer/SampleHolder.html" title="class in com.google.android.exoplayer">SampleHolder</a> sampleHolder)</code>
|
|
<div class="block">Attempts to read a sample or a new format from the source.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#readDiscontinuity-int-">readDiscontinuity</a></span>(int track)</code>
|
|
<div class="block">Attempts to read a pending discontinuity from the source.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#register--">register</a></span>()</code>
|
|
<div class="block">A consumer of samples should call this method to register themselves and gain access to the
|
|
source through the returned <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer"><code>SampleSource.SampleSourceReader</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#release--">release</a></span>()</code>
|
|
<div class="block">Releases the <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer"><code>SampleSource.SampleSourceReader</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer/SingleSampleSource.html#seekToUs-long-">seekToUs</a></span>(long positionUs)</code>
|
|
<div class="block">Seeks to the specified time in microseconds.</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_MIN_LOADABLE_RETRY_COUNT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DEFAULT_MIN_LOADABLE_RETRY_COUNT</h4>
|
|
<pre>public static final int DEFAULT_MIN_LOADABLE_RETRY_COUNT</pre>
|
|
<div class="block">The default minimum number of times to retry loading data prior to failing.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer.SingleSampleSource.DEFAULT_MIN_LOADABLE_RETRY_COUNT">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="SingleSampleSource-android.net.Uri-com.google.android.exoplayer.upstream.DataSource-com.google.android.exoplayer.MediaFormat-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SingleSampleSource</h4>
|
|
<pre>public SingleSampleSource(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a> uri,
|
|
<a href="../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a> dataSource,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> format)</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="SingleSampleSource-android.net.Uri-com.google.android.exoplayer.upstream.DataSource-com.google.android.exoplayer.MediaFormat-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SingleSampleSource</h4>
|
|
<pre>public SingleSampleSource(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a> uri,
|
|
<a href="../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a> dataSource,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> format,
|
|
int minLoadableRetryCount)</pre>
|
|
</li>
|
|
</ul>
|
|
<a name="SingleSampleSource-android.net.Uri-com.google.android.exoplayer.upstream.DataSource-com.google.android.exoplayer.MediaFormat-int-android.os.Handler-com.google.android.exoplayer.SingleSampleSource.EventListener-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>SingleSampleSource</h4>
|
|
<pre>public SingleSampleSource(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a> uri,
|
|
<a href="../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a> dataSource,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> format,
|
|
int minLoadableRetryCount,
|
|
<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/SingleSampleSource.EventListener.html" title="interface in com.google.android.exoplayer">SingleSampleSource.EventListener</a> eventListener,
|
|
int eventSourceId)</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="register--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>register</h4>
|
|
<pre>public <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a> register()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.html#register--">SampleSource</a></code></span></div>
|
|
<div class="block">A consumer of samples should call this method to register themselves and gain access to the
|
|
source through the returned <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer"><code>SampleSource.SampleSourceReader</code></a>.
|
|
<p>
|
|
<a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#release--"><code>SampleSource.SampleSourceReader.release()</code></a> should be called on the returned object when access is no
|
|
longer required.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.html#register--">register</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.html" title="interface in com.google.android.exoplayer">SampleSource</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer"><code>SampleSource.SampleSourceReader</code></a> that provides access to the source.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="prepare-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>prepare</h4>
|
|
<pre>public boolean prepare(long positionUs)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#prepare-long-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Prepares the source.
|
|
<p>
|
|
Preparation may require reading from the data source (e.g. to determine the available tracks
|
|
and formats). If insufficient data is available then the call will return <code>false</code>
|
|
rather than block. The method can be called repeatedly until the return value indicates
|
|
success.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#prepare-long-">prepare</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<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 source was prepared, false otherwise.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getTrackCount--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTrackCount</h4>
|
|
<pre>public int getTrackCount()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#getTrackCount--">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Returns the number of tracks exposed by the source.
|
|
<p>
|
|
This method should only be called after the source has been prepared.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#getTrackCount--">getTrackCount</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<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>public <a href="../../../../com/google/android/exoplayer/MediaFormat.html" title="class in com.google.android.exoplayer">MediaFormat</a> getFormat(int track)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#getFormat-int-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Returns the format of the specified track.
|
|
<p>
|
|
Note that whilst the format of a track will remain constant, the format of the actual media
|
|
stream may change dynamically. An example of this is where the track is adaptive
|
|
(i.e. @link <a href="../../../../com/google/android/exoplayer/MediaFormat.html#adaptive"><code>MediaFormat.adaptive</code></a> is true). Hence the track formats returned through
|
|
this method should not be used to configure decoders. Decoder configuration should be
|
|
performed using the formats obtained when reading the media stream through calls to
|
|
<a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#readData-int-long-com.google.android.exoplayer.MediaFormatHolder-com.google.android.exoplayer.SampleHolder-"><code>SampleSource.SampleSourceReader.readData(int, long, MediaFormatHolder, SampleHolder)</code></a>.
|
|
<p>
|
|
This method should only be called after the source has been prepared.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#getFormat-int-">getFormat</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<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="enable-int-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>enable</h4>
|
|
<pre>public void enable(int track,
|
|
long positionUs)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#enable-int-long-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Enable the specified track. This allows the track's format and samples to be read from
|
|
<a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#readData-int-long-com.google.android.exoplayer.MediaFormatHolder-com.google.android.exoplayer.SampleHolder-"><code>SampleSource.SampleSourceReader.readData(int, long, MediaFormatHolder, SampleHolder)</code></a>.
|
|
<p>
|
|
This method should only be called after the source has been prepared, and when the specified
|
|
track is disabled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#enable-int-long-">enable</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>track</code> - The track to enable.</dd>
|
|
<dd><code>positionUs</code> - The player's current playback position.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="continueBuffering-int-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>continueBuffering</h4>
|
|
<pre>public boolean continueBuffering(int track,
|
|
long positionUs)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#continueBuffering-int-long-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Indicates to the source that it should still be buffering data for the specified track.
|
|
<p>
|
|
This method should only be called when the specified track is enabled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#continueBuffering-int-long-">continueBuffering</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>track</code> - The track to continue buffering.</dd>
|
|
<dd><code>positionUs</code> - The current playback position.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>True if the track has available samples, or if the end of the stream has been
|
|
reached. False if more data needs to be buffered for samples to become available.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="maybeThrowError--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>maybeThrowError</h4>
|
|
<pre>public void maybeThrowError()
|
|
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#maybeThrowError--">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">If the source is currently having difficulty preparing or loading samples, then this method
|
|
throws the underlying error. Otherwise does nothing.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#maybeThrowError--">maybeThrowError</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - The underlying error.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readDiscontinuity-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readDiscontinuity</h4>
|
|
<pre>public long readDiscontinuity(int track)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#readDiscontinuity-int-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Attempts to read a pending discontinuity from the source.
|
|
<p>
|
|
This method should only be called when the specified track is enabled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#readDiscontinuity-int-">readDiscontinuity</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>track</code> - The track from which to read.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>If a discontinuity was read then the playback position after the discontinuity. Else
|
|
<a href="../../../../com/google/android/exoplayer/SampleSource.html#NO_DISCONTINUITY"><code>SampleSource.NO_DISCONTINUITY</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readData-int-long-com.google.android.exoplayer.MediaFormatHolder-com.google.android.exoplayer.SampleHolder-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readData</h4>
|
|
<pre>public int readData(int track,
|
|
long positionUs,
|
|
<a href="../../../../com/google/android/exoplayer/MediaFormatHolder.html" title="class in com.google.android.exoplayer">MediaFormatHolder</a> formatHolder,
|
|
<a href="../../../../com/google/android/exoplayer/SampleHolder.html" title="class in com.google.android.exoplayer">SampleHolder</a> sampleHolder)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#readData-int-long-com.google.android.exoplayer.MediaFormatHolder-com.google.android.exoplayer.SampleHolder-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Attempts to read a sample or a new format from the source.
|
|
<p>
|
|
This method should only be called when the specified track is enabled.
|
|
<p>
|
|
Note that where multiple tracks are enabled, <a href="../../../../com/google/android/exoplayer/SampleSource.html#NOTHING_READ"><code>SampleSource.NOTHING_READ</code></a> may be returned if the
|
|
next piece of data to be read from the <a href="../../../../com/google/android/exoplayer/SampleSource.html" title="interface in com.google.android.exoplayer"><code>SampleSource</code></a> corresponds to a different track
|
|
than the one for which data was requested.
|
|
<p>
|
|
This method will always return <a href="../../../../com/google/android/exoplayer/SampleSource.html#NOTHING_READ"><code>SampleSource.NOTHING_READ</code></a> in the case that there's a pending
|
|
discontinuity to be read from <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#readDiscontinuity-int-"><code>SampleSource.SampleSourceReader.readDiscontinuity(int)</code></a> for the specified track.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#readData-int-long-com.google.android.exoplayer.MediaFormatHolder-com.google.android.exoplayer.SampleHolder-">readData</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>track</code> - The track from which to read.</dd>
|
|
<dd><code>positionUs</code> - The current playback position.</dd>
|
|
<dd><code>formatHolder</code> - A <a href="../../../../com/google/android/exoplayer/MediaFormatHolder.html" title="class in com.google.android.exoplayer"><code>MediaFormatHolder</code></a> object to populate in the case of a new
|
|
format.</dd>
|
|
<dd><code>sampleHolder</code> - A <a href="../../../../com/google/android/exoplayer/SampleHolder.html" title="class in com.google.android.exoplayer"><code>SampleHolder</code></a> object to populate in the case of a new sample.
|
|
If the caller requires the sample data then it must ensure that <a href="../../../../com/google/android/exoplayer/SampleHolder.html#data"><code>SampleHolder.data</code></a>
|
|
references a valid output buffer.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The result, which can be <a href="../../../../com/google/android/exoplayer/SampleSource.html#SAMPLE_READ"><code>SampleSource.SAMPLE_READ</code></a>, <a href="../../../../com/google/android/exoplayer/SampleSource.html#FORMAT_READ"><code>SampleSource.FORMAT_READ</code></a>,
|
|
<a href="../../../../com/google/android/exoplayer/SampleSource.html#NOTHING_READ"><code>SampleSource.NOTHING_READ</code></a> or <a href="../../../../com/google/android/exoplayer/SampleSource.html#END_OF_STREAM"><code>SampleSource.END_OF_STREAM</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="seekToUs-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>seekToUs</h4>
|
|
<pre>public void seekToUs(long positionUs)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#seekToUs-long-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Seeks to the specified time in microseconds.
|
|
<p>
|
|
This method should only be called when at least one track is enabled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#seekToUs-long-">seekToUs</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>positionUs</code> - The seek position in microseconds.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getBufferedPositionUs--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBufferedPositionUs</h4>
|
|
<pre>public long getBufferedPositionUs()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#getBufferedPositionUs--">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Returns an estimate of the position up to which data is buffered.
|
|
<p>
|
|
This method should only be called when at least one track is enabled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#getBufferedPositionUs--">getBufferedPositionUs</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<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>TrackRenderer.END_OF_TRACK_US</code></a> if data is buffered to the end of the stream,
|
|
or <a href="../../../../com/google/android/exoplayer/TrackRenderer.html#UNKNOWN_TIME_US"><code>TrackRenderer.UNKNOWN_TIME_US</code></a> if no estimate is available.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="disable-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disable</h4>
|
|
<pre>public void disable(int track)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#disable-int-">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Disable the specified track.
|
|
<p>
|
|
This method should only be called when the specified track is enabled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#disable-int-">disable</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>track</code> - The track to disable.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="release--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>release</h4>
|
|
<pre>public void release()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#release--">SampleSource.SampleSourceReader</a></code></span></div>
|
|
<div class="block">Releases the <a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer"><code>SampleSource.SampleSourceReader</code></a>.
|
|
<p>
|
|
This method should be called when access to the <a href="../../../../com/google/android/exoplayer/SampleSource.html" title="interface in com.google.android.exoplayer"><code>SampleSource</code></a> is no longer required.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html#release--">release</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/SampleSource.SampleSourceReader.html" title="interface in com.google.android.exoplayer">SampleSource.SampleSourceReader</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onLoadCompleted-com.google.android.exoplayer.upstream.Loader.Loadable-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onLoadCompleted</h4>
|
|
<pre>public void onLoadCompleted(<a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a> loadable)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html#onLoadCompleted-com.google.android.exoplayer.upstream.Loader.Loadable-">Loader.Callback</a></code></span></div>
|
|
<div class="block">Invoked when the data source has been fully loaded.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html#onLoadCompleted-com.google.android.exoplayer.upstream.Loader.Loadable-">onLoadCompleted</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html" title="interface in com.google.android.exoplayer.upstream">Loader.Callback</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>loadable</code> - The loadable whose load has completed.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onLoadCanceled-com.google.android.exoplayer.upstream.Loader.Loadable-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onLoadCanceled</h4>
|
|
<pre>public void onLoadCanceled(<a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a> loadable)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html#onLoadCanceled-com.google.android.exoplayer.upstream.Loader.Loadable-">Loader.Callback</a></code></span></div>
|
|
<div class="block">Invoked when loading has been canceled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html#onLoadCanceled-com.google.android.exoplayer.upstream.Loader.Loadable-">onLoadCanceled</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html" title="interface in com.google.android.exoplayer.upstream">Loader.Callback</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>loadable</code> - The loadable whose load has been canceled.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="onLoadError-com.google.android.exoplayer.upstream.Loader.Loadable-java.io.IOException-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onLoadError</h4>
|
|
<pre>public void onLoadError(<a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a> loadable,
|
|
<a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a> e)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html#onLoadError-com.google.android.exoplayer.upstream.Loader.Loadable-java.io.IOException-">Loader.Callback</a></code></span></div>
|
|
<div class="block">Invoked when the data source is stopped due to an error.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html#onLoadError-com.google.android.exoplayer.upstream.Loader.Loadable-java.io.IOException-">onLoadError</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Callback.html" title="interface in com.google.android.exoplayer.upstream">Loader.Callback</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>loadable</code> - The loadable whose load has failed.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="cancelLoad--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>cancelLoad</h4>
|
|
<pre>public void cancelLoad()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html#cancelLoad--">Loader.Loadable</a></code></span></div>
|
|
<div class="block">Cancels the load.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html#cancelLoad--">cancelLoad</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isLoadCanceled--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isLoadCanceled</h4>
|
|
<pre>public boolean isLoadCanceled()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html#isLoadCanceled--">Loader.Loadable</a></code></span></div>
|
|
<div class="block">Whether the load has been canceled.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html#isLoadCanceled--">isLoadCanceled</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>True if the load has been canceled. False otherwise.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="load--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>load</h4>
|
|
<pre>public void load()
|
|
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
|
|
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html#load--">Loader.Loadable</a></code></span></div>
|
|
<div class="block">Performs the load, returning on completion or cancelation.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html#load--">load</a></code> in interface <code><a href="../../../../com/google/android/exoplayer/upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer.upstream">Loader.Loadable</a></code></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></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/SampleSourceTrackRenderer.html" title="class in com.google.android.exoplayer"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer/SingleSampleSource.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/SingleSampleSource.html" target="_top">Frames</a></li>
|
|
<li><a href="SingleSampleSource.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>
|