mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
845 lines
61 KiB
HTML
845 lines
61 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>TestUtil (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="TestUtil (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":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 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>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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.testutil</a></div>
|
|
<h2 title="Class TestUtil" class="title">Class TestUtil</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.testutil.TestUtil</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<pre>public class <span class="typeNameLabel">TestUtil</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 tests.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========== 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="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>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertBitmapsAreSimilar(android.graphics.Bitmap,android.graphics.Bitmap,double)">assertBitmapsAreSimilar</a></span>​(<a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink" target="_top">Bitmap</a> expectedBitmap,
|
|
<a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink" target="_top">Bitmap</a> actualBitmap,
|
|
double psnrThresholdDb)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Asserts whether actual bitmap is very similar to the expected bitmap at some quality level.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertBufferInfosEqual(android.media.MediaCodec.BufferInfo,android.media.MediaCodec.BufferInfo)">assertBufferInfosEqual</a></span>​(<a href="https://developer.android.com/reference/android/media/MediaCodec.BufferInfo.html" title="class or interface in android.media" class="externalLink" target="_top">MediaCodec.BufferInfo</a> expected,
|
|
<a href="https://developer.android.com/reference/android/media/MediaCodec.BufferInfo.html" title="class or interface in android.media" class="externalLink" target="_top">MediaCodec.BufferInfo</a> actual)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether two <a href="https://developer.android.com/reference/android/media/MediaCodec.BufferInfo.html" title="class or interface in android.media" class="externalLink" target="_top"><code>BufferInfos</code></a> are equal.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#assertDataSourceContent(com.google.android.exoplayer2.upstream.DataSource,com.google.android.exoplayer2.upstream.DataSpec,byte%5B%5D,boolean)">assertDataSourceContent</a></span>​(<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
<a href="../upstream/DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a> dataSpec,
|
|
byte[] expectedData,
|
|
boolean expectKnownLength)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Asserts that data read from a <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> matches <code>expected</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildAssetUri(java.lang.String)">buildAssetUri</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> assetPath)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> for the given asset path.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildTestData(int)">buildTestData</a></span>​(int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Equivalent to <code>buildTestData(length, length)</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildTestData(int,int)">buildTestData</a></span>​(int length,
|
|
int seed)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Generates an array of random bytes with the specified length.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildTestData(int,java.util.Random)">buildTestData</a></span>​(int length,
|
|
<a href="https://developer.android.com/reference/java/util/Random.html" title="class or interface in java.util" class="externalLink" target="_top">Random</a> random)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Generates an array of random bytes with the specified length.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildTestString(int,java.util.Random)">buildTestString</a></span>​(int length,
|
|
<a href="https://developer.android.com/reference/java/util/Random.html" title="class or interface in java.util" class="externalLink" target="_top">Random</a> random)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Generates a random string with the specified length.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createByteArray(int...)">createByteArray</a></span>​(int... bytes)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts an array of integers in the range [0, 255] into an equivalent byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://guava.dev/releases/27.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true" title="class or interface in com.google.common.collect" class="externalLink">ImmutableList</a><<a href="https://developer.android.com/reference/java/lang/Byte.html" title="class or interface in java.lang" class="externalLink" target="_top">Byte</a>></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createByteList(int...)">createByteList</a></span>​(int... bytes)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts an array of integers in the range [0, 255] into an equivalent byte list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>static <a href="../metadata/MetadataInputBuffer.html" title="class in com.google.android.exoplayer2.metadata">MetadataInputBuffer</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createMetadataInputBuffer(byte%5B%5D)">createMetadataInputBuffer</a></span>​(byte[] data)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Create a new <a href="../metadata/MetadataInputBuffer.html" title="class in com.google.android.exoplayer2.metadata"><code>MetadataInputBuffer</code></a> and copy <code>data</code> into the backing <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>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTestFile(java.io.File,long)">createTestFile</a></span>​(<a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a> file,
|
|
long length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes test data with the specified length to the file and returns it.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTestFile(java.io.File,java.lang.String)">createTestFile</a></span>​(<a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a> directory,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> name)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes one byte long test data to the file and returns it.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTestFile(java.io.File,java.lang.String,long)">createTestFile</a></span>​(<a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a> directory,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> name,
|
|
long length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes test data with the specified length to the file and returns it.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>static <a href="FakeExtractorOutput.html" title="class in com.google.android.exoplayer2.testutil">FakeExtractorOutput</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#extractAllSamplesFromFile(com.google.android.exoplayer2.extractor.Extractor,android.content.Context,java.lang.String)">extractAllSamplesFromFile</a></span>​(<a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a> extractor,
|
|
<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Extracts all samples from the given file into a <a href="FakeTrackOutput.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeTrackOutput</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor">SeekMap</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#extractSeekMap(com.google.android.exoplayer2.extractor.Extractor,com.google.android.exoplayer2.testutil.FakeExtractorOutput,com.google.android.exoplayer2.upstream.DataSource,android.net.Uri)">extractSeekMap</a></span>​(<a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a> extractor,
|
|
<a href="FakeExtractorOutput.html" title="class in com.google.android.exoplayer2.testutil">FakeExtractorOutput</a> output,
|
|
<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads from the given input using the given <a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractor</code></a>, until it can produce the <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a> and all of the track formats have been identified, or until the extractor encounters
|
|
EOF.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink" target="_top">Bitmap</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBitmap(android.content.Context,java.lang.String)">getBitmap</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a <a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink" target="_top"><code>Bitmap</code></a> read from an asset file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getByteArray(android.content.Context,java.lang.String)">getByteArray</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the bytes of an asset file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>static <a href="../extractor/ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorInput</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExtractorInputFromPosition(com.google.android.exoplayer2.upstream.DataSource,long,android.net.Uri)">getExtractorInputFromPosition</a></span>​(<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
long position,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns an <a href="../extractor/ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a> to read from the given input at given position.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../database/DatabaseProvider.html" title="interface in com.google.android.exoplayer2.database">DatabaseProvider</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInMemoryDatabaseProvider()">getInMemoryDatabaseProvider</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a <a href="../database/DatabaseProvider.html" title="interface in com.google.android.exoplayer2.database"><code>DatabaseProvider</code></a> that provides an in-memory database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top">InputStream</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInputStream(android.content.Context,java.lang.String)">getInputStream</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns an <a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top"><code>InputStream</code></a> for reading from an asset file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getString(android.content.Context,java.lang.String)">getString</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> read from an asset file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#seekToTimeUs(com.google.android.exoplayer2.extractor.Extractor,com.google.android.exoplayer2.extractor.SeekMap,long,com.google.android.exoplayer2.upstream.DataSource,com.google.android.exoplayer2.testutil.FakeTrackOutput,android.net.Uri)">seekToTimeUs</a></span>​(<a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a> extractor,
|
|
<a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor">SeekMap</a> seekMap,
|
|
long seekTimeUs,
|
|
<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
<a href="FakeTrackOutput.html" title="class in com.google.android.exoplayer2.testutil">FakeTrackOutput</a> trackOutput,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Seeks to the given seek time of the stream from the given input, and keeps reading from the
|
|
input until we can extract at least one sample following the seek position, or until
|
|
end-of-input is reached.</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">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="buildTestData(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>buildTestData</h4>
|
|
<pre class="methodSignature">public static byte[] buildTestData​(int length)</pre>
|
|
<div class="block">Equivalent to <code>buildTestData(length, length)</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>length</code> - The length of the array.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The generated array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="buildTestData(int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>buildTestData</h4>
|
|
<pre class="methodSignature">public static byte[] buildTestData​(int length,
|
|
int seed)</pre>
|
|
<div class="block">Generates an array of random bytes with the specified length.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>length</code> - The length of the array.</dd>
|
|
<dd><code>seed</code> - A seed for an internally created <a href="https://developer.android.com/reference/java/util/Random.html" title="class or interface in java.util" class="externalLink" target="_top"><code>source of randomness</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The generated array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="buildTestData(int,java.util.Random)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>buildTestData</h4>
|
|
<pre class="methodSignature">public static byte[] buildTestData​(int length,
|
|
<a href="https://developer.android.com/reference/java/util/Random.html" title="class or interface in java.util" class="externalLink" target="_top">Random</a> random)</pre>
|
|
<div class="block">Generates an array of random bytes with the specified length.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>length</code> - The length of the array.</dd>
|
|
<dd><code>random</code> - A source of randomness.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The generated array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="buildTestString(int,java.util.Random)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>buildTestString</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> buildTestString​(int length,
|
|
<a href="https://developer.android.com/reference/java/util/Random.html" title="class or interface in java.util" class="externalLink" target="_top">Random</a> random)</pre>
|
|
<div class="block">Generates a random string with the specified length.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>length</code> - The length of the string.</dd>
|
|
<dd><code>random</code> - A source of randomness.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The generated string.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createByteArray(int...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createByteArray</h4>
|
|
<pre class="methodSignature">public static byte[] createByteArray​(int... bytes)</pre>
|
|
<div class="block">Converts an array of integers in the range [0, 255] into an equivalent byte array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - An array of integers, all of which must be in the range [0, 255].</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The equivalent byte array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createByteList(int...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createByteList</h4>
|
|
<pre class="methodSignature">public static <a href="https://guava.dev/releases/27.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true" title="class or interface in com.google.common.collect" class="externalLink">ImmutableList</a><<a href="https://developer.android.com/reference/java/lang/Byte.html" title="class or interface in java.lang" class="externalLink" target="_top">Byte</a>> createByteList​(int... bytes)</pre>
|
|
<div class="block">Converts an array of integers in the range [0, 255] into an equivalent byte list.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - An array of integers, all of which must be in the range [0, 255].</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The equivalent byte list.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createTestFile(java.io.File,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createTestFile</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink">File</a> createTestFile​(<a href="https://developer.android.com/reference/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink" target="_top">File</a> directory,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> name)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Writes one byte long test data to the file and returns it.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createTestFile(java.io.File,java.lang.String,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createTestFile</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink">File</a> createTestFile​(<a href="https://developer.android.com/reference/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink" target="_top">File</a> directory,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> name,
|
|
long length)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Writes test data with the specified length to the file and returns it.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createTestFile(java.io.File,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createTestFile</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink">File</a> createTestFile​(<a href="https://developer.android.com/reference/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink" target="_top">File</a> file,
|
|
long length)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Writes test data with the specified length to the file and returns it.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getByteArray(android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getByteArray</h4>
|
|
<pre class="methodSignature">public static byte[] getByteArray​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Returns the bytes of an asset file.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getInputStream(android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getInputStream</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink">InputStream</a> getInputStream​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Returns an <a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top"><code>InputStream</code></a> for reading from an asset file.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getString(android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getString</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> getString​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Returns a <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> read from an asset file.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getBitmap(android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBitmap</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink">Bitmap</a> getBitmap​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Returns a <a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink" target="_top"><code>Bitmap</code></a> read from an asset file.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getInMemoryDatabaseProvider()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getInMemoryDatabaseProvider</h4>
|
|
<pre class="methodSignature">public static <a href="../database/DatabaseProvider.html" title="interface in com.google.android.exoplayer2.database">DatabaseProvider</a> getInMemoryDatabaseProvider()</pre>
|
|
<div class="block">Returns a <a href="../database/DatabaseProvider.html" title="interface in com.google.android.exoplayer2.database"><code>DatabaseProvider</code></a> that provides an in-memory database.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="assertDataSourceContent(com.google.android.exoplayer2.upstream.DataSource,com.google.android.exoplayer2.upstream.DataSpec,byte[],boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>assertDataSourceContent</h4>
|
|
<pre class="methodSignature">public static void assertDataSourceContent​(<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
<a href="../upstream/DataSpec.html" title="class in com.google.android.exoplayer2.upstream">DataSpec</a> dataSpec,
|
|
byte[] expectedData,
|
|
boolean expectKnownLength)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Asserts that data read from a <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> matches <code>expected</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>dataSource</code> - The <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> through which to read.</dd>
|
|
<dd><code>dataSpec</code> - The <a href="../upstream/DataSpec.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpec</code></a> to use when opening the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a>.</dd>
|
|
<dd><code>expectedData</code> - The expected data.</dd>
|
|
<dd><code>expectKnownLength</code> - Whether to assert that <a href="../upstream/DataSource.html#open(com.google.android.exoplayer2.upstream.DataSpec)"><code>DataSource.open(com.google.android.exoplayer2.upstream.DataSpec)</code></a> returns the expected
|
|
data length. If false then it's asserted that <a href="../C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a> is returned.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink">IOException</a></code> - If an error occurs reading fom the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream" target="_top"><code>DataSource</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="assertBufferInfosEqual(android.media.MediaCodec.BufferInfo,android.media.MediaCodec.BufferInfo)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>assertBufferInfosEqual</h4>
|
|
<pre class="methodSignature">public static void assertBufferInfosEqual​(<a href="https://developer.android.com/reference/android/media/MediaCodec.BufferInfo.html" title="class or interface in android.media" class="externalLink" target="_top">MediaCodec.BufferInfo</a> expected,
|
|
<a href="https://developer.android.com/reference/android/media/MediaCodec.BufferInfo.html" title="class or interface in android.media" class="externalLink" target="_top">MediaCodec.BufferInfo</a> actual)</pre>
|
|
<div class="block">Returns whether two <a href="https://developer.android.com/reference/android/media/MediaCodec.BufferInfo.html" title="class or interface in android.media" class="externalLink" target="_top"><code>BufferInfos</code></a> are equal.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="assertBitmapsAreSimilar(android.graphics.Bitmap,android.graphics.Bitmap,double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>assertBitmapsAreSimilar</h4>
|
|
<pre class="methodSignature">public static void assertBitmapsAreSimilar​(<a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink" target="_top">Bitmap</a> expectedBitmap,
|
|
<a href="https://developer.android.com/reference/android/graphics/Bitmap.html" title="class or interface in android.graphics" class="externalLink" target="_top">Bitmap</a> actualBitmap,
|
|
double psnrThresholdDb)</pre>
|
|
<div class="block">Asserts whether actual bitmap is very similar to the expected bitmap at some quality level.
|
|
|
|
<p>This is defined as their PSNR value is greater than or equal to the threshold. The higher
|
|
the threshold, the more similar they are.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>expectedBitmap</code> - The expected bitmap.</dd>
|
|
<dd><code>actualBitmap</code> - The actual bitmap.</dd>
|
|
<dd><code>psnrThresholdDb</code> - The PSNR threshold (in dB), at or above which bitmaps are considered
|
|
very similar.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="buildAssetUri(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>buildAssetUri</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink">Uri</a> buildAssetUri​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> assetPath)</pre>
|
|
<div class="block">Returns the <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> for the given asset path.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="extractSeekMap(com.google.android.exoplayer2.extractor.Extractor,com.google.android.exoplayer2.testutil.FakeExtractorOutput,com.google.android.exoplayer2.upstream.DataSource,android.net.Uri)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>extractSeekMap</h4>
|
|
<pre class="methodSignature">public static <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor">SeekMap</a> extractSeekMap​(<a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a> extractor,
|
|
<a href="FakeExtractorOutput.html" title="class in com.google.android.exoplayer2.testutil">FakeExtractorOutput</a> output,
|
|
<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Reads from the given input using the given <a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractor</code></a>, until it can produce the <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a> and all of the track formats have been identified, or until the extractor encounters
|
|
EOF.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>extractor</code> - The <a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractor</code></a> to extractor from input.</dd>
|
|
<dd><code>output</code> - The <a href="FakeTrackOutput.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeTrackOutput</code></a> to store the extracted <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a> and track.</dd>
|
|
<dd><code>dataSource</code> - The <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> that will be used to read from the input.</dd>
|
|
<dd><code>uri</code> - The Uri of the input.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The extracted <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a>.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - If an error occurred reading from the input, or if the extractor finishes
|
|
reading from input without extracting any <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="extractAllSamplesFromFile(com.google.android.exoplayer2.extractor.Extractor,android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>extractAllSamplesFromFile</h4>
|
|
<pre class="methodSignature">public static <a href="FakeExtractorOutput.html" title="class in com.google.android.exoplayer2.testutil">FakeExtractorOutput</a> extractAllSamplesFromFile​(<a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a> extractor,
|
|
<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Extracts all samples from the given file into a <a href="FakeTrackOutput.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeTrackOutput</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>extractor</code> - The <a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractor</code></a> to extractor from input.</dd>
|
|
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
|
|
<dd><code>fileName</code> - The name of the input file.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The <a href="FakeTrackOutput.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeTrackOutput</code></a> containing the extracted samples.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - If an error occurred reading from the input, or if the extractor finishes
|
|
reading from input without extracting any <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="seekToTimeUs(com.google.android.exoplayer2.extractor.Extractor,com.google.android.exoplayer2.extractor.SeekMap,long,com.google.android.exoplayer2.upstream.DataSource,com.google.android.exoplayer2.testutil.FakeTrackOutput,android.net.Uri)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>seekToTimeUs</h4>
|
|
<pre class="methodSignature">public static int seekToTimeUs​(<a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor">Extractor</a> extractor,
|
|
<a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor">SeekMap</a> seekMap,
|
|
long seekTimeUs,
|
|
<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
<a href="FakeTrackOutput.html" title="class in com.google.android.exoplayer2.testutil">FakeTrackOutput</a> trackOutput,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Seeks to the given seek time of the stream from the given input, and keeps reading from the
|
|
input until we can extract at least one sample following the seek position, or until
|
|
end-of-input is reached.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>extractor</code> - The <a href="../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractor</code></a> to extract from input.</dd>
|
|
<dd><code>seekMap</code> - The <a href="../extractor/SeekMap.html" title="interface in com.google.android.exoplayer2.extractor"><code>SeekMap</code></a> of the stream from the given input.</dd>
|
|
<dd><code>seekTimeUs</code> - The seek time, in micro-seconds.</dd>
|
|
<dd><code>trackOutput</code> - The <a href="FakeTrackOutput.html" title="class in com.google.android.exoplayer2.testutil"><code>FakeTrackOutput</code></a> to store the extracted samples.</dd>
|
|
<dd><code>dataSource</code> - The <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> that will be used to read from the input.</dd>
|
|
<dd><code>uri</code> - The Uri of the input.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the first extracted sample written to the given <code>trackOutput</code> after
|
|
the seek is completed, or <a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if the seek is completed without any
|
|
extracted sample.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getExtractorInputFromPosition(com.google.android.exoplayer2.upstream.DataSource,long,android.net.Uri)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getExtractorInputFromPosition</h4>
|
|
<pre class="methodSignature">public static <a href="../extractor/ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor">ExtractorInput</a> getExtractorInputFromPosition​(<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a> dataSource,
|
|
long position,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Returns an <a href="../extractor/ExtractorInput.html" title="interface in com.google.android.exoplayer2.extractor"><code>ExtractorInput</code></a> to read from the given input at given position.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createMetadataInputBuffer(byte[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>createMetadataInputBuffer</h4>
|
|
<pre class="methodSignature">public static <a href="../metadata/MetadataInputBuffer.html" title="class in com.google.android.exoplayer2.metadata">MetadataInputBuffer</a> createMetadataInputBuffer​(byte[] data)</pre>
|
|
<div class="block">Create a new <a href="../metadata/MetadataInputBuffer.html" title="class in com.google.android.exoplayer2.metadata"><code>MetadataInputBuffer</code></a> and copy <code>data</code> into the backing <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>.</div>
|
|
</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>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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>
|