media/docs/doc/reference/com/google/android/exoplayer2/util/TimestampAdjuster.html
christosts 5a4f2348c8 Update javadoc for 2.15.0
#minor-release

PiperOrigin-RevId: 389862401
2021-08-10 14:58:59 +01:00

617 lines
27 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>TimestampAdjuster (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="TimestampAdjuster (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":9,"i9":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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">&nbsp;</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>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.util</a></div>
<h2 title="Class TimestampAdjuster" class="title">Class TimestampAdjuster</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.util.TimestampAdjuster</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">TimestampAdjuster</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></pre>
<div class="block">Adjusts and offsets sample timestamps. MPEG-2 TS timestamps scaling and adjustment is supported,
taking into account timestamp rollover.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== 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">&nbsp;</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 long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MODE_NO_OFFSET">MODE_NO_OFFSET</a></span></code></th>
<td class="colLast">
<div class="block">A special <code>firstSampleTimestampUs</code> value indicating that presentation timestamps should
not be offset.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MODE_SHARED">MODE_SHARED</a></span></code></th>
<td class="colLast">
<div class="block">A special <code>firstSampleTimestampUs</code> value indicating that the adjuster will be shared by
multiple threads.</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">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(long)">TimestampAdjuster</a></span>&#8203;(long&nbsp;firstSampleTimestampUs)</code></th>
<td class="colLast">&nbsp;</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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#adjustSampleTimestamp(long)">adjustSampleTimestamp</a></span>&#8203;(long&nbsp;timeUs)</code></th>
<td class="colLast">
<div class="block">Offsets a timestamp in microseconds.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#adjustTsTimestamp(long)">adjustTsTimestamp</a></span>&#8203;(long&nbsp;pts90Khz)</code></th>
<td class="colLast">
<div class="block">Scales and offsets an MPEG-2 TS presentation timestamp considering wraparound.</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="#getFirstSampleTimestampUs()">getFirstSampleTimestampUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the value of the first adjusted sample timestamp in microseconds, or <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if timestamps will not be offset or if the adjuster is in shared mode.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLastAdjustedTimestampUs()">getLastAdjustedTimestampUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the last adjusted timestamp, in microseconds.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTimestampOffsetUs()">getTimestampOffsetUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the offset between the input of <a href="#adjustSampleTimestamp(long)"><code>adjustSampleTimestamp(long)</code></a> and its output, or
<a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the offset has not yet been determined.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ptsToUs(long)">ptsToUs</a></span>&#8203;(long&nbsp;pts)</code></th>
<td class="colLast">
<div class="block">Converts a 90 kHz clock timestamp to a timestamp in microseconds.</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="#reset(long)">reset</a></span>&#8203;(long&nbsp;firstSampleTimestampUs)</code></th>
<td class="colLast">
<div class="block">Resets the instance.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sharedInitializeOrWait(boolean,long)">sharedInitializeOrWait</a></span>&#8203;(boolean&nbsp;canInitialize,
long&nbsp;nextSampleTimestampUs)</code></th>
<td class="colLast">
<div class="block">For shared timestamp adjusters, performs necessary initialization actions for a caller.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#usToNonWrappedPts(long)">usToNonWrappedPts</a></span>&#8203;(long&nbsp;us)</code></th>
<td class="colLast">
<div class="block">Converts a timestamp in microseconds to a 90 kHz clock timestamp.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#usToWrappedPts(long)">usToWrappedPts</a></span>&#8203;(long&nbsp;us)</code></th>
<td class="colLast">
<div class="block">Converts a timestamp in microseconds to a 90 kHz clock timestamp, performing wraparound to keep
the result within 33-bits.</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&nbsp;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="MODE_NO_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MODE_NO_OFFSET</h4>
<pre>public static final&nbsp;long MODE_NO_OFFSET</pre>
<div class="block">A special <code>firstSampleTimestampUs</code> value indicating that presentation timestamps should
not be offset. In this mode:
<ul>
<li><a href="#getFirstSampleTimestampUs()"><code>getFirstSampleTimestampUs()</code></a> will always return <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a>.
<li>The only timestamp adjustment performed is to account for MPEG-2 TS timestamp rollover.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.TimestampAdjuster.MODE_NO_OFFSET">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="MODE_SHARED">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MODE_SHARED</h4>
<pre>public static final&nbsp;long MODE_SHARED</pre>
<div class="block">A special <code>firstSampleTimestampUs</code> value indicating that the adjuster will be shared by
multiple threads. In this mode:
<ul>
<li><a href="#getFirstSampleTimestampUs()"><code>getFirstSampleTimestampUs()</code></a> will always return <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a>.
<li>Calling threads must call <a href="#sharedInitializeOrWait(boolean,long)"><code>sharedInitializeOrWait(boolean, long)</code></a> prior to adjusting timestamps.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.TimestampAdjuster.MODE_SHARED">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="&lt;init&gt;(long)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TimestampAdjuster</h4>
<pre>public&nbsp;TimestampAdjuster&#8203;(long&nbsp;firstSampleTimestampUs)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>firstSampleTimestampUs</code> - The desired value of the first adjusted sample timestamp in
microseconds, or <a href="#MODE_NO_OFFSET"><code>MODE_NO_OFFSET</code></a> if timestamps should not be offset, or <a href="#MODE_SHARED"><code>MODE_SHARED</code></a> if the adjuster will be used in shared mode.</dd>
</dl>
</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="sharedInitializeOrWait(boolean,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sharedInitializeOrWait</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;sharedInitializeOrWait&#8203;(boolean&nbsp;canInitialize,
long&nbsp;nextSampleTimestampUs)
throws <a href="https://developer.android.com/reference/java/lang/InterruptedException.html" title="class or interface in java.lang" class="externalLink" target="_top">InterruptedException</a></pre>
<div class="block">For shared timestamp adjusters, performs necessary initialization actions for a caller.
<ul>
<li>If the adjuster has already established a <a href="#getTimestampOffsetUs()"><code>timestamp offset</code></a>
then this method is a no-op.
<li>If <code>canInitialize</code> is <code>true</code> and the adjuster has not yet established a
timestamp offset, then the adjuster records the desired first sample timestamp for the
calling thread and returns to allow the caller to proceed. If the timestamp offset has
still not been established when the caller attempts to adjust its first timestamp, then
the recorded timestamp is used to set it.
<li>If <code>canInitialize</code> is <code>false</code> and the adjuster has not yet established a
timestamp offset, then the call blocks until the timestamp offset is set.
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>canInitialize</code> - Whether the caller is able to initialize the adjuster, if needed.</dd>
<dd><code>nextSampleTimestampUs</code> - The desired timestamp for the next sample loaded by the calling
thread, in microseconds. Only used if <code>canInitialize</code> is <code>true</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/InterruptedException.html" title="class or interface in java.lang" class="externalLink" target="_top">InterruptedException</a></code> - If the thread is interrupted whilst blocked waiting for
initialization to complete.</dd>
</dl>
</li>
</ul>
<a id="getFirstSampleTimestampUs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFirstSampleTimestampUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getFirstSampleTimestampUs()</pre>
<div class="block">Returns the value of the first adjusted sample timestamp in microseconds, or <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if timestamps will not be offset or if the adjuster is in shared mode.</div>
</li>
</ul>
<a id="getLastAdjustedTimestampUs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLastAdjustedTimestampUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getLastAdjustedTimestampUs()</pre>
<div class="block">Returns the last adjusted timestamp, in microseconds. If no timestamps have been adjusted yet
then the result of <a href="#getFirstSampleTimestampUs()"><code>getFirstSampleTimestampUs()</code></a> is returned.</div>
</li>
</ul>
<a id="getTimestampOffsetUs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimestampOffsetUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getTimestampOffsetUs()</pre>
<div class="block">Returns the offset between the input of <a href="#adjustSampleTimestamp(long)"><code>adjustSampleTimestamp(long)</code></a> and its output, or
<a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the offset has not yet been determined.</div>
</li>
</ul>
<a id="reset(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;reset&#8203;(long&nbsp;firstSampleTimestampUs)</pre>
<div class="block">Resets the instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>firstSampleTimestampUs</code> - The desired value of the first adjusted sample timestamp after
this reset in microseconds, or <a href="#MODE_NO_OFFSET"><code>MODE_NO_OFFSET</code></a> if timestamps should not be offset,
or <a href="#MODE_SHARED"><code>MODE_SHARED</code></a> if the adjuster will be used in shared mode.</dd>
</dl>
</li>
</ul>
<a id="adjustTsTimestamp(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adjustTsTimestamp</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;adjustTsTimestamp&#8203;(long&nbsp;pts90Khz)</pre>
<div class="block">Scales and offsets an MPEG-2 TS presentation timestamp considering wraparound.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pts90Khz</code> - A 90 kHz clock MPEG-2 TS presentation timestamp.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The adjusted timestamp in microseconds.</dd>
</dl>
</li>
</ul>
<a id="adjustSampleTimestamp(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adjustSampleTimestamp</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;adjustSampleTimestamp&#8203;(long&nbsp;timeUs)</pre>
<div class="block">Offsets a timestamp in microseconds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timeUs</code> - The timestamp to adjust in microseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The adjusted timestamp in microseconds.</dd>
</dl>
</li>
</ul>
<a id="ptsToUs(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ptsToUs</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;ptsToUs&#8203;(long&nbsp;pts)</pre>
<div class="block">Converts a 90 kHz clock timestamp to a timestamp in microseconds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pts</code> - A 90 kHz clock timestamp.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The corresponding value in microseconds.</dd>
</dl>
</li>
</ul>
<a id="usToWrappedPts(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>usToWrappedPts</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;usToWrappedPts&#8203;(long&nbsp;us)</pre>
<div class="block">Converts a timestamp in microseconds to a 90 kHz clock timestamp, performing wraparound to keep
the result within 33-bits.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>us</code> - A value in microseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The corresponding value as a 90 kHz clock timestamp, wrapped to 33 bits.</dd>
</dl>
</li>
</ul>
<a id="usToNonWrappedPts(long)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>usToNonWrappedPts</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;usToNonWrappedPts&#8203;(long&nbsp;us)</pre>
<div class="block">Converts a timestamp in microseconds to a 90 kHz clock timestamp.
<p>Does not perform any wraparound. To get a 90 kHz timestamp suitable for use with MPEG-TS,
use <a href="#usToWrappedPts(long)"><code>usToWrappedPts(long)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>us</code> - A value in microseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The corresponding value as a 90 kHz clock timestamp.</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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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>