shaka-packager/docs/dc/da0/structshaka_1_1EncryptionPa...

259 lines
19 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Shaka Packager SDK: shaka::EncryptionParams Struct Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Shaka Packager SDK
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="../../d8/daf/namespaceshaka.html">shaka</a></li><li class="navelem"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html">EncryptionParams</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="../../dc/d35/structshaka_1_1EncryptionParams-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::EncryptionParams Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Encryption parameters.
<a href="../../dc/da0/structshaka_1_1EncryptionParams.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/structshaka_1_1EncryptionParams_1_1EncryptedStreamAttributes.html">EncryptedStreamAttributes</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypted stream information that is used to determine stream label. <a href="../../d7/d6d/structshaka_1_1EncryptionParams_1_1EncryptedStreamAttributes.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:adcf61ebf8d129a5bcf3f159b9b076eed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/daf/namespaceshaka.html#a539b99ce5c34193e294bc544437e9185">KeyProvider</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#adcf61ebf8d129a5bcf3f159b9b076eed">key_provider</a> = KeyProvider::kNone</td></tr>
<tr class="separator:adcf61ebf8d129a5bcf3f159b9b076eed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68e24d0afdf13c521f6b78f27cb058e8"><td class="memItemLeft" align="right" valign="top"><a id="a68e24d0afdf13c521f6b78f27cb058e8"></a>
<a class="el" href="../../d9/dd2/structshaka_1_1WidevineEncryptionParams.html">WidevineEncryptionParams</a>&#160;</td><td class="memItemRight" valign="bottom"><b>widevine</b></td></tr>
<tr class="separator:a68e24d0afdf13c521f6b78f27cb058e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39ab8e0a018ee4a970c97611c07fc2e7"><td class="memItemLeft" align="right" valign="top"><a id="a39ab8e0a018ee4a970c97611c07fc2e7"></a>
<a class="el" href="../../df/d47/structshaka_1_1PlayReadyEncryptionParams.html">PlayReadyEncryptionParams</a>&#160;</td><td class="memItemRight" valign="bottom"><b>playready</b></td></tr>
<tr class="separator:a39ab8e0a018ee4a970c97611c07fc2e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00ae0352c77cead21b961f348e8fcf3d"><td class="memItemLeft" align="right" valign="top"><a id="a00ae0352c77cead21b961f348e8fcf3d"></a>
<a class="el" href="../../d0/db4/structshaka_1_1RawKeyParams.html">RawKeyParams</a>&#160;</td><td class="memItemRight" valign="bottom"><b>raw_key</b></td></tr>
<tr class="separator:a00ae0352c77cead21b961f348e8fcf3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e1877b4a4cbd071b6bd68c54341f8bc"><td class="memItemLeft" align="right" valign="top"><a id="a8e1877b4a4cbd071b6bd68c54341f8bc"></a>
<a class="el" href="../../d8/daf/namespaceshaka.html#aadc0cc211185374c4bf219da325673ac">ProtectionSystem</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a8e1877b4a4cbd071b6bd68c54341f8bc">protection_systems</a></td></tr>
<tr class="memdesc:a8e1877b4a4cbd071b6bd68c54341f8bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">The protection systems to generate, multiple can be OR'd together. <br /></td></tr>
<tr class="separator:a8e1877b4a4cbd071b6bd68c54341f8bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a750b46e3c52157c6a05ff074d4355833"><td class="memItemLeft" align="right" valign="top"><a id="a750b46e3c52157c6a05ff074d4355833"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a750b46e3c52157c6a05ff074d4355833">playready_extra_header_data</a></td></tr>
<tr class="memdesc:a750b46e3c52157c6a05ff074d4355833"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extra XML data to add to PlayReady data. <br /></td></tr>
<tr class="separator:a750b46e3c52157c6a05ff074d4355833"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ad46963dc926aa4b72813dccb3f6a45"><td class="memItemLeft" align="right" valign="top"><a id="a1ad46963dc926aa4b72813dccb3f6a45"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a1ad46963dc926aa4b72813dccb3f6a45">clear_lead_in_seconds</a> = 0</td></tr>
<tr class="memdesc:a1ad46963dc926aa4b72813dccb3f6a45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear lead duration in seconds. <br /></td></tr>
<tr class="separator:a1ad46963dc926aa4b72813dccb3f6a45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b86a3f13f144a0722432b8ee356c598"><td class="memItemLeft" align="right" valign="top"><a id="a9b86a3f13f144a0722432b8ee356c598"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>protection_scheme</b> = <a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a1d7a8c6b5e46b51ccadcaef3f9cf9cb0">kProtectionSchemeCenc</a></td></tr>
<tr class="separator:a9b86a3f13f144a0722432b8ee356c598"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87b1deb1705f07c01efa69f14260e0af"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a87b1deb1705f07c01efa69f14260e0af">crypt_byte_block</a> = 1</td></tr>
<tr class="separator:a87b1deb1705f07c01efa69f14260e0af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa236ca5a091603c2bc6d28b1f84d816"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#afa236ca5a091603c2bc6d28b1f84d816">skip_byte_block</a> = 9</td></tr>
<tr class="separator:afa236ca5a091603c2bc6d28b1f84d816"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89c4299db866d03398d8518d693cdd10"><td class="memItemLeft" align="right" valign="top"><a id="a89c4299db866d03398d8518d693cdd10"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>crypto_period_duration_in_seconds</b> = <a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a92ad4ca8e1ccb7d6b5fa2ee0b1b196fa">kNoKeyRotation</a></td></tr>
<tr class="separator:a89c4299db866d03398d8518d693cdd10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48d415f17d51306ce7e1931fd954c37c"><td class="memItemLeft" align="right" valign="top"><a id="a48d415f17d51306ce7e1931fd954c37c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a48d415f17d51306ce7e1931fd954c37c">vp9_subsample_encryption</a> = true</td></tr>
<tr class="memdesc:a48d415f17d51306ce7e1931fd954c37c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/disable subsample encryption for VP9. <br /></td></tr>
<tr class="separator:a48d415f17d51306ce7e1931fd954c37c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7686a6aca6a7c3d077a5d7215c39fc51"><td class="memItemLeft" align="right" valign="top">std::function&lt; std::string(const <a class="el" href="../../d7/d6d/structshaka_1_1EncryptionParams_1_1EncryptedStreamAttributes.html">EncryptedStreamAttributes</a> &amp;stream_attributes)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a7686a6aca6a7c3d077a5d7215c39fc51">stream_label_func</a></td></tr>
<tr class="separator:a7686a6aca6a7c3d077a5d7215c39fc51"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a1d7a8c6b5e46b51ccadcaef3f9cf9cb0"><td class="memItemLeft" align="right" valign="top"><a id="a1d7a8c6b5e46b51ccadcaef3f9cf9cb0"></a>
static constexpr uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a1d7a8c6b5e46b51ccadcaef3f9cf9cb0">kProtectionSchemeCenc</a> = 0x63656E63</td></tr>
<tr class="memdesc:a1d7a8c6b5e46b51ccadcaef3f9cf9cb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The protection scheme: "cenc", "cens", "cbc1", "cbcs". <br /></td></tr>
<tr class="separator:a1d7a8c6b5e46b51ccadcaef3f9cf9cb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affb9b3776a59d5b7aea6f31d79ab6ac1"><td class="memItemLeft" align="right" valign="top"><a id="affb9b3776a59d5b7aea6f31d79ab6ac1"></a>
static constexpr uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>kProtectionSchemeCbc1</b> = 0x63626331</td></tr>
<tr class="separator:affb9b3776a59d5b7aea6f31d79ab6ac1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a975dc1521529a5598b5f222898b53cc0"><td class="memItemLeft" align="right" valign="top"><a id="a975dc1521529a5598b5f222898b53cc0"></a>
static constexpr uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>kProtectionSchemeCens</b> = 0x63656E73</td></tr>
<tr class="separator:a975dc1521529a5598b5f222898b53cc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8aa01ef2b8e7b60a116c4a73b75acc1"><td class="memItemLeft" align="right" valign="top"><a id="ad8aa01ef2b8e7b60a116c4a73b75acc1"></a>
static constexpr uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>kProtectionSchemeCbcs</b> = 0x63626373</td></tr>
<tr class="separator:ad8aa01ef2b8e7b60a116c4a73b75acc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92ad4ca8e1ccb7d6b5fa2ee0b1b196fa"><td class="memItemLeft" align="right" valign="top">static constexpr double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/da0/structshaka_1_1EncryptionParams.html#a92ad4ca8e1ccb7d6b5fa2ee0b1b196fa">kNoKeyRotation</a> = 0</td></tr>
<tr class="separator:a92ad4ca8e1ccb7d6b5fa2ee0b1b196fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Encryption parameters. </p>
<p class="definition">Definition at line <a class="el" href="../../dd/d58/crypto__params_8h_source.html#l00146">146</a> of file <a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a>.</p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a87b1deb1705f07c01efa69f14260e0af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87b1deb1705f07c01efa69f14260e0af">&#9670;&nbsp;</a></span>crypt_byte_block</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t shaka::EncryptionParams::crypt_byte_block = 1</td>
</tr>
</table>
</div><div class="memdoc">
<p>The count of the encrypted blocks in the protection pattern, where each block is of size 16-bytes. There are three common patterns (crypt_byte_block:skip_byte_block): 1:9 (default), 5:5, 10:0. Applies to video streams with "cbcs" and "cens" protection schemes only; Ignored otherwise. </p>
<p class="definition">Definition at line <a class="el" href="../../dd/d58/crypto__params_8h_source.html#l00174">174</a> of file <a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a>.</p>
</div>
</div>
<a id="adcf61ebf8d129a5bcf3f159b9b076eed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcf61ebf8d129a5bcf3f159b9b076eed">&#9670;&nbsp;</a></span>key_provider</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d8/daf/namespaceshaka.html#a539b99ce5c34193e294bc544437e9185">KeyProvider</a> shaka::EncryptionParams::key_provider = KeyProvider::kNone</td>
</tr>
</table>
</div><div class="memdoc">
<p>Specifies the key provider, which determines which key provider is used and which encryption params is valid. 'kNone' means not to encrypt the streams. </p>
<p class="definition">Definition at line <a class="el" href="../../dd/d58/crypto__params_8h_source.html#l00150">150</a> of file <a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a>.</p>
</div>
</div>
<a id="a92ad4ca8e1ccb7d6b5fa2ee0b1b196fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92ad4ca8e1ccb7d6b5fa2ee0b1b196fa">&#9670;&nbsp;</a></span>kNoKeyRotation</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr double shaka::EncryptionParams::kNoKeyRotation = 0</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Crypto period duration in seconds. A positive value means key rotation is enabled, the key provider must support key rotation in this case. </p>
<p class="definition">Definition at line <a class="el" href="../../dd/d58/crypto__params_8h_source.html#l00181">181</a> of file <a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a>.</p>
</div>
</div>
<a id="afa236ca5a091603c2bc6d28b1f84d816"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa236ca5a091603c2bc6d28b1f84d816">&#9670;&nbsp;</a></span>skip_byte_block</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t shaka::EncryptionParams::skip_byte_block = 9</td>
</tr>
</table>
</div><div class="memdoc">
<p>The count of the unencrypted blocks in the protection pattern. Applies to video streams with "cbcs" and "cens" protection schemes only; Ignored otherwise. </p>
<p class="definition">Definition at line <a class="el" href="../../dd/d58/crypto__params_8h_source.html#l00178">178</a> of file <a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a>.</p>
</div>
</div>
<a id="a7686a6aca6a7c3d077a5d7215c39fc51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7686a6aca6a7c3d077a5d7215c39fc51">&#9670;&nbsp;</a></span>stream_label_func</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::function&lt;std::string(const <a class="el" href="../../d7/d6d/structshaka_1_1EncryptionParams_1_1EncryptedStreamAttributes.html">EncryptedStreamAttributes</a>&amp; stream_attributes)&gt; shaka::EncryptionParams::stream_label_func</td>
</tr>
</table>
</div><div class="memdoc">
<p>Stream label function assigns a stream label to the stream to be encrypted. Stream label is used to associate KeyPair with streams. Streams with the same stream label always uses the same keyPair; Streams with different stream label could use the same or different KeyPairs. A default stream label function will be generated if not set. </p>
<p class="definition">Definition at line <a class="el" href="../../dd/d58/crypto__params_8h_source.html#l00216">216</a> of file <a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>packager/media/public/<a class="el" href="../../dd/d58/crypto__params_8h_source.html">crypto_params.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 22 2021 00:16:05 for Shaka Packager SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>