mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
518 lines
30 KiB
HTML
518 lines
30 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>DrmSessionManager (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="DrmSessionManager (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":6,"i1":33,"i2":6,"i3":18,"i4":18,"i5":18};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"],32:["t6","Deprecated 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><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a 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.drm</a></div>
|
|
<h2 title="Interface DrmSessionManager" class="title">Interface DrmSessionManager</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Known Implementing Classes:</dt>
|
|
<dd><code><a href="DefaultDrmSessionManager.html" title="class in com.google.android.exoplayer2.drm">DefaultDrmSessionManager</a></code></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public interface <span class="typeNameLabel">DrmSessionManager</span></pre>
|
|
<div class="block">Manages a DRM session.</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"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Interface</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static interface </code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DrmSessionManager.DrmSessionReference.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager.DrmSessionReference</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Represents a single reference count of a <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a>, while deliberately not giving
|
|
access to the underlying session.</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"> </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 <a href="DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DRM_UNSUPPORTED">DRM_UNSUPPORTED</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">An instance that supports no DRM schemes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DUMMY">DUMMY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#DRM_UNSUPPORTED"><code>DRM_UNSUPPORTED</code></a>.</div>
|
|
</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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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><a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm">DrmSession</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)">acquireSession</a></span>​(<a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a> playbackLooper,
|
|
<a href="DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a> eventDispatcher,
|
|
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a> format)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a> for the specified <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>, with an incremented reference
|
|
count.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDummyDrmSessionManager()">getDummyDrmSessionManager</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#DRM_UNSUPPORTED"><code>DRM_UNSUPPORTED</code></a>.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a><? extends <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm" target="_top">ExoMediaCrypto</a>></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExoMediaCryptoType(com.google.android.exoplayer2.Format)">getExoMediaCryptoType</a></span>​(<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a> format)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> type associated to sessions acquired for the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>default <a href="DrmSessionManager.DrmSessionReference.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager.DrmSessionReference</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#preacquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)">preacquireSession</a></span>​(<a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a> playbackLooper,
|
|
<a href="DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a> eventDispatcher,
|
|
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a> format)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Pre-acquires a DRM session for the specified <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prepare()">prepare</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Acquires any required resources.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release()">release</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Releases any acquired resources.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</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="DRM_UNSUPPORTED">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DRM_UNSUPPORTED</h4>
|
|
<pre>static final <a href="DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a> DRM_UNSUPPORTED</pre>
|
|
<div class="block">An instance that supports no DRM schemes.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="DUMMY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>DUMMY</h4>
|
|
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
|
|
static final <a href="DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a> DUMMY</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#DRM_UNSUPPORTED"><code>DRM_UNSUPPORTED</code></a>.</div>
|
|
</div>
|
|
<div class="block">An instance that supports no DRM schemes.</div>
|
|
</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="getDummyDrmSessionManager()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDummyDrmSessionManager</h4>
|
|
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
|
|
static <a href="DrmSessionManager.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager</a> getDummyDrmSessionManager()</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#DRM_UNSUPPORTED"><code>DRM_UNSUPPORTED</code></a>.</div>
|
|
</div>
|
|
<div class="block">Returns <a href="#DRM_UNSUPPORTED"><code>DRM_UNSUPPORTED</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="prepare()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>prepare</h4>
|
|
<pre class="methodSignature">default void prepare()</pre>
|
|
<div class="block">Acquires any required resources.
|
|
|
|
<p><a href="#release()"><code>release()</code></a> must be called to ensure the acquired resources are released. After
|
|
releasing, an instance may be re-prepared.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="release()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>release</h4>
|
|
<pre class="methodSignature">default void release()</pre>
|
|
<div class="block">Releases any acquired resources.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="preacquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>preacquireSession</h4>
|
|
<pre class="methodSignature">default <a href="DrmSessionManager.DrmSessionReference.html" title="interface in com.google.android.exoplayer2.drm">DrmSessionManager.DrmSessionReference</a> preacquireSession​(<a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a> playbackLooper,
|
|
@Nullable
|
|
<a href="DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a> eventDispatcher,
|
|
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a> format)</pre>
|
|
<div class="block">Pre-acquires a DRM session for the specified <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.
|
|
|
|
<p>This notifies the manager that a subsequent call to <a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)"><code>acquireSession(Looper,
|
|
DrmSessionEventListener.EventDispatcher, Format)</code></a> with the same <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> is likely,
|
|
allowing a manager that supports pre-acquisition to get the required <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a> ready
|
|
in the background.
|
|
|
|
<p>The caller must call <a href="DrmSessionManager.DrmSessionReference.html#release()"><code>DrmSessionManager.DrmSessionReference.release()</code></a> on the returned instance when
|
|
they no longer require the pre-acquisition (i.e. they know they won't be making a matching call
|
|
to <a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)"><code>acquireSession(Looper, DrmSessionEventListener.EventDispatcher, Format)</code></a> in the near
|
|
future).
|
|
|
|
<p>This manager may silently release the underlying session in order to allow another operation
|
|
to complete. This will result in a subsequent call to <a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)"><code>acquireSession(Looper,
|
|
DrmSessionEventListener.EventDispatcher, Format)</code></a> re-initializing a new session, including
|
|
repeating key loads and other async initialization steps.
|
|
|
|
<p>The caller must separately call <a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)"><code>acquireSession(Looper,
|
|
DrmSessionEventListener.EventDispatcher, Format)</code></a> in order to obtain a session suitable for
|
|
playback. The pre-acquired <a href="DrmSessionManager.DrmSessionReference.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionManager.DrmSessionReference</code></a> and full <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a> instances
|
|
are distinct. The caller must release both, and can release the <a href="DrmSessionManager.DrmSessionReference.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionManager.DrmSessionReference</code></a>
|
|
before the <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a> without affecting playback.
|
|
|
|
<p>This can be called from any thread.
|
|
|
|
<p>Implementations that do not support pre-acquisition always return an empty <a href="DrmSessionManager.DrmSessionReference.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSessionManager.DrmSessionReference</code></a> instance.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playbackLooper</code> - The looper associated with the media playback thread.</dd>
|
|
<dd><code>eventDispatcher</code> - The <a href="DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm"><code>DrmSessionEventListener.EventDispatcher</code></a> used to distribute
|
|
events, and passed on to <a href="DrmSession.html#acquire(com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher)"><code>DrmSession.acquire(DrmSessionEventListener.EventDispatcher)</code></a>.</dd>
|
|
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which to pre-acquire a <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A releaser for the pre-acquired session. Guaranteed to be non-null even if the matching
|
|
<a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)"><code>acquireSession(Looper, DrmSessionEventListener.EventDispatcher, Format)</code></a> would
|
|
return null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>acquireSession</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
<a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm">DrmSession</a> acquireSession​(<a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a> playbackLooper,
|
|
@Nullable
|
|
<a href="DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm">DrmSessionEventListener.EventDispatcher</a> eventDispatcher,
|
|
<a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a> format)</pre>
|
|
<div class="block">Returns a <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a> for the specified <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>, with an incremented reference
|
|
count. May return null if the <a href="../Format.html#drmInitData"><code>Format.drmInitData</code></a> is null and the DRM session manager is
|
|
not configured to attach a <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a> to clear content. When the caller no longer needs
|
|
to use a returned <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a>, it must call <a href="DrmSession.html#release(com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher)"><code>DrmSession.release(DrmSessionEventListener.EventDispatcher)</code></a> to decrement the reference count.
|
|
|
|
<p>If the provided <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> contains a null <a href="../Format.html#drmInitData"><code>Format.drmInitData</code></a>, the returned
|
|
<a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a> (if not null) will be a placeholder session which does not execute key
|
|
requests, and cannot be used to handle encrypted content. However, a placeholder session may be
|
|
used to configure secure decoders for playback of clear content periods, which can reduce the
|
|
cost of transitioning between clear and encrypted content.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playbackLooper</code> - The looper associated with the media playback thread.</dd>
|
|
<dd><code>eventDispatcher</code> - The <a href="DrmSessionEventListener.EventDispatcher.html" title="class in com.google.android.exoplayer2.drm"><code>DrmSessionEventListener.EventDispatcher</code></a> used to distribute
|
|
events, and passed on to <a href="DrmSession.html#acquire(com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher)"><code>DrmSession.acquire(DrmSessionEventListener.EventDispatcher)</code></a>.</dd>
|
|
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which to acquire a <a href="DrmSession.html" title="interface in com.google.android.exoplayer2.drm"><code>DrmSession</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The DRM session. May be null if the given <a href="../Format.html#drmInitData"><code>Format.drmInitData</code></a> is null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getExoMediaCryptoType(com.google.android.exoplayer2.Format)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>getExoMediaCryptoType</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a><? extends <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm">ExoMediaCrypto</a>> getExoMediaCryptoType​(<a href="../Format.html" title="class in com.google.android.exoplayer2" target="_top">Format</a> format)</pre>
|
|
<div class="block">Returns the <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> type associated to sessions acquired for the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>. Returns the <a href="UnsupportedMediaCrypto.html" title="class in com.google.android.exoplayer2.drm"><code>UnsupportedMediaCrypto</code></a> type if this DRM session manager does not
|
|
support any of the DRM schemes defined in the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>. Returns null if <a href="../Format.html#drmInitData"><code>Format.drmInitData</code></a> is null and <a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)"><code>acquireSession(android.os.Looper, com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher, com.google.android.exoplayer2.Format)</code></a> would return null for the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>format</code> - The <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> for which to return the <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> type.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The <a href="ExoMediaCrypto.html" title="interface in com.google.android.exoplayer2.drm"><code>ExoMediaCrypto</code></a> type associated to sessions acquired using the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>, or <a href="UnsupportedMediaCrypto.html" title="class in com.google.android.exoplayer2.drm"><code>UnsupportedMediaCrypto</code></a> if this DRM session manager does not support any
|
|
of the DRM schemes defined in the given <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>. May be null if <a href="../Format.html#drmInitData"><code>Format.drmInitData</code></a> is null and <a href="#acquireSession(android.os.Looper,com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher,com.google.android.exoplayer2.Format)"><code>acquireSession(android.os.Looper, com.google.android.exoplayer2.drm.DrmSessionEventListener.EventDispatcher, com.google.android.exoplayer2.Format)</code></a> would return null for the given
|
|
<a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|