media/docs/doc/reference/com/google/android/exoplayer2/audio/Ac3Util.html
olly a038f875f6 Update Javadoc for 2.14.0
#minor-release

PiperOrigin-RevId: 373351935
2021-05-12 13:55:32 +01:00

629 lines
32 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>Ac3Util (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="Ac3Util (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&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.audio</a></div>
<h2 title="Class Ac3Util" class="title">Class Ac3Util</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.audio.Ac3Util</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">Ac3Util</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">Utility methods for parsing Dolby TrueHD and (E-)AC-3 syncframes. (E-)AC-3 parsing follows the
definition in ETSI TS 102 366 V1.4.1.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Ac3Util.SyncFrameInfo.html" title="class in com.google.android.exoplayer2.audio">Ac3Util.SyncFrameInfo</a></span></code></th>
<td class="colLast">
<div class="block">Holds sample format information as presented by a syncframe header.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&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 int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#AC3_MAX_RATE_BYTES_PER_SECOND">AC3_MAX_RATE_BYTES_PER_SECOND</a></span></code></th>
<td class="colLast">
<div class="block">Maximum rate for an AC-3 audio stream, in bytes per second.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#E_AC3_MAX_RATE_BYTES_PER_SECOND">E_AC3_MAX_RATE_BYTES_PER_SECOND</a></span></code></th>
<td class="colLast">
<div class="block">Maximum rate for an E-AC-3 audio stream, in bytes per second.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TRUEHD_MAX_RATE_BYTES_PER_SECOND">TRUEHD_MAX_RATE_BYTES_PER_SECOND</a></span></code></th>
<td class="colLast">
<div class="block">Maximum rate for a TrueHD audio stream, in bytes per second.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TRUEHD_RECHUNK_SAMPLE_COUNT">TRUEHD_RECHUNK_SAMPLE_COUNT</a></span></code></th>
<td class="colLast">
<div class="block">The number of samples to store in each output chunk when rechunking TrueHD streams.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TRUEHD_SYNCFRAME_PREFIX_LENGTH">TRUEHD_SYNCFRAME_PREFIX_LENGTH</a></span></code></th>
<td class="colLast">
<div class="block">The number of bytes that must be parsed from a TrueHD syncframe to calculate the sample count.</div>
</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="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>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findTrueHdSyncframeOffset(java.nio.ByteBuffer)">findTrueHdSyncframeOffset</a></span>&#8203;(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">Returns the offset relative to the buffer's position of the start of a TrueHD syncframe, or
<a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if no syncframe was found.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseAc3AnnexFFormat(com.google.android.exoplayer2.util.ParsableByteArray,java.lang.String,java.lang.String,com.google.android.exoplayer2.drm.DrmInitData)">parseAc3AnnexFFormat</a></span>&#8203;(<a href="../util/ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a>&nbsp;data,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;trackId,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;language,
<a href="../drm/DrmInitData.html" title="class in com.google.android.exoplayer2.drm">DrmInitData</a>&nbsp;drmInitData)</code></th>
<td class="colLast">
<div class="block">Returns the AC-3 format given <code>data</code> containing the AC3SpecificBox according to Annex F.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseAc3SyncframeAudioSampleCount(java.nio.ByteBuffer)">parseAc3SyncframeAudioSampleCount</a></span>&#8203;(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">Reads the number of audio samples represented by the given (E-)AC-3 syncframe.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="Ac3Util.SyncFrameInfo.html" title="class in com.google.android.exoplayer2.audio">Ac3Util.SyncFrameInfo</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseAc3SyncframeInfo(com.google.android.exoplayer2.util.ParsableBitArray)">parseAc3SyncframeInfo</a></span>&#8203;(<a href="../util/ParsableBitArray.html" title="class in com.google.android.exoplayer2.util">ParsableBitArray</a>&nbsp;data)</code></th>
<td class="colLast">
<div class="block">Returns (E-)AC-3 format information given <code>data</code> containing a syncframe.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseAc3SyncframeSize(byte%5B%5D)">parseAc3SyncframeSize</a></span>&#8203;(byte[]&nbsp;data)</code></th>
<td class="colLast">
<div class="block">Returns the size in bytes of the given (E-)AC-3 syncframe.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseEAc3AnnexFFormat(com.google.android.exoplayer2.util.ParsableByteArray,java.lang.String,java.lang.String,com.google.android.exoplayer2.drm.DrmInitData)">parseEAc3AnnexFFormat</a></span>&#8203;(<a href="../util/ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a>&nbsp;data,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;trackId,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;language,
<a href="../drm/DrmInitData.html" title="class in com.google.android.exoplayer2.drm">DrmInitData</a>&nbsp;drmInitData)</code></th>
<td class="colLast">
<div class="block">Returns the E-AC-3 format given <code>data</code> containing the EC3SpecificBox according to Annex
F.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseTrueHdSyncframeAudioSampleCount(byte%5B%5D)">parseTrueHdSyncframeAudioSampleCount</a></span>&#8203;(byte[]&nbsp;syncframe)</code></th>
<td class="colLast">
<div class="block">Returns the number of audio samples represented by the given TrueHD syncframe, or 0 if the
buffer is not the start of a syncframe.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseTrueHdSyncframeAudioSampleCount(java.nio.ByteBuffer,int)">parseTrueHdSyncframeAudioSampleCount</a></span>&#8203;(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</code></th>
<td class="colLast">
<div class="block">Reads the number of audio samples represented by a TrueHD syncframe.</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="AC3_MAX_RATE_BYTES_PER_SECOND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AC3_MAX_RATE_BYTES_PER_SECOND</h4>
<pre>public static final&nbsp;int AC3_MAX_RATE_BYTES_PER_SECOND</pre>
<div class="block">Maximum rate for an AC-3 audio stream, in bytes per second.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.audio.Ac3Util.AC3_MAX_RATE_BYTES_PER_SECOND">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="E_AC3_MAX_RATE_BYTES_PER_SECOND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>E_AC3_MAX_RATE_BYTES_PER_SECOND</h4>
<pre>public static final&nbsp;int E_AC3_MAX_RATE_BYTES_PER_SECOND</pre>
<div class="block">Maximum rate for an E-AC-3 audio stream, in bytes per second.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.audio.Ac3Util.E_AC3_MAX_RATE_BYTES_PER_SECOND">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TRUEHD_MAX_RATE_BYTES_PER_SECOND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TRUEHD_MAX_RATE_BYTES_PER_SECOND</h4>
<pre>public static final&nbsp;int TRUEHD_MAX_RATE_BYTES_PER_SECOND</pre>
<div class="block">Maximum rate for a TrueHD audio stream, in bytes per second.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.audio.Ac3Util.TRUEHD_MAX_RATE_BYTES_PER_SECOND">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TRUEHD_RECHUNK_SAMPLE_COUNT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TRUEHD_RECHUNK_SAMPLE_COUNT</h4>
<pre>public static final&nbsp;int TRUEHD_RECHUNK_SAMPLE_COUNT</pre>
<div class="block">The number of samples to store in each output chunk when rechunking TrueHD streams. The number
of samples extracted from the container corresponding to one syncframe must be an integer
multiple of this value.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.audio.Ac3Util.TRUEHD_RECHUNK_SAMPLE_COUNT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TRUEHD_SYNCFRAME_PREFIX_LENGTH">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TRUEHD_SYNCFRAME_PREFIX_LENGTH</h4>
<pre>public static final&nbsp;int TRUEHD_SYNCFRAME_PREFIX_LENGTH</pre>
<div class="block">The number of bytes that must be parsed from a TrueHD syncframe to calculate the sample count.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.audio.Ac3Util.TRUEHD_SYNCFRAME_PREFIX_LENGTH">Constant Field Values</a></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="parseAc3AnnexFFormat(com.google.android.exoplayer2.util.ParsableByteArray,java.lang.String,java.lang.String,com.google.android.exoplayer2.drm.DrmInitData)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseAc3AnnexFFormat</h4>
<pre class="methodSignature">public static&nbsp;<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;parseAc3AnnexFFormat&#8203;(<a href="../util/ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a>&nbsp;data,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;trackId,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;language,
@Nullable
<a href="../drm/DrmInitData.html" title="class in com.google.android.exoplayer2.drm">DrmInitData</a>&nbsp;drmInitData)</pre>
<div class="block">Returns the AC-3 format given <code>data</code> containing the AC3SpecificBox according to Annex F.
The reading position of <code>data</code> will be modified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The AC3SpecificBox to parse.</dd>
<dd><code>trackId</code> - The track identifier to set on the format.</dd>
<dd><code>language</code> - The language to set on the format.</dd>
<dd><code>drmInitData</code> - <a href="../drm/DrmInitData.html" title="class in com.google.android.exoplayer2.drm"><code>DrmInitData</code></a> to be included in the format.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The AC-3 format parsed from data in the header.</dd>
</dl>
</li>
</ul>
<a id="parseEAc3AnnexFFormat(com.google.android.exoplayer2.util.ParsableByteArray,java.lang.String,java.lang.String,com.google.android.exoplayer2.drm.DrmInitData)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseEAc3AnnexFFormat</h4>
<pre class="methodSignature">public static&nbsp;<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;parseEAc3AnnexFFormat&#8203;(<a href="../util/ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a>&nbsp;data,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;trackId,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;language,
@Nullable
<a href="../drm/DrmInitData.html" title="class in com.google.android.exoplayer2.drm">DrmInitData</a>&nbsp;drmInitData)</pre>
<div class="block">Returns the E-AC-3 format given <code>data</code> containing the EC3SpecificBox according to Annex
F. The reading position of <code>data</code> will be modified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The EC3SpecificBox to parse.</dd>
<dd><code>trackId</code> - The track identifier to set on the format.</dd>
<dd><code>language</code> - The language to set on the format.</dd>
<dd><code>drmInitData</code> - <a href="../drm/DrmInitData.html" title="class in com.google.android.exoplayer2.drm"><code>DrmInitData</code></a> to be included in the format.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The E-AC-3 format parsed from data in the header.</dd>
</dl>
</li>
</ul>
<a id="parseAc3SyncframeInfo(com.google.android.exoplayer2.util.ParsableBitArray)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseAc3SyncframeInfo</h4>
<pre class="methodSignature">public static&nbsp;<a href="Ac3Util.SyncFrameInfo.html" title="class in com.google.android.exoplayer2.audio">Ac3Util.SyncFrameInfo</a>&nbsp;parseAc3SyncframeInfo&#8203;(<a href="../util/ParsableBitArray.html" title="class in com.google.android.exoplayer2.util">ParsableBitArray</a>&nbsp;data)</pre>
<div class="block">Returns (E-)AC-3 format information given <code>data</code> containing a syncframe. The reading
position of <code>data</code> will be modified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The data to parse, positioned at the start of the syncframe.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The (E-)AC-3 format data parsed from the header.</dd>
</dl>
</li>
</ul>
<a id="parseAc3SyncframeSize(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseAc3SyncframeSize</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;parseAc3SyncframeSize&#8203;(byte[]&nbsp;data)</pre>
<div class="block">Returns the size in bytes of the given (E-)AC-3 syncframe.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The syncframe to parse.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The syncframe size in bytes. <a href="../C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a> if the input is invalid.</dd>
</dl>
</li>
</ul>
<a id="parseAc3SyncframeAudioSampleCount(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseAc3SyncframeAudioSampleCount</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;parseAc3SyncframeAudioSampleCount&#8203;(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer)</pre>
<div class="block">Reads the number of audio samples represented by the given (E-)AC-3 syncframe. The buffer's
position is not modified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a> from which to read the syncframe.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of audio samples represented by the syncframe.</dd>
</dl>
</li>
</ul>
<a id="findTrueHdSyncframeOffset(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findTrueHdSyncframeOffset</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;findTrueHdSyncframeOffset&#8203;(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer)</pre>
<div class="block">Returns the offset relative to the buffer's position of the start of a TrueHD syncframe, or
<a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if no syncframe was found. The buffer's position is not modified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a> within which to find a syncframe.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The offset relative to the buffer's position of the start of a TrueHD syncframe, or
<a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if no syncframe was found.</dd>
</dl>
</li>
</ul>
<a id="parseTrueHdSyncframeAudioSampleCount(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseTrueHdSyncframeAudioSampleCount</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;parseTrueHdSyncframeAudioSampleCount&#8203;(byte[]&nbsp;syncframe)</pre>
<div class="block">Returns the number of audio samples represented by the given TrueHD syncframe, or 0 if the
buffer is not the start of a syncframe.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>syncframe</code> - The bytes from which to read the syncframe. Must be at least <a href="#TRUEHD_SYNCFRAME_PREFIX_LENGTH"><code>TRUEHD_SYNCFRAME_PREFIX_LENGTH</code></a> bytes long.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of audio samples represented by the syncframe, or 0 if the buffer doesn't
contain the start of a syncframe.</dd>
</dl>
</li>
</ul>
<a id="parseTrueHdSyncframeAudioSampleCount(java.nio.ByteBuffer,int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>parseTrueHdSyncframeAudioSampleCount</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;parseTrueHdSyncframeAudioSampleCount&#8203;(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</pre>
<div class="block">Reads the number of audio samples represented by a TrueHD syncframe. The buffer's position is
not modified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a> from which to read the syncframe.</dd>
<dd><code>offset</code> - The offset of the start of the syncframe relative to the buffer's position.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of audio samples represented by the syncframe.</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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&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>