mirror of
https://github.com/samsonjs/media.git
synced 2026-04-18 13:25:47 +00:00
428 lines
18 KiB
HTML
428 lines
18 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:30 GMT 2016 -->
|
|
<title>DashSegmentIndex (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="DashSegmentIndex (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/dash/DashChunkSource.RepresentationHolder.html" title="class in com.google.android.exoplayer.dash"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../../com/google/android/exoplayer/dash/DashTrackSelector.html" title="interface in com.google.android.exoplayer.dash"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/google/android/exoplayer/dash/DashSegmentIndex.html" target="_top">Frames</a></li>
|
|
<li><a href="DashSegmentIndex.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </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>Constr | </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.dash</div>
|
|
<h2 title="Interface DashSegmentIndex" class="title">Interface DashSegmentIndex</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Known Implementing Classes:</dt>
|
|
<dd><a href="../../../../../com/google/android/exoplayer/dash/mpd/Representation.MultiSegmentRepresentation.html" title="class in com.google.android.exoplayer.dash.mpd">Representation.MultiSegmentRepresentation</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public interface <span class="typeNameLabel">DashSegmentIndex</span></pre>
|
|
<div class="block">Indexes the segments within a media stream.
|
|
|
|
TODO: Generalize to cover all chunk streaming modes (e.g. SmoothStreaming) if possible.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#INDEX_UNBOUNDED">INDEX_UNBOUNDED</a></span></code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></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>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getDurationUs-int-long-">getDurationUs</a></span>(int segmentNum,
|
|
long periodDurationUs)</code>
|
|
<div class="block">Returns the duration of a segment.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getFirstSegmentNum--">getFirstSegmentNum</a></span>()</code>
|
|
<div class="block">Returns the segment number of the first segment.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getLastSegmentNum-long-">getLastSegmentNum</a></span>(long periodDurationUs)</code>
|
|
<div class="block">Returns the segment number of the last segment, or <a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#INDEX_UNBOUNDED"><code>INDEX_UNBOUNDED</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getSegmentNum-long-long-">getSegmentNum</a></span>(long timeUs,
|
|
long periodDurationUs)</code>
|
|
<div class="block">Returns the segment number of the segment containing a given media time.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../../com/google/android/exoplayer/dash/mpd/RangedUri.html" title="class in com.google.android.exoplayer.dash.mpd">RangedUri</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getSegmentUrl-int-">getSegmentUrl</a></span>(int segmentNum)</code>
|
|
<div class="block">Returns a <a href="../../../../../com/google/android/exoplayer/dash/mpd/RangedUri.html" title="class in com.google.android.exoplayer.dash.mpd"><code>RangedUri</code></a> defining the location of a segment.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getTimeUs-int-">getTimeUs</a></span>(int segmentNum)</code>
|
|
<div class="block">Returns the start time of a segment.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#isExplicit--">isExplicit</a></span>()</code>
|
|
<div class="block">Returns true if segments are defined explicitly by the index.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</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="INDEX_UNBOUNDED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>INDEX_UNBOUNDED</h4>
|
|
<pre>static final int INDEX_UNBOUNDED</pre>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer.dash.DashSegmentIndex.INDEX_UNBOUNDED">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="getSegmentNum-long-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSegmentNum</h4>
|
|
<pre>int getSegmentNum(long timeUs,
|
|
long periodDurationUs)</pre>
|
|
<div class="block">Returns the segment number of the segment containing a given media time.
|
|
<p>
|
|
If the given media time is outside the range of the index, then the returned segment number is
|
|
clamped to <a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getFirstSegmentNum--"><code>getFirstSegmentNum()</code></a> (if the given media time is earlier the start of the
|
|
first segment) or <a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#getLastSegmentNum-long-"><code>getLastSegmentNum(long)</code></a> (if the given media time is later then the
|
|
end of the last segment).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>timeUs</code> - The time in microseconds.</dd>
|
|
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or
|
|
<a href="../../../../../com/google/android/exoplayer/C.html#UNKNOWN_TIME_US"><code>C.UNKNOWN_TIME_US</code></a> if the period's duration is not yet known.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The segment number of the corresponding segment.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getTimeUs-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTimeUs</h4>
|
|
<pre>long getTimeUs(int segmentNum)</pre>
|
|
<div class="block">Returns the start time of a segment.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>segmentNum</code> - The segment number.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The corresponding start time in microseconds.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDurationUs-int-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDurationUs</h4>
|
|
<pre>long getDurationUs(int segmentNum,
|
|
long periodDurationUs)</pre>
|
|
<div class="block">Returns the duration of a segment.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>segmentNum</code> - The segment number.</dd>
|
|
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or
|
|
<a href="../../../../../com/google/android/exoplayer/C.html#UNKNOWN_TIME_US"><code>C.UNKNOWN_TIME_US</code></a> if the period's duration is not yet known.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The duration of the segment, in microseconds.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSegmentUrl-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSegmentUrl</h4>
|
|
<pre><a href="../../../../../com/google/android/exoplayer/dash/mpd/RangedUri.html" title="class in com.google.android.exoplayer.dash.mpd">RangedUri</a> getSegmentUrl(int segmentNum)</pre>
|
|
<div class="block">Returns a <a href="../../../../../com/google/android/exoplayer/dash/mpd/RangedUri.html" title="class in com.google.android.exoplayer.dash.mpd"><code>RangedUri</code></a> defining the location of a segment.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>segmentNum</code> - The segment number.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The <a href="../../../../../com/google/android/exoplayer/dash/mpd/RangedUri.html" title="class in com.google.android.exoplayer.dash.mpd"><code>RangedUri</code></a> defining the location of the data.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getFirstSegmentNum--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getFirstSegmentNum</h4>
|
|
<pre>int getFirstSegmentNum()</pre>
|
|
<div class="block">Returns the segment number of the first segment.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The segment number of the first segment.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getLastSegmentNum-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getLastSegmentNum</h4>
|
|
<pre>int getLastSegmentNum(long periodDurationUs)</pre>
|
|
<div class="block">Returns the segment number of the last segment, or <a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#INDEX_UNBOUNDED"><code>INDEX_UNBOUNDED</code></a>.
|
|
<p>
|
|
An unbounded index occurs if a dynamic manifest uses SegmentTemplate elements without a
|
|
SegmentTimeline element, and if the period duration is not yet known. In this case the caller
|
|
must manually determine the window of currently available segments.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or
|
|
<a href="../../../../../com/google/android/exoplayer/C.html#UNKNOWN_TIME_US"><code>C.UNKNOWN_TIME_US</code></a> if the period's duration is not yet known.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The segment number of the last segment, or <a href="../../../../../com/google/android/exoplayer/dash/DashSegmentIndex.html#INDEX_UNBOUNDED"><code>INDEX_UNBOUNDED</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isExplicit--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>isExplicit</h4>
|
|
<pre>boolean isExplicit()</pre>
|
|
<div class="block">Returns true if segments are defined explicitly by the index.
|
|
<p>
|
|
If true is returned, each segment is defined explicitly by the index data, and all of the
|
|
listed segments are guaranteed to be available at the time when the index was obtained.
|
|
<p>
|
|
If false is returned then segment information was derived from properties such as a fixed
|
|
segment duration. If the presentation is dynamic, it's possible that only a subset of the
|
|
segments are available.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>True if segments are defined explicitly by the index. False otherwise.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../../com/google/android/exoplayer/dash/DashChunkSource.RepresentationHolder.html" title="class in com.google.android.exoplayer.dash"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../../com/google/android/exoplayer/dash/DashTrackSelector.html" title="interface in com.google.android.exoplayer.dash"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/google/android/exoplayer/dash/DashSegmentIndex.html" target="_top">Frames</a></li>
|
|
<li><a href="DashSegmentIndex.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </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>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|