mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
593 lines
26 KiB
HTML
593 lines
26 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 Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.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">Offsets timestamps according to an initial sample timestamp offset. 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"> </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="#DO_NOT_OFFSET">DO_NOT_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>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">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>​(long firstSampleTimestampUs)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#adjustSampleTimestamp(long)">adjustSampleTimestamp</a></span>​(long 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>​(long 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="#DO_NOT_OFFSET"><code>DO_NOT_OFFSET</code></a> if timestamps will not be offset.</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 value obtained from <a href="#adjustSampleTimestamp(long)"><code>adjustSampleTimestamp(long)</code></a>.</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.</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>​(long 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>​(long firstSampleTimestampUs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Resets the instance to its initial state.</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>​(boolean canInitialize,
|
|
long startTimeUs)</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>​(long 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>​(long 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 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="DO_NOT_OFFSET">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DO_NOT_OFFSET</h4>
|
|
<pre>public static final long DO_NOT_OFFSET</pre>
|
|
<div class="block">A special <code>firstSampleTimestampUs</code> value indicating that presentation timestamps should
|
|
not be offset.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.TimestampAdjuster.DO_NOT_OFFSET">Constant Field Values</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a id="<init>(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>TimestampAdjuster</h4>
|
|
<pre>public TimestampAdjuster​(long 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="#DO_NOT_OFFSET"><code>DO_NOT_OFFSET</code></a> if timestamps should not be offset.</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 void sharedInitializeOrWait​(boolean canInitialize,
|
|
long startTimeUs)
|
|
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 does not yet have a target <a href="#getFirstSampleTimestampUs()"><code>first sample
|
|
timestamp</code></a> and if <code>canInitialize</code> is <code>true</code>, then initialization is started
|
|
by setting the target first sample timestamp to <code>firstSampleTimestampUs</code>. The call
|
|
returns, allowing the caller to proceed. Initialization completes when a caller adjusts
|
|
the first timestamp.
|
|
<li>If <code>canInitialize</code> is <code>true</code> and the adjuster already has a target <a href="#getFirstSampleTimestampUs()"><code>first sample timestamp</code></a>, then the call returns to allow the
|
|
caller to proceed only if <code>firstSampleTimestampUs</code> is equal to the target. This
|
|
ensures a caller that's previously started initialization can continue to proceed. It
|
|
also allows other callers with the same <code>firstSampleTimestampUs</code> to proceed, since
|
|
in this case it doesn't matter which caller adjusts the first timestamp to complete
|
|
initialization.
|
|
<li>If <code>canInitialize</code> is <code>false</code> or if <code>firstSampleTimestampUs</code> differs
|
|
from the target <a href="#getFirstSampleTimestampUs()"><code>first sample timestamp</code></a>, then the call
|
|
blocks until initialization completes. If initialization has already been completed the
|
|
call returns immediately.
|
|
</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>startTimeUs</code> - The desired first sample timestamp of the caller, 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 long getFirstSampleTimestampUs()</pre>
|
|
<div class="block">Returns the value of the first adjusted sample timestamp in microseconds, or <a href="#DO_NOT_OFFSET"><code>DO_NOT_OFFSET</code></a> if timestamps will not be offset.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getLastAdjustedTimestampUs()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getLastAdjustedTimestampUs</h4>
|
|
<pre class="methodSignature">public long getLastAdjustedTimestampUs()</pre>
|
|
<div class="block">Returns the last value obtained from <a href="#adjustSampleTimestamp(long)"><code>adjustSampleTimestamp(long)</code></a>. If <a href="#adjustSampleTimestamp(long)"><code>adjustSampleTimestamp(long)</code></a> has not been called, returns the result of calling <a href="#getFirstSampleTimestampUs()"><code>getFirstSampleTimestampUs()</code></a>. If this value is <a href="#DO_NOT_OFFSET"><code>DO_NOT_OFFSET</code></a>, returns <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getTimestampOffsetUs()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTimestampOffsetUs</h4>
|
|
<pre class="methodSignature">public long getTimestampOffsetUs()</pre>
|
|
<div class="block">Returns the offset between the input of <a href="#adjustSampleTimestamp(long)"><code>adjustSampleTimestamp(long)</code></a> and its output. If
|
|
<a href="#DO_NOT_OFFSET"><code>DO_NOT_OFFSET</code></a> was provided to the constructor, 0 is returned. If the timestamp
|
|
adjuster is yet not initialized, <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> is returned.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The offset between <a href="#adjustSampleTimestamp(long)"><code>adjustSampleTimestamp(long)</code></a>'s input and output. <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the adjuster is not yet initialized and 0 if timestamps should not be
|
|
offset.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="reset(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reset</h4>
|
|
<pre class="methodSignature">public void reset​(long firstSampleTimestampUs)</pre>
|
|
<div class="block">Resets the instance to its initial state.</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="#DO_NOT_OFFSET"><code>DO_NOT_OFFSET</code></a> if timestamps should not be offset.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="adjustTsTimestamp(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>adjustTsTimestamp</h4>
|
|
<pre class="methodSignature">public long adjustTsTimestamp​(long 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 long adjustSampleTimestamp​(long 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 long ptsToUs​(long 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 long usToWrappedPts​(long 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 long usToNonWrappedPts​(long 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 Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|