mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-02 05:55:08 +00:00
Deployed cefd5295 with MkDocs version: 1.6.1
This commit is contained in:
@@ -5493,6 +5493,10 @@ A slow answer arrives as a <a href="#slow-responses">slow response</a>.</p>
|
|||||||
<td><code>vault_keys</code> (response)</td>
|
<td><code>vault_keys</code> (response)</td>
|
||||||
<td>KIDs whose content key came from a server vault, not the CDM. The client proves such a content key with a decode before it trusts it; the field is absent when every content key came from the CDM.</td>
|
<td>KIDs whose content key came from a server vault, not the CDM. The client proves such a content key with a decode before it trusts it; the field is absent when every content key came from the CDM.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>bridge_kids</code> (response)</td>
|
||||||
|
<td>For a batch: the KIDs of the init segments of each FairPlay-only track that the server licensed through the FairPlay bridge, by track id. The client needs the content key of each of these KIDs, or the download of that track stops. Absent when the batch has no such track.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -1691,6 +1691,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#the-fairplay-bridge-hook" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
The FairPlay bridge hook
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -2570,6 +2581,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#the-fairplay-bridge-hook" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
The FairPlay bridge hook
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -3260,11 +3282,58 @@ needs:</p>
|
|||||||
<td>dict / str / bytes / <code>None</code></td>
|
<td>dict / str / bytes / <code>None</code></td>
|
||||||
<td>For <code>ClearKeyCENC</code>; return <code>None</code> to let the framework POST to the manifest <code>Laurl</code>.</td>
|
<td>For <code>ClearKeyCENC</code>; return <code>None</code> to let the framework POST to the manifest <code>Laurl</code>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>get_fairplay_bridge_license(title, track, challenge, drm_system)</code></td>
|
||||||
|
<td>license</td>
|
||||||
|
<td>Optional, not on the base class. Licenses a FairPlay-only HLS track; see <a href="#the-fairplay-bridge-hook">The FairPlay bridge hook</a>.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>You do not open CDM sessions or operate shaka-packager yourself. The <code>Widevine</code>/<code>PlayReady</code>
|
<p>You do not open CDM sessions or operate shaka-packager yourself. The <code>Widevine</code>/<code>PlayReady</code>
|
||||||
classes drive the CDM handshake and call the decryption backend. Your hook is only the
|
classes drive the CDM handshake and call the decryption backend. Your hook is only the
|
||||||
"send this challenge, give me back the license" step.</p>
|
"send this challenge, give me back the license" step.</p>
|
||||||
|
<h3 id="the-fairplay-bridge-hook">The FairPlay bridge hook<a class="headerlink" href="#the-fairplay-bridge-hook" title="Permanent link">¶</a></h3>
|
||||||
|
<p>unshackle has no FairPlay CDM and never sends a FairPlay challenge. For a FairPlay-only track it can send a PlayReady or Widevine challenge for the KIDs of the init segments to the licence server of the platform, which works only when that server issues the same content key to PlayReady or Widevine. The bridge runs only for a service that defines
|
||||||
|
<code>get_fairplay_bridge_license</code>. The base class does not define it.</p>
|
||||||
|
<div class="language-python highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_fairplay_bridge_license</span><span class="p">(</span>
|
||||||
|
</span><span id="__span-4-2"><a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a> <span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">:</span> <span class="nb">bytes</span><span class="p">,</span> <span class="n">title</span><span class="p">:</span> <span class="n">Title_T</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm_system</span><span class="p">:</span> <span class="nb">str</span>
|
||||||
|
</span><span id="__span-4-3"><a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="p">)</span> <span class="o">-></span> <span class="nb">bytes</span> <span class="o">|</span> <span class="nb">str</span><span class="p">:</span>
|
||||||
|
</span><span id="__span-4-4"><a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a><span class="w"> </span><span class="sd">"""The licence server of this platform issues the content keys of its FairPlay-only tracks to PlayReady."""</span>
|
||||||
|
</span><span id="__span-4-5"><a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a> <span class="n">licence</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_playready_license</span> <span class="k">if</span> <span class="n">drm_system</span> <span class="o">==</span> <span class="s2">"playready"</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_widevine_license</span>
|
||||||
|
</span><span id="__span-4-6"><a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a> <span class="k">return</span> <span class="n">licence</span><span class="p">(</span><span class="n">challenge</span><span class="o">=</span><span class="n">challenge</span><span class="p">,</span> <span class="n">title</span><span class="o">=</span><span class="n">title</span><span class="p">,</span> <span class="n">track</span><span class="o">=</span><span class="n">track</span><span class="p">)</span>
|
||||||
|
</span></code></pre></div>
|
||||||
|
<ul>
|
||||||
|
<li><code>drm_system</code> is <code>"playready"</code> or <code>"widevine"</code>. The hook must accept it.</li>
|
||||||
|
<li>The hook can also declare the arguments of the licence callback of that system: <code>pssh</code> for Widevine,
|
||||||
|
<code>pssh_b64</code> for PlayReady, and <code>session_id</code>. It gets only the arguments that it declares.</li>
|
||||||
|
<li>The key IDs are on the DRM object of the track (<code>track.drm[0].kids</code>) when the hook runs. A service that
|
||||||
|
needs its own request shape builds the request in the hook.</li>
|
||||||
|
<li>The challenge of every other track goes to <code>get_playready_license</code> or <code>get_widevine_license</code>, as before.</li>
|
||||||
|
</ul>
|
||||||
|
<p>The DRM system of the challenge is the <code>drm_preference</code> of the track, else the system of the configured
|
||||||
|
CDM. For a licence server that issues the content key to one system only, set <code>drm_preference</code> on the
|
||||||
|
FairPlay-only tracks in <code>get_tracks()</code>:</p>
|
||||||
|
<div class="language-python highlight"><pre><span></span><code><span id="__span-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="k">for</span> <span class="n">track</span> <span class="ow">in</span> <span class="n">tracks</span><span class="o">.</span><span class="n">videos</span> <span class="o">+</span> <span class="n">tracks</span><span class="o">.</span><span class="n">audio</span><span class="p">:</span>
|
||||||
|
</span><span id="__span-5-2"><a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">track</span><span class="o">.</span><span class="n">drm</span><span class="p">:</span>
|
||||||
|
</span><span id="__span-5-3"><a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a> <span class="n">track</span><span class="o">.</span><span class="n">drm_preference</span> <span class="o">=</span> <span class="s2">"playready"</span>
|
||||||
|
</span></code></pre></div>
|
||||||
|
<p>Without the hook, no challenge goes to the licence server for a FairPlay-only track, and <code>dl</code> leaves
|
||||||
|
such a track out of the selection:</p>
|
||||||
|
<ul>
|
||||||
|
<li>After the selection and the deferred DRM load, <code>dl</code> checks each selected video and audio track that has
|
||||||
|
no DRM object. An HLS track costs one request for its media playlist. A DASH track is FairPlay-only when
|
||||||
|
its <code>ContentProtection</code> elements name only DRM systems that unshackle cannot license and its init segment
|
||||||
|
has no Widevine or PlayReady <code>pssh</code>.</li>
|
||||||
|
<li><code>dl</code> removes each FairPlay-only track and selects again, so the run takes the next best track that
|
||||||
|
licenses. It logs one line for each title: <code>Left out 2 FairPlay-only tracks: EXAMPLE has no FairPlay bridge hook</code>.</li>
|
||||||
|
<li>When a quality, range or codec flag matches only FairPlay-only tracks, the second selection skips the
|
||||||
|
title with its usual reason, and <code>--best-available</code> takes its usual fallback. When each selected video
|
||||||
|
or each selected audio track is FairPlay-only, <code>dl</code> skips the title.</li>
|
||||||
|
<li><code>--list</code> shows every track and checks none. An import is not checked, because its export holds the
|
||||||
|
content keys.</li>
|
||||||
|
</ul>
|
||||||
|
<p>A licence server that does not issue the content key refuses the challenge, and can flag the device. Test
|
||||||
|
the route with a licence-only run (<code>--cdm-only --skip-dl</code>) before a service relies on it.</p>
|
||||||
<h3 id="decrypting-a-cbcs-file-yourself">Decrypting a cbcs file yourself<a class="headerlink" href="#decrypting-a-cbcs-file-yourself" title="Permanent link">¶</a></h3>
|
<h3 id="decrypting-a-cbcs-file-yourself">Decrypting a cbcs file yourself<a class="headerlink" href="#decrypting-a-cbcs-file-yourself" title="Permanent link">¶</a></h3>
|
||||||
<p>Some tracks cannot use the framework's decryption: a single cbcs file whose sample entries share
|
<p>Some tracks cannot use the framework's decryption: a single cbcs file whose sample entries share
|
||||||
a zero default KID, or a sample entry whose content key no CDM can license and only a separate
|
a zero default KID, or a sample entry whose content key no CDM can license and only a separate
|
||||||
@@ -3285,26 +3354,30 @@ that needs a process on the server also works for a remote client.</p>
|
|||||||
<h3 id="a-playlist-whose-key-tag-unshackle-cannot-license">A playlist whose key tag unshackle cannot license<a class="headerlink" href="#a-playlist-whose-key-tag-unshackle-cannot-license" title="Permanent link">¶</a></h3>
|
<h3 id="a-playlist-whose-key-tag-unshackle-cannot-license">A playlist whose key tag unshackle cannot license<a class="headerlink" href="#a-playlist-whose-key-tag-unshackle-cannot-license" title="Permanent link">¶</a></h3>
|
||||||
<p>A media playlist can name only a key system that unshackle does not read, such as an <code>skd://</code> key
|
<p>A media playlist can name only a key system that unshackle does not read, such as an <code>skd://</code> key
|
||||||
over cbcs media, while the licence server of the platform also issues the same content key over
|
over cbcs media, while the licence server of the platform also issues the same content key over
|
||||||
PlayReady or Widevine. <code>HLS.download_track</code> licenses such a track with no service code when all of
|
PlayReady or Widevine. <code>HLS.download_track</code> licenses such a track when all of these conditions are true:</p>
|
||||||
these conditions are true:</p>
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>The service has the <a href="#the-fairplay-bridge-hook">FairPlay bridge hook</a>.</li>
|
||||||
<li>The track has no DRM object.</li>
|
<li>The track has no DRM object.</li>
|
||||||
<li>Every <code>EXT-X-KEY</code> of its media playlist is <code>SAMPLE-AES</code> or <code>SAMPLE-AES-CTR</code> for a DRM system
|
<li>Every <code>EXT-X-KEY</code> of its media playlist is <code>SAMPLE-AES</code> or <code>SAMPLE-AES-CTR</code> for a DRM system
|
||||||
unshackle cannot license, or <code>METHOD=NONE</code>. A segment under <code>METHOD=NONE</code> must have an init segment
|
unshackle cannot license, or <code>METHOD=NONE</code>. A segment under <code>METHOD=NONE</code> must have an init segment
|
||||||
that no encrypted segment uses: a decrypter that reads the encrypted init segment decrypts the clear
|
that no encrypted segment uses: a decrypter that reads the encrypted init segment decrypts the clear
|
||||||
samples too. A tag with <code>KEYFORMAT="identity"</code>, or with no <code>KEYFORMAT</code>, names no DRM system: each
|
samples too. A tag with <code>KEYFORMAT="identity"</code>, or with no <code>KEYFORMAT</code>, names no DRM system: each
|
||||||
encrypted segment also needs a tag of a DRM system.</li>
|
encrypted segment also needs a tag of a DRM system.</li>
|
||||||
<li>The configured CDM is a PlayReady or Widevine CDM.</li>
|
<li>The <code>drm_preference</code> of the track, or else the configured CDM, is PlayReady or Widevine.</li>
|
||||||
<li>The init segment (<code>EXT-X-MAP</code>) of the track names a key ID in its <code>tenc</code> box. When the <code>tenc</code> key ID is all
|
<li>The init segment (<code>EXT-X-MAP</code>) of the track names a key ID in its <code>tenc</code> box. When the <code>tenc</code> key ID is all
|
||||||
zeros, the playlist must have one key URI, and each init segment under the key tag must give the same
|
zeros, the playlist must have one key URI, and each init segment under the key tag must give the same
|
||||||
key ID: its <code>tenc</code> key ID, or else the one key ID that its <code>pssh</code> boxes name. A clear init segment,
|
key ID: its <code>tenc</code> key ID, or else the one key ID that its <code>pssh</code> boxes name. A clear init segment,
|
||||||
such as the one of a clear lead or tail, does not count. MPEG-TS media has no init segment.</li>
|
such as the one of a clear lead or tail, does not count. MPEG-TS media has no init segment.</li>
|
||||||
<li>The init segment does not change without an <code>EXT-X-DISCONTINUITY</code>.</li>
|
<li>The init segment does not change without an <code>EXT-X-DISCONTINUITY</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>The download reads the key ID from the init segment, builds a DRM object for the DRM system of the
|
<p>The download reads the key ID from the init segment, builds a DRM object for that DRM system with
|
||||||
CDM with <code>drm_stub</code>, and sends the challenge to the licence callback of the service. Over <code>--remote</code>
|
<code>drm_stub</code>, and sends the challenge to the hook. Over <code>--remote</code> the tracks reply tells the client that
|
||||||
the server reads the same key ID at the licence step, so it accepts the DRM object of the client. A
|
the service on the server has the hook. The server reads the same key ID at the licence step, accepts
|
||||||
licence that gives no content key stops the track before it downloads a segment.</p>
|
the DRM object of the client and sends the challenge to the hook of its service. A server that cannot
|
||||||
|
read the key ID refuses the challenge. A licence that gives no content key stops the track before it
|
||||||
|
downloads a segment. With the server CDM, the batch licence names the key IDs that the server read, so an
|
||||||
|
answer without their content keys stops the track in the same way. A content key that does not decode
|
||||||
|
the downloaded track stops the track with an error, and unshackle keeps no output file.</p>
|
||||||
<p>unshackle reads one key ID from each init segment. So it licenses a playlist that changes its content key
|
<p>unshackle reads one key ID from each init segment. So it licenses a playlist that changes its content key
|
||||||
correctly only when each content key has its own init segment with a real <code>tenc</code> key ID, after an
|
correctly only when each content key has its own init segment with a real <code>tenc</code> key ID, after an
|
||||||
<code>EXT-X-DISCONTINUITY</code>. When the first key ID is real, the download also reads the <code>tenc</code> key ID of
|
<code>EXT-X-DISCONTINUITY</code>. When the first key ID is real, the download also reads the <code>tenc</code> key ID of
|
||||||
@@ -3384,37 +3457,37 @@ prepared, all derived from the Click context (<code>ctx</code>) that <code>dl</c
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
<p class="admonition-title">A minimal service skeleton</p>
|
<p class="admonition-title">A minimal service skeleton</p>
|
||||||
<div class="language-python highlight"><span class="filename">services/EXMP/__init__.py</span><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="kn">from</span><span class="w"> </span><span class="nn">unshackle.core.service</span><span class="w"> </span><span class="kn">import</span> <span class="n">Service</span>
|
<div class="language-python highlight"><span class="filename">services/EXMP/__init__.py</span><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="kn">from</span><span class="w"> </span><span class="nn">unshackle.core.service</span><span class="w"> </span><span class="kn">import</span> <span class="n">Service</span>
|
||||||
</span><span id="__span-4-2"><a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="kn">from</span><span class="w"> </span><span class="nn">unshackle.core.manifests</span><span class="w"> </span><span class="kn">import</span> <span class="n">DASH</span>
|
</span><span id="__span-6-2"><a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="kn">from</span><span class="w"> </span><span class="nn">unshackle.core.manifests</span><span class="w"> </span><span class="kn">import</span> <span class="n">DASH</span>
|
||||||
</span><span id="__span-4-3"><a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="kn">from</span><span class="w"> </span><span class="nn">unshackle.core.titles</span><span class="w"> </span><span class="kn">import</span> <span class="n">Movie</span><span class="p">,</span> <span class="n">Movies</span>
|
</span><span id="__span-6-3"><a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a><span class="kn">from</span><span class="w"> </span><span class="nn">unshackle.core.titles</span><span class="w"> </span><span class="kn">import</span> <span class="n">Movie</span><span class="p">,</span> <span class="n">Movies</span>
|
||||||
</span><span id="__span-4-4"><a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a>
|
</span><span id="__span-6-4"><a id="__codelineno-6-4" name="__codelineno-6-4" href="#__codelineno-6-4"></a>
|
||||||
</span><span id="__span-4-5"><a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a>
|
</span><span id="__span-6-5"><a id="__codelineno-6-5" name="__codelineno-6-5" href="#__codelineno-6-5"></a>
|
||||||
</span><span id="__span-4-6"><a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a><span class="k">class</span><span class="w"> </span><span class="nc">EXMP</span><span class="p">(</span><span class="n">Service</span><span class="p">):</span>
|
</span><span id="__span-6-6"><a id="__codelineno-6-6" name="__codelineno-6-6" href="#__codelineno-6-6"></a><span class="k">class</span><span class="w"> </span><span class="nc">EXMP</span><span class="p">(</span><span class="n">Service</span><span class="p">):</span>
|
||||||
</span><span id="__span-4-7"><a id="__codelineno-4-7" name="__codelineno-4-7" href="#__codelineno-4-7"></a> <span class="n">ALIASES</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"example"</span><span class="p">,)</span>
|
</span><span id="__span-6-7"><a id="__codelineno-6-7" name="__codelineno-6-7" href="#__codelineno-6-7"></a> <span class="n">ALIASES</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"example"</span><span class="p">,)</span>
|
||||||
</span><span id="__span-4-8"><a id="__codelineno-4-8" name="__codelineno-4-8" href="#__codelineno-4-8"></a> <span class="n">GEOFENCE</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"us"</span><span class="p">,)</span>
|
</span><span id="__span-6-8"><a id="__codelineno-6-8" name="__codelineno-6-8" href="#__codelineno-6-8"></a> <span class="n">GEOFENCE</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"us"</span><span class="p">,)</span>
|
||||||
</span><span id="__span-4-9"><a id="__codelineno-4-9" name="__codelineno-4-9" href="#__codelineno-4-9"></a>
|
</span><span id="__span-6-9"><a id="__codelineno-6-9" name="__codelineno-6-9" href="#__codelineno-6-9"></a>
|
||||||
</span><span id="__span-4-10"><a id="__codelineno-4-10" name="__codelineno-4-10" href="#__codelineno-4-10"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_titles</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Movies</span><span class="p">:</span>
|
</span><span id="__span-6-10"><a id="__codelineno-6-10" name="__codelineno-6-10" href="#__codelineno-6-10"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_titles</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Movies</span><span class="p">:</span>
|
||||||
</span><span id="__span-4-11"><a id="__codelineno-4-11" name="__codelineno-4-11" href="#__codelineno-4-11"></a> <span class="n">data</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="sa">f</span><span class="s2">"https://api.example.com/title/</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()</span>
|
</span><span id="__span-6-11"><a id="__codelineno-6-11" name="__codelineno-6-11" href="#__codelineno-6-11"></a> <span class="n">data</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="sa">f</span><span class="s2">"https://api.example.com/title/</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">title</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()</span>
|
||||||
</span><span id="__span-4-12"><a id="__codelineno-4-12" name="__codelineno-4-12" href="#__codelineno-4-12"></a> <span class="k">return</span> <span class="n">Movies</span><span class="p">([</span>
|
</span><span id="__span-6-12"><a id="__codelineno-6-12" name="__codelineno-6-12" href="#__codelineno-6-12"></a> <span class="k">return</span> <span class="n">Movies</span><span class="p">([</span>
|
||||||
</span><span id="__span-4-13"><a id="__codelineno-4-13" name="__codelineno-4-13" href="#__codelineno-4-13"></a> <span class="n">Movie</span><span class="p">(</span>
|
</span><span id="__span-6-13"><a id="__codelineno-6-13" name="__codelineno-6-13" href="#__codelineno-6-13"></a> <span class="n">Movie</span><span class="p">(</span>
|
||||||
</span><span id="__span-4-14"><a id="__codelineno-4-14" name="__codelineno-4-14" href="#__codelineno-4-14"></a> <span class="n">id_</span><span class="o">=</span><span class="n">data</span><span class="p">[</span><span class="s2">"id"</span><span class="p">],</span>
|
</span><span id="__span-6-14"><a id="__codelineno-6-14" name="__codelineno-6-14" href="#__codelineno-6-14"></a> <span class="n">id_</span><span class="o">=</span><span class="n">data</span><span class="p">[</span><span class="s2">"id"</span><span class="p">],</span>
|
||||||
</span><span id="__span-4-15"><a id="__codelineno-4-15" name="__codelineno-4-15" href="#__codelineno-4-15"></a> <span class="n">service</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="p">,</span>
|
</span><span id="__span-6-15"><a id="__codelineno-6-15" name="__codelineno-6-15" href="#__codelineno-6-15"></a> <span class="n">service</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="p">,</span>
|
||||||
</span><span id="__span-4-16"><a id="__codelineno-4-16" name="__codelineno-4-16" href="#__codelineno-4-16"></a> <span class="n">name</span><span class="o">=</span><span class="n">data</span><span class="p">[</span><span class="s2">"name"</span><span class="p">],</span>
|
</span><span id="__span-6-16"><a id="__codelineno-6-16" name="__codelineno-6-16" href="#__codelineno-6-16"></a> <span class="n">name</span><span class="o">=</span><span class="n">data</span><span class="p">[</span><span class="s2">"name"</span><span class="p">],</span>
|
||||||
</span><span id="__span-4-17"><a id="__codelineno-4-17" name="__codelineno-4-17" href="#__codelineno-4-17"></a> <span class="n">year</span><span class="o">=</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"year"</span><span class="p">),</span>
|
</span><span id="__span-6-17"><a id="__codelineno-6-17" name="__codelineno-6-17" href="#__codelineno-6-17"></a> <span class="n">year</span><span class="o">=</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"year"</span><span class="p">),</span>
|
||||||
</span><span id="__span-4-18"><a id="__codelineno-4-18" name="__codelineno-4-18" href="#__codelineno-4-18"></a> <span class="n">language</span><span class="o">=</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"language"</span><span class="p">),</span>
|
</span><span id="__span-6-18"><a id="__codelineno-6-18" name="__codelineno-6-18" href="#__codelineno-6-18"></a> <span class="n">language</span><span class="o">=</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"language"</span><span class="p">),</span>
|
||||||
</span><span id="__span-4-19"><a id="__codelineno-4-19" name="__codelineno-4-19" href="#__codelineno-4-19"></a> <span class="p">)</span>
|
</span><span id="__span-6-19"><a id="__codelineno-6-19" name="__codelineno-6-19" href="#__codelineno-6-19"></a> <span class="p">)</span>
|
||||||
</span><span id="__span-4-20"><a id="__codelineno-4-20" name="__codelineno-4-20" href="#__codelineno-4-20"></a> <span class="p">])</span>
|
</span><span id="__span-6-20"><a id="__codelineno-6-20" name="__codelineno-6-20" href="#__codelineno-6-20"></a> <span class="p">])</span>
|
||||||
</span><span id="__span-4-21"><a id="__codelineno-4-21" name="__codelineno-4-21" href="#__codelineno-4-21"></a>
|
</span><span id="__span-6-21"><a id="__codelineno-6-21" name="__codelineno-6-21" href="#__codelineno-6-21"></a>
|
||||||
</span><span id="__span-4-22"><a id="__codelineno-4-22" name="__codelineno-4-22" href="#__codelineno-4-22"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_tracks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">title</span><span class="p">)</span> <span class="o">-></span> <span class="s2">"Tracks"</span><span class="p">:</span>
|
</span><span id="__span-6-22"><a id="__codelineno-6-22" name="__codelineno-6-22" href="#__codelineno-6-22"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_tracks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">title</span><span class="p">)</span> <span class="o">-></span> <span class="s2">"Tracks"</span><span class="p">:</span>
|
||||||
</span><span id="__span-4-23"><a id="__codelineno-4-23" name="__codelineno-4-23" href="#__codelineno-4-23"></a> <span class="n">mpd_url</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="o">...</span><span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()[</span><span class="s2">"manifest"</span><span class="p">]</span>
|
</span><span id="__span-6-23"><a id="__codelineno-6-23" name="__codelineno-6-23" href="#__codelineno-6-23"></a> <span class="n">mpd_url</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="o">...</span><span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()[</span><span class="s2">"manifest"</span><span class="p">]</span>
|
||||||
</span><span id="__span-4-24"><a id="__codelineno-4-24" name="__codelineno-4-24" href="#__codelineno-4-24"></a> <span class="n">mpd</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">mpd_url</span><span class="p">)</span><span class="o">.</span><span class="n">text</span>
|
</span><span id="__span-6-24"><a id="__codelineno-6-24" name="__codelineno-6-24" href="#__codelineno-6-24"></a> <span class="n">mpd</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">mpd_url</span><span class="p">)</span><span class="o">.</span><span class="n">text</span>
|
||||||
</span><span id="__span-4-25"><a id="__codelineno-4-25" name="__codelineno-4-25" href="#__codelineno-4-25"></a> <span class="k">return</span> <span class="n">DASH</span><span class="o">.</span><span class="n">from_text</span><span class="p">(</span><span class="n">mpd</span><span class="p">,</span> <span class="n">mpd_url</span><span class="p">)</span><span class="o">.</span><span class="n">to_tracks</span><span class="p">(</span><span class="n">language</span><span class="o">=</span><span class="n">title</span><span class="o">.</span><span class="n">language</span><span class="p">)</span>
|
</span><span id="__span-6-25"><a id="__codelineno-6-25" name="__codelineno-6-25" href="#__codelineno-6-25"></a> <span class="k">return</span> <span class="n">DASH</span><span class="o">.</span><span class="n">from_text</span><span class="p">(</span><span class="n">mpd</span><span class="p">,</span> <span class="n">mpd_url</span><span class="p">)</span><span class="o">.</span><span class="n">to_tracks</span><span class="p">(</span><span class="n">language</span><span class="o">=</span><span class="n">title</span><span class="o">.</span><span class="n">language</span><span class="p">)</span>
|
||||||
</span><span id="__span-4-26"><a id="__codelineno-4-26" name="__codelineno-4-26" href="#__codelineno-4-26"></a>
|
</span><span id="__span-6-26"><a id="__codelineno-6-26" name="__codelineno-6-26" href="#__codelineno-6-26"></a>
|
||||||
</span><span id="__span-4-27"><a id="__codelineno-4-27" name="__codelineno-4-27" href="#__codelineno-4-27"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_chapters</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">title</span><span class="p">):</span>
|
</span><span id="__span-6-27"><a id="__codelineno-6-27" name="__codelineno-6-27" href="#__codelineno-6-27"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_chapters</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">title</span><span class="p">):</span>
|
||||||
</span><span id="__span-4-28"><a id="__codelineno-4-28" name="__codelineno-4-28" href="#__codelineno-4-28"></a> <span class="k">return</span> <span class="p">[]</span>
|
</span><span id="__span-6-28"><a id="__codelineno-6-28" name="__codelineno-6-28" href="#__codelineno-6-28"></a> <span class="k">return</span> <span class="p">[]</span>
|
||||||
</span><span id="__span-4-29"><a id="__codelineno-4-29" name="__codelineno-4-29" href="#__codelineno-4-29"></a>
|
</span><span id="__span-6-29"><a id="__codelineno-6-29" name="__codelineno-6-29" href="#__codelineno-6-29"></a>
|
||||||
</span><span id="__span-4-30"><a id="__codelineno-4-30" name="__codelineno-4-30" href="#__codelineno-4-30"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">,</span> <span class="n">title</span><span class="p">,</span> <span class="n">track</span><span class="p">):</span>
|
</span><span id="__span-6-30"><a id="__codelineno-6-30" name="__codelineno-6-30" href="#__codelineno-6-30"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_widevine_license</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">challenge</span><span class="p">,</span> <span class="n">title</span><span class="p">,</span> <span class="n">track</span><span class="p">):</span>
|
||||||
</span><span id="__span-4-31"><a id="__codelineno-4-31" name="__codelineno-4-31" href="#__codelineno-4-31"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">post</span><span class="p">(</span><span class="s2">"https://lic.example.com/wv"</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">challenge</span><span class="p">)</span><span class="o">.</span><span class="n">content</span>
|
</span><span id="__span-6-31"><a id="__codelineno-6-31" name="__codelineno-6-31" href="#__codelineno-6-31"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">post</span><span class="p">(</span><span class="s2">"https://lic.example.com/wv"</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">challenge</span><span class="p">)</span><span class="o">.</span><span class="n">content</span>
|
||||||
</span></code></pre></div>
|
</span></code></pre></div>
|
||||||
<p>The directory name (<code>EXMP</code>) must match the class name exactly. That stem is the
|
<p>The directory name (<code>EXMP</code>) must match the class name exactly. That stem is the
|
||||||
service tag. Put your service in one of the <code>directories.services</code> paths.</p>
|
service tag. Put your service in one of the <code>directories.services</code> paths.</p>
|
||||||
|
|||||||
@@ -2724,7 +2724,18 @@ need a <code>.prd</code> device. You can hold both, and unshackle automatically
|
|||||||
appropriate one for each track.</p>
|
appropriate one for each track.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">HLS tracks with only a FairPlay key tag</p>
|
<p class="admonition-title">HLS tracks with only a FairPlay key tag</p>
|
||||||
<p>unshackle has no FairPlay CDM. When each <code>EXT-X-KEY</code> of an fMP4 playlist is sample encryption
|
<p>unshackle has no FairPlay CDM and never sends a FairPlay challenge.
|
||||||
|
For a FairPlay-only track it can send a PlayReady or Widevine challenge for the KIDs of the init
|
||||||
|
segments to the licence server of the platform, which works only when that server issues the same
|
||||||
|
content key to PlayReady or Widevine.
|
||||||
|
Only a service that defines this route does it. For another service, unshackle leaves the FairPlay-only
|
||||||
|
tracks out of the selection and takes the next best track that licenses, with one line:
|
||||||
|
<code>Left out 1 FairPlay-only track: EXAMPLE has no FairPlay bridge hook</code>. When only FairPlay-only tracks
|
||||||
|
match your quality or range options, unshackle skips the title, unless you use <code>--best-available</code>.
|
||||||
|
<code>--list</code> still shows every track.
|
||||||
|
A licence without the content key of a key ID, or with a content key that does not decrypt the
|
||||||
|
track, stops the download of that track with an error, and unshackle keeps no output file.</p>
|
||||||
|
<p>When each <code>EXT-X-KEY</code> of an fMP4 playlist is sample encryption
|
||||||
for a DRM system that unshackle cannot license, such as FairPlay, unshackle reads the key ID from
|
for a DRM system that unshackle cannot license, such as FairPlay, unshackle reads the key ID from
|
||||||
the init segment and asks for the licence with your PlayReady or Widevine device. unshackle reads one
|
the init segment and asks for the licence with your PlayReady or Widevine device. unshackle reads one
|
||||||
key ID from each init segment. So it licenses a playlist that changes its content key correctly only
|
key ID from each init segment. So it licenses a playlist that changes its content key correctly only
|
||||||
@@ -3155,8 +3166,8 @@ systems can list different sets of KIDs, and unshackle keeps the content keys of
|
|||||||
system does not license, so the title fails unless you use <code>--best-available</code>.</li>
|
system does not license, so the title fails unless you use <code>--best-available</code>.</li>
|
||||||
<li>An HLS playlist that changes its <code>EXT-X-KEY</code> entries part-way: only the first set
|
<li>An HLS playlist that changes its <code>EXT-X-KEY</code> entries part-way: only the first set
|
||||||
licenses with the second system.</li>
|
licenses with the second system.</li>
|
||||||
<li>An HLS playlist with only FairPlay key tags: the DRM system of the configured CDM
|
<li>An HLS playlist with only FairPlay key tags, for a service that defines the FairPlay
|
||||||
licenses it.</li>
|
route: the DRM system of the track's <code>drm_preference</code>, else of the configured CDM, licenses it.</li>
|
||||||
<li>A remote session that the server CDM licenses, and <code>unshackle import</code>. unshackle
|
<li>A remote session that the server CDM licenses, and <code>unshackle import</code>. unshackle
|
||||||
shows a warning and ignores the flag.</li>
|
shows a warning and ignores the flag.</li>
|
||||||
<li>A remote CDM that stores content keys can answer without a challenge to the service.</li>
|
<li>A remote CDM that stores content keys can answer without a challenge to the service.</li>
|
||||||
|
|||||||
@@ -2740,6 +2740,11 @@
|
|||||||
<p><strong>Inspect:</strong> while it decrypts a track whose content key came from a vault, unshackle keeps the ciphertext as a <code>.enc</code> sibling of the track file in the temp directory, and removes it afterwards; a leftover one is from a killed run and is safe to delete. Read the <code>bad_keys</code> table of your local SQLite vault to see which pairs are flagged and which vault each came from. See <a href="../vaults/#wrong-keys-from-a-poisoned-vault">Wrong keys from a poisoned vault</a>.</p>
|
<p><strong>Inspect:</strong> while it decrypts a track whose content key came from a vault, unshackle keeps the ciphertext as a <code>.enc</code> sibling of the track file in the temp directory, and removes it afterwards; a leftover one is from a killed run and is safe to delete. Read the <code>bad_keys</code> table of your local SQLite vault to see which pairs are flagged and which vault each came from. See <a href="../vaults/#wrong-keys-from-a-poisoned-vault">Wrong keys from a poisoned vault</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="admonition example">
|
<div class="admonition example">
|
||||||
|
<p class="admonition-title">A FairPlay-only track stops after its licence</p>
|
||||||
|
<p><strong>Symptom:</strong> the download of a FairPlay-only track stops with <code>No content key for KID <kid> of track <id></code>, <code>No Content Key for KID <kid> was returned by the server CDM</code>, or <code>The licence content key of KID <kid> does not decrypt track <id></code>, and unshackle keeps no output file.</p>
|
||||||
|
<p><strong>Inspect:</strong> the licence server gave no content key for a key ID of the init segments, or gave a PlayReady or Widevine content key that is not the FairPlay one. unshackle flags a content key that does not decode. The next licence of that key ID clears the flag, so each run licenses and checks the key again. Operate unshackle with <code>-d</code> and read the <code>Key check on</code> debug line for the result of each window. See <a href="../drm-and-cdm/">DRM & CDM</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class="admonition example">
|
||||||
<p class="admonition-title">A network request fails at the connection or TLS layer</p>
|
<p class="admonition-title">A network request fails at the connection or TLS layer</p>
|
||||||
<p><strong>Symptom:</strong> timeouts, connection resets, or handshake errors, and unshackle's own logs do not give the full cause.</p>
|
<p><strong>Symptom:</strong> timeouts, connection resets, or handshake errors, and unshackle's own logs do not give the full cause.</p>
|
||||||
<p><strong>Inspect:</strong> set <code>debug_requests: true</code> and operate unshackle with <code>-d</code> to show the underlying <code>urllib3</code> / <code>rnet</code> / <code>httpx</code> logs. In the JSON debug log, filter for <code>http_request</code> operations to see which request failed, with its status, attempt number and failure. If you use a proxy, also read <a href="../proxies-and-vpn/">Proxies & VPN</a>.</p>
|
<p><strong>Inspect:</strong> set <code>debug_requests: true</code> and operate unshackle with <code>-d</code> to show the underlying <code>urllib3</code> / <code>rnet</code> / <code>httpx</code> logs. In the JSON debug log, filter for <code>http_request</code> operations to see which request failed, with its status, attempt number and failure. If you use a proxy, also read <a href="../proxies-and-vpn/">Proxies & VPN</a>.</p>
|
||||||
|
|||||||
@@ -2404,7 +2404,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<p>unshackle pushes keys from every source, not only a local CDM. A run against a remote server that licenses with its own CDM (<code>--remote</code>) writes the keys the server returns, and <code>unshackle import</code> writes the keys it reads from an export file.</p>
|
<p>unshackle pushes keys from every source, not only a local CDM. A run against a remote server that licenses with its own CDM (<code>--remote</code>) writes the keys the server returns, and <code>unshackle import</code> writes the keys it reads from an export file.</p>
|
||||||
<h3 id="wrong-keys-from-a-poisoned-vault">Wrong keys from a poisoned vault<a class="headerlink" href="#wrong-keys-from-a-poisoned-vault" title="Permanent link">¶</a></h3>
|
<h3 id="wrong-keys-from-a-poisoned-vault">Wrong keys from a poisoned vault<a class="headerlink" href="#wrong-keys-from-a-poisoned-vault" title="Permanent link">¶</a></h3>
|
||||||
<p>A public vault can return the right KID with a wrong content key. The decrypters accept a wrong content key and write noise. unshackle therefore trusts a content key from a vault only after FFmpeg decodes the decrypted track with strict error detection. For a fragmented MP4, unshackle reads from the encrypted file which fragments each KID encrypts, and FFmpeg decodes up to three windows of each KID: from its first, middle and last fragment on through the next fragments of that KID, for up to 4 seconds. A window never runs into a fragment of another KID or a clear fragment. A clear lead or a lead under another KID therefore cannot hide a wrong content key, and only the KID that fails is flagged. When every KID in the map has a content key, the map is complete, and a KID that is not in it does not encrypt this file. This file does not judge that KID; the file of its own track judges it. A file with no encrypted sample entry and no encrypted fragment, for example a clear audio track, judges no KID, so it neither flags nor copies a content key. A KID that is not in an incomplete map, for example one with an all-zero KID, and every KID of any other file, gets one check of the whole file. FFmpeg decodes the first seconds and the last seconds. A failure there flags each of those KIDs. When a mapped KID fails, the KIDs that are not in the map get no verdict from that pass; the retry with the replaced key judges them. Content keys from a licence skip this check. A file this FFmpeg build cannot judge counts as a pass, never as a wrong content key: a codec it has no decoder for, or a header it cannot read. A pass is not proof. A wrong content key for HEVC video can decode without an error for some seconds, most often at a low resolution, and that content key passes the check. Without FFmpeg there is no check at all.</p>
|
<p>A public vault can return the right KID with a wrong content key. The decrypters accept a wrong content key and write noise. unshackle therefore trusts a content key from a vault only after FFmpeg decodes the decrypted track with strict error detection. For a fragmented MP4, unshackle reads from the encrypted file which fragments each KID encrypts, and FFmpeg decodes up to three windows of each KID: from its first, middle and last fragment on through the next fragments of that KID, for up to 4 seconds. A window never runs into a fragment of another KID or a clear fragment. A clear lead or a lead under another KID therefore cannot hide a wrong content key, and only the KID that fails is flagged. When every KID in the map has a content key, the map is complete, and a KID that is not in it does not encrypt this file. This file does not judge that KID; the file of its own track judges it. A file with no encrypted sample entry and no encrypted fragment, for example a clear audio track, judges no KID, so it neither flags nor copies a content key. A KID that is not in an incomplete map, for example one with an all-zero KID, and every KID of any other file, gets one check of the whole file. FFmpeg decodes the first seconds and the last seconds. A failure there flags each of those KIDs. When a mapped KID fails, the KIDs that are not in the map get no verdict from that pass; the retry with the replaced key judges them. Content keys from a licence skip this check, except those of a FairPlay-only track that the FairPlay bridge licensed. When one of these fails, unshackle flags the pair, stops the track and keeps no output file. A file this FFmpeg build cannot judge counts as a pass, never as a wrong content key: a codec it has no decoder for, or a header it cannot read. A pass is not proof. A wrong content key for HEVC video can decode without an error for some seconds, most often at a low resolution, and that content key passes the check. Without FFmpeg there is no check at all.</p>
|
||||||
<p>When the decode fails, unshackle:</p>
|
<p>When the decode fails, unshackle:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Flags the KID:KEY in the <code>bad_keys</code> table of every local SQLite vault, with the service and the name of the vault it came from. The pair also goes out of the service table, except in a vault marked <code>no_push</code>, where only the flag is written. A flagged pair cannot go back into a local vault from another vault, a later run, or <code>kv copy</code>. A licence that returns the pair clears the flag and stores it. An <code>API</code> vault that served the pair gets a report only when a different content key for that KID is accepted. When the CDM returns the same content key, that vault gets no report. <code>HTTP</code> and <code>MySQL</code> vaults have no report route. A pair from a local vault goes to no remote vault, even when a remote vault holds the same pair.</li>
|
<li>Flags the KID:KEY in the <code>bad_keys</code> table of every local SQLite vault, with the service and the name of the vault it came from. The pair also goes out of the service table, except in a vault marked <code>no_push</code>, where only the flag is written. A flagged pair cannot go back into a local vault from another vault, a later run, or <code>kv copy</code>. A licence that returns the pair clears the flag and stores it. An <code>API</code> vault that served the pair gets a report only when a different content key for that KID is accepted. When the CDM returns the same content key, that vault gets no report. <code>HTTP</code> and <code>MySQL</code> vaults have no report route. A pair from a local vault goes to no remote vault, even when a remote vault holds the same pair.</li>
|
||||||
|
|||||||
BIN
Binary file not shown.
+169
-108
@@ -2095,6 +2095,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#unshackle.core.service.Service.fairplay_bridge" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> fairplay_bridge
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -2651,6 +2662,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#unshackle.core.service.Service.fairplay_bridge" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code> fairplay_bridge
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -4873,6 +4895,45 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
|
|||||||
<div class="doc doc-object doc-function">
|
<div class="doc doc-object doc-function">
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="unshackle.core.service.Service.fairplay_bridge" class="doc doc-heading">
|
||||||
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">fairplay_bridge</span>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#unshackle.core.service.Service.fairplay_bridge" class="headerlink" title="Permanent link">¶</a></h3>
|
||||||
|
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">fairplay_bridge</span><span class="p">()</span>
|
||||||
|
</span></code></pre></div>
|
||||||
|
|
||||||
|
<div class="doc doc-contents ">
|
||||||
|
|
||||||
|
<p>The service's <code>get_fairplay_bridge_license</code>, or None: only a service with it gets FairPlay-only tracks bridged.</p>
|
||||||
|
<p>The hook gets a PlayReady or Widevine challenge for the key IDs of the init segments, with <code>challenge</code>,
|
||||||
|
<code>title</code>, <code>track</code>, <code>drm_system</code> and the extras of that system's licence callback.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<details class="mkdocstrings-source">
|
||||||
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226">226</a></span>
|
||||||
|
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227">227</a></span>
|
||||||
|
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228">228</a></span>
|
||||||
|
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229">229</a></span>
|
||||||
|
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230">230</a></span>
|
||||||
|
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231">231</a></span>
|
||||||
|
<span class="normal"><a href="#unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232">232</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-226"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-226"></a><span class="k">def</span><span class="w"> </span><span class="nf">fairplay_bridge</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">Any</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-227"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-227"></a><span class="w"> </span><span class="sd">"""The service's ``get_fairplay_bridge_license``, or None: only a service with it gets FairPlay-only tracks bridged.</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-228"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-228"></a>
|
||||||
|
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-229"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-229"></a><span class="sd"> The hook gets a PlayReady or Widevine challenge for the key IDs of the init segments, with ``challenge``,</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-230"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-230"></a><span class="sd"> ``title``, ``track``, ``drm_system`` and the extras of that system's licence callback.</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-231"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-231"></a><span class="sd"> """</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.fairplay_bridge--source--__span-0-232"><a id="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232" name="unshackle.core.service.Service.fairplay_bridge--source--__codelineno-0-232"></a> <span class="k">return</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s2">"get_fairplay_bridge_license"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
|
||||||
|
</span></code></pre></div></td></tr></table></div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc doc-object doc-function">
|
||||||
|
|
||||||
|
|
||||||
<h3 id="unshackle.core.service.Service.close" class="doc doc-heading">
|
<h3 id="unshackle.core.service.Service.close" class="doc doc-heading">
|
||||||
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">close</span>
|
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">close</span>
|
||||||
|
|
||||||
@@ -4888,9 +4949,9 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-242">242</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-250">250</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-243">243</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-242"><a id="unshackle.core.service.Service.close--source--__codelineno-0-242" name="unshackle.core.service.Service.close--source--__codelineno-0-242"></a><span class="k">def</span><span class="w"> </span><span class="nf">close</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.close--source--__codelineno-0-251">251</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.close--source--__span-0-250"><a id="unshackle.core.service.Service.close--source--__codelineno-0-250" name="unshackle.core.service.Service.close--source--__codelineno-0-250"></a><span class="k">def</span><span class="w"> </span><span class="nf">close</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.close--source--__span-0-243"><a id="unshackle.core.service.Service.close--source--__codelineno-0-243" name="unshackle.core.service.Service.close--source--__codelineno-0-243"></a><span class="w"> </span><span class="sd">"""Release what the source holds open once dl has finished every title."""</span>
|
</span><span id="unshackle.core.service.Service.close--source--__span-0-251"><a id="unshackle.core.service.Service.close--source--__codelineno-0-251" name="unshackle.core.service.Service.close--source--__codelineno-0-251"></a><span class="w"> </span><span class="sd">"""Release what the source holds open once dl has finished every title."""</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -4915,11 +4976,11 @@ and the license is a JWK Set, e.g. <code>{"keys": [{"kty": "oct", "k": "...", "k
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-247">247</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255">255</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-248">248</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256">256</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-249">249</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-247"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-247" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-247"></a><span class="k">def</span><span class="w"> </span><span class="nf">decrypts_samples</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257">257</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-255"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-255"></a><span class="k">def</span><span class="w"> </span><span class="nf">decrypts_samples</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-248"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-248" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-248"></a><span class="w"> </span><span class="sd">"""Whether this service decrypts the cbcs file of `track` after the download, through `get_sample_decrypter`."""</span>
|
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-256"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-256"></a><span class="w"> </span><span class="sd">"""Whether this service decrypts the cbcs file of `track` after the download, through `get_sample_decrypter`."""</span>
|
||||||
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-249"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-249" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-249"></a> <span class="k">return</span> <span class="kc">False</span>
|
</span><span id="unshackle.core.service.Service.decrypts_samples--source--__span-0-257"><a id="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257" name="unshackle.core.service.Service.decrypts_samples--source--__codelineno-0-257"></a> <span class="k">return</span> <span class="kc">False</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -4946,19 +5007,19 @@ runs it on the server, so a decrypter that needs a local process works for remot
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251">251</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259">259</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252">252</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260">260</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-253">253</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261">261</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-254">254</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262">262</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-255">255</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263">263</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-256">256</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264">264</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-257">257</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-251"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-251"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">entry</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265">265</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-259"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-259"></a><span class="k">def</span><span class="w"> </span><span class="nf">get_sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">entry</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-252"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-252"></a><span class="w"> </span><span class="sd">"""The content key, or a `cbcs.SampleDecrypter`, for `stsd` entry `entry` (1-based) of `track`.</span>
|
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-260"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-260"></a><span class="w"> </span><span class="sd">"""The content key, or a `cbcs.SampleDecrypter`, for `stsd` entry `entry` (1-based) of `track`.</span>
|
||||||
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-253"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-253" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-253"></a>
|
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-261"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-261"></a>
|
||||||
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-254"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-254" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-254"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names, before TRACK_DOWNLOADED. A remote session</span>
|
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-262"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-262"></a><span class="sd"> unshackle calls this only for a track `decrypts_samples` names, before TRACK_DOWNLOADED. A remote session</span>
|
||||||
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-255"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-255" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-255"></a><span class="sd"> runs it on the server, so a decrypter that needs a local process works for remote clients too.</span>
|
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-263"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-263"></a><span class="sd"> runs it on the server, so a decrypter that needs a local process works for remote clients too.</span>
|
||||||
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-256"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-256" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-256"></a><span class="sd"> """</span>
|
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-264"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-264"></a><span class="sd"> """</span>
|
||||||
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-257"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-257" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-257"></a> <span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2"> does not decrypt samples"</span><span class="p">)</span>
|
</span><span id="unshackle.core.service.Service.get_sample_decrypter--source--__span-0-265"><a id="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265" name="unshackle.core.service.Service.get_sample_decrypter--source--__codelineno-0-265"></a> <span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2"> does not decrypt samples"</span><span class="p">)</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -4983,11 +5044,11 @@ runs it on the server, so a decrypter that needs a local process works for remot
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-259">259</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267">267</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-260">260</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268">268</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-261">261</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-259"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-259" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-259"></a><span class="k">def</span><span class="w"> </span><span class="nf">sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="n">Callable</span><span class="p">[[</span><span class="nb">int</span><span class="p">],</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269">269</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-267"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-267"></a><span class="k">def</span><span class="w"> </span><span class="nf">sample_decrypter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="n">Callable</span><span class="p">[[</span><span class="nb">int</span><span class="p">],</span> <span class="nb">bytes</span> <span class="o">|</span> <span class="n">SampleDecrypter</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-260"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-260" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-260"></a><span class="w"> </span><span class="sd">"""`get_sample_decrypter` for `track`, when `decrypts_samples` names it."""</span>
|
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-268"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-268"></a><span class="w"> </span><span class="sd">"""`get_sample_decrypter` for `track`, when `decrypts_samples` names it."""</span>
|
||||||
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-261"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-261" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-261"></a> <span class="k">return</span> <span class="n">partial</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_sample_decrypter</span><span class="p">,</span> <span class="n">track</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">decrypts_samples</span><span class="p">(</span><span class="n">track</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span>
|
</span><span id="unshackle.core.service.Service.sample_decrypter--source--__span-0-269"><a id="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269" name="unshackle.core.service.Service.sample_decrypter--source--__codelineno-0-269"></a> <span class="k">return</span> <span class="n">partial</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_sample_decrypter</span><span class="p">,</span> <span class="n">track</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">decrypts_samples</span><span class="p">(</span><span class="n">track</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -5059,21 +5120,21 @@ runs it on the server, so a decrypter that needs a local process works for remot
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-265">265</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273">273</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-266">266</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274">274</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-267">267</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275">275</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-268">268</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276">276</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-269">269</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277">277</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-270">270</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278">278</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-271">271</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279">279</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-272">272</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-265"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-265" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-265"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_segment_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">Path</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280">280</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-273"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-273"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_segment_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">Path</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-266"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-266" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-266"></a><span class="w"> </span><span class="sd">"""</span>
|
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-274"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-274"></a><span class="w"> </span><span class="sd">"""</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-267"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-267" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-267"></a><span class="sd"> Called when one of a Track's Segments has finished downloading.</span>
|
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-275"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-275"></a><span class="sd"> Called when one of a Track's Segments has finished downloading.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-268"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-268" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-268"></a>
|
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-276"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-276"></a>
|
||||||
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-269"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-269" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-269"></a><span class="sd"> Parameters:</span>
|
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-277"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-277"></a><span class="sd"> Parameters:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-270"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-270" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-270"></a><span class="sd"> track: The Track object that had a Segment downloaded.</span>
|
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-278"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-278"></a><span class="sd"> track: The Track object that had a Segment downloaded.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-271"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-271" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-271"></a><span class="sd"> segment: The Path to the downloaded Segment.</span>
|
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-279"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-279"></a><span class="sd"> segment: The Path to the downloaded Segment.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-272"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-272" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-272"></a><span class="sd"> """</span>
|
</span><span id="unshackle.core.service.Service.on_segment_downloaded--source--__span-0-280"><a id="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280" name="unshackle.core.service.Service.on_segment_downloaded--source--__codelineno-0-280"></a><span class="sd"> """</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -5130,21 +5191,21 @@ In a licence-only run the track has no file.</p>
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-274">274</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282">282</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275">275</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283">283</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-276">276</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284">284</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-277">277</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285">285</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-278">278</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286">286</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-279">279</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287">287</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-280">280</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288">288</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-281">281</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-274"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-274" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-274"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289">289</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-282"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-282"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_downloaded</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-275"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-275"></a><span class="w"> </span><span class="sd">"""</span>
|
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-283"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-283"></a><span class="w"> </span><span class="sd">"""</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-276"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-276" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-276"></a><span class="sd"> Called once when a Track has finished downloading, after unshackle decrypted it.</span>
|
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-284"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-284"></a><span class="sd"> Called once when a Track has finished downloading, after unshackle decrypted it.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-277"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-277" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-277"></a><span class="sd"> In a licence-only run the track has no file.</span>
|
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-285"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-285"></a><span class="sd"> In a licence-only run the track has no file.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-278"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-278" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-278"></a>
|
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-286"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-286"></a>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-279"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-279" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-279"></a><span class="sd"> Parameters:</span>
|
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-287"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-287"></a><span class="sd"> Parameters:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-280"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-280" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-280"></a><span class="sd"> track: The downloaded Track object.</span>
|
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-288"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-288"></a><span class="sd"> track: The downloaded Track object.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-281"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-281" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-281"></a><span class="sd"> """</span>
|
</span><span id="unshackle.core.service.Service.on_track_downloaded--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_downloaded--source--__codelineno-0-289"></a><span class="sd"> """</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -5233,25 +5294,25 @@ for an HLS track that merged during the download (merge_segments).</p>
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-283">283</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291">291</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-284">284</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292">292</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-285">285</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293">293</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286">286</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294">294</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-287">287</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295">295</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-288">288</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296">296</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-289">289</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297">297</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-290">290</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298">298</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291">291</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299">299</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292">292</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-283"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-283" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-283"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_decrypted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm</span><span class="p">:</span> <span class="n">DRM_T</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">m3u8</span><span class="o">.</span><span class="n">Segment</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300">300</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-291"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_decrypted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">,</span> <span class="n">drm</span><span class="p">:</span> <span class="n">DRM_T</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span> <span class="n">segment</span><span class="p">:</span> <span class="n">m3u8</span><span class="o">.</span><span class="n">Segment</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-284"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-284" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-284"></a><span class="w"> </span><span class="sd">"""</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-292"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292"></a><span class="w"> </span><span class="sd">"""</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-285"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-285" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-285"></a><span class="sd"> Called when a Track has finished decrypting.</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-293"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-293"></a><span class="sd"> Called when a Track has finished decrypting.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-286"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-286"></a>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-294"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-294"></a>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-287"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-287" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-287"></a><span class="sd"> Parameters:</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-295"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-295"></a><span class="sd"> Parameters:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-288"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-288" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-288"></a><span class="sd"> track: The decrypted Track object.</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-296"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-296"></a><span class="sd"> track: The decrypted Track object.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-289"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-289" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-289"></a><span class="sd"> drm: The DRM object it decrypted with. None for a track `get_sample_decrypter` decrypted.</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-297"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-297"></a><span class="sd"> drm: The DRM object it decrypted with. None for a track `get_sample_decrypter` decrypted.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-290"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-290" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-290"></a><span class="sd"> segment: The decrypted HLS segment information. None for DASH and ISM tracks and</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-298"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-298"></a><span class="sd"> segment: The decrypted HLS segment information. None for DASH and ISM tracks and</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-291"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-291"></a><span class="sd"> for an HLS track that merged during the download (merge_segments).</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-299"></a><span class="sd"> for an HLS track that merged during the download (merge_segments).</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-292"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-292"></a><span class="sd"> """</span>
|
</span><span id="unshackle.core.service.Service.on_track_decrypted--source--__span-0-300"><a id="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_decrypted--source--__codelineno-0-300"></a><span class="sd"> """</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -5307,19 +5368,19 @@ for an HLS track that merged during the download (merge_segments).</p>
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294">294</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302">302</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-295">295</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303">303</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-296">296</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304">304</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-297">297</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305">305</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-298">298</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306">306</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-299">299</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307">307</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-300">300</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-294"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-294"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_repacked</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308">308</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-302"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-302"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_repacked</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-295"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-295" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-295"></a><span class="w"> </span><span class="sd">"""</span>
|
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-303"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-303"></a><span class="w"> </span><span class="sd">"""</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-296"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-296" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-296"></a><span class="sd"> Called when a Track has finished repacking.</span>
|
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-304"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-304"></a><span class="sd"> Called when a Track has finished repacking.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-297"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-297" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-297"></a>
|
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-305"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-305"></a>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-298"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-298" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-298"></a><span class="sd"> Parameters:</span>
|
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-306"></a><span class="sd"> Parameters:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-299"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-299" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-299"></a><span class="sd"> track: The repacked Track object.</span>
|
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-307"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-307"></a><span class="sd"> track: The repacked Track object.</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-300"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-300" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-300"></a><span class="sd"> """</span>
|
</span><span id="unshackle.core.service.Service.on_track_repacked--source--__span-0-308"><a id="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308" name="unshackle.core.service.Service.on_track_repacked--source--__codelineno-0-308"></a><span class="sd"> """</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
@@ -5378,27 +5439,27 @@ MP4 with FFmpeg/mp4box.</p>
|
|||||||
|
|
||||||
<details class="mkdocstrings-source">
|
<details class="mkdocstrings-source">
|
||||||
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
<summary>Source code in <code>unshackle/core/title_source.py</code></summary>
|
||||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302">302</a></span>
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310">310</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-303">303</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-304">304</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-305">305</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306">306</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-307">307</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-308">308</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-309">309</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310">310</a></span>
|
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311">311</a></span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311">311</a></span>
|
||||||
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312">312</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-302"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-302"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_multiplex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312">312</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-303"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-303" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-303"></a><span class="w"> </span><span class="sd">"""</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313">313</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-304"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-304" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-304"></a><span class="sd"> Called immediately before unshackle multiplexes a Track into a Container.</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314">314</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-305"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-305" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-305"></a>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315">315</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-306"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-306"></a><span class="sd"> Note: Right now unshackle multiplexes only MKV containers. In the future</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316">316</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-307"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-307" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-307"></a><span class="sd"> unshackle can also call this when it multiplexes to other containers like</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317">317</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-308"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-308" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-308"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318">318</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-309"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-309" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-309"></a>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319">319</a></span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310"></a><span class="sd"> Parameters:</span>
|
<span class="normal"><a href="#unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320">320</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-310"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-310"></a><span class="k">def</span><span class="w"> </span><span class="nf">on_track_multiplex</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">track</span><span class="p">:</span> <span class="n">AnyTrack</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-311"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311"></a><span class="sd"> track: The repacked Track object.</span>
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-311"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-311"></a><span class="w"> </span><span class="sd">"""</span>
|
||||||
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312"></a><span class="sd"> """</span>
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-312"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-312"></a><span class="sd"> Called immediately before unshackle multiplexes a Track into a Container.</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-313"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-313"></a>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-314"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-314"></a><span class="sd"> Note: Right now unshackle multiplexes only MKV containers. In the future</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-315"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-315"></a><span class="sd"> unshackle can also call this when it multiplexes to other containers like</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-316"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-316"></a><span class="sd"> MP4 with FFmpeg/mp4box.</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-317"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-317"></a>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-318"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-318"></a><span class="sd"> Parameters:</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-319"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-319"></a><span class="sd"> track: The repacked Track object.</span>
|
||||||
|
</span><span id="unshackle.core.service.Service.on_track_multiplex--source--__span-0-320"><a id="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320" name="unshackle.core.service.Service.on_track_multiplex--source--__codelineno-0-320"></a><span class="sd"> """</span>
|
||||||
</span></code></pre></div></td></tr></table></div>
|
</span></code></pre></div></td></tr></table></div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2776,6 +2776,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#unshackle.core.tracks.DownloadContext.fairplay_bridge" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code> fairplay_bridge
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -4508,6 +4519,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#unshackle.core.tracks.DownloadContext.fairplay_bridge" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code> fairplay_bridge
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
@@ -8214,7 +8236,8 @@ Use this to fix the positioning of sentence-ending characters.</p>
|
|||||||
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> <span class="n">cdm</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> <span class="n">cdm</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||||
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> <span class="n">on_segments</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> <span class="n">on_segments</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||||
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> <span class="n">sample_decrypter</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> <span class="n">sample_decrypter</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||||
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a><span class="p">)</span>
|
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a> <span class="n">fairplay_bridge</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
||||||
|
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15" href="#__codelineno-0-15"></a><span class="p">)</span>
|
||||||
</span></code></pre></div>
|
</span></code></pre></div>
|
||||||
|
|
||||||
<div class="doc doc-contents ">
|
<div class="doc doc-contents ">
|
||||||
@@ -8291,6 +8314,31 @@ Use this to fix the positioning of sentence-ending characters.</p>
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="doc doc-object doc-attribute">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="unshackle.core.tracks.DownloadContext.fairplay_bridge" class="doc doc-heading">
|
||||||
|
<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code> <span class="doc doc-object-name doc-attribute-name">fairplay_bridge</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class="doc doc-labels">
|
||||||
|
<small class="doc doc-label doc-label-class-attribute"><code>class-attribute</code></small>
|
||||||
|
<small class="doc doc-label doc-label-instance-attribute"><code>instance-attribute</code></small>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<a href="#unshackle.core.tracks.DownloadContext.fairplay_bridge" class="headerlink" title="Permanent link">¶</a></h3>
|
||||||
|
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">fairplay_bridge</span> <span class="o">=</span> <span class="kc">False</span>
|
||||||
|
</span></code></pre></div>
|
||||||
|
|
||||||
|
<div class="doc doc-contents ">
|
||||||
|
|
||||||
|
<p>The service has a FairPlay bridge hook, so the HLS step may license a FairPlay-only track as PlayReady or Widevine.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -8685,7 +8733,8 @@ remote client asks for its URL.</p>
|
|||||||
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> <span class="n">download_processes</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
</span><span id="__span-0-11"><a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> <span class="n">download_processes</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
||||||
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> <span class="n">on_segments</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
</span><span id="__span-0-12"><a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> <span class="n">on_segments</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||||
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> <span class="n">sample_decrypter</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
</span><span id="__span-0-13"><a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> <span class="n">sample_decrypter</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||||
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a><span class="p">)</span>
|
</span><span id="__span-0-14"><a id="__codelineno-0-14" name="__codelineno-0-14" href="#__codelineno-0-14"></a> <span class="n">fairplay_bridge</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
||||||
|
</span><span id="__span-0-15"><a id="__codelineno-0-15" name="__codelineno-0-15" href="#__codelineno-0-15"></a><span class="p">)</span>
|
||||||
</span></code></pre></div>
|
</span></code></pre></div>
|
||||||
|
|
||||||
<div class="doc doc-contents ">
|
<div class="doc doc-contents ">
|
||||||
@@ -8693,7 +8742,7 @@ remote client asks for its URL.</p>
|
|||||||
<p>Download and optionally Decrypt this Track, then emit TRACK_DOWNLOADED.</p>
|
<p>Download and optionally Decrypt this Track, then emit TRACK_DOWNLOADED.</p>
|
||||||
<p>For a URL-descriptor Video or Audio track with no <code>drm</code> set, unshackle probes the DRM from the
|
<p>For a URL-descriptor Video or Audio track with no <code>drm</code> set, unshackle probes the DRM from the
|
||||||
track's init data and stores it on the track, so a service need not declare <code>drm</code> itself.
|
track's init data and stores it on the track, so a service need not declare <code>drm</code> itself.
|
||||||
<code>sample_decrypter</code> decrypts a track the service decrypts itself (see DownloadContext).</p>
|
<code>sample_decrypter</code> and <code>fairplay_bridge</code> go on the DownloadContext.</p>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user