shaka-packager/docs/d1/d1f/classshaka_1_1media_1_1KeyS...

416 lines
24 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.6"/>
<title>DASH Media Packaging SDK: shaka::media::KeySource Class 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/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</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 style="padding-left: 0.5em;">
<div id="projectname">DASH Media Packaging SDK
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
<li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
<li><a href="../../files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="../../search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="../../hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></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"><b>media</b></li><li class="navelem"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html">KeySource</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="../../d2/d5b/classshaka_1_1media_1_1KeySource-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::media::KeySource Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html" title="KeySource is responsible for encryption key acquisition. ">KeySource</a> is responsible for encryption key acquisition.
<a href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="../../dc/d3f/key__source_8h_source.html">key_source.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for shaka::media::KeySource:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d1/d1f/classshaka_1_1media_1_1KeySource.png" usemap="#shaka::media::KeySource_map" alt=""/>
<map id="shaka::media::KeySource_map" name="shaka::media::KeySource_map">
<area href="../../d0/dac/classshaka_1_1media_1_1FixedKeySource.html" title="A key source that uses fixed keys for encryption. " alt="shaka::media::FixedKeySource" shape="rect" coords="0,56,205,80"/>
<area href="../../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html" alt="shaka::media::WidevineKeySource" shape="rect" coords="215,56,420,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a2bb2755c69385800fa57172e262befdd"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>TrackType</b> { <br/>
&#160;&#160;<b>TRACK_TYPE_UNKNOWN</b> = 0,
<b>TRACK_TYPE_SD</b> = 1,
<b>TRACK_TYPE_HD</b> = 2,
<b>TRACK_TYPE_AUDIO</b> = 3,
<br/>
&#160;&#160;<b>TRACK_TYPE_UNSPECIFIED</b> = 4,
<b>NUM_VALID_TRACK_TYPES</b> = 4
<br/>
}</td></tr>
<tr class="separator:a2bb2755c69385800fa57172e262befdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aca6ecdac6ebc131d3626b765f64cb2de"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#aca6ecdac6ebc131d3626b765f64cb2de">FetchKeys</a> (const std::vector&lt; uint8_t &gt; &amp;pssh_box)=0</td></tr>
<tr class="separator:aca6ecdac6ebc131d3626b765f64cb2de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42df88c1cdb415e7844eea18222692bb"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#a42df88c1cdb415e7844eea18222692bb">FetchKeys</a> (const std::vector&lt; std::vector&lt; uint8_t &gt;&gt; &amp;key_ids)=0</td></tr>
<tr class="separator:a42df88c1cdb415e7844eea18222692bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1c8f986a88647813f0e43a9b80d057e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#ad1c8f986a88647813f0e43a9b80d057e">FetchKeys</a> (uint32_t asset_id)=0</td></tr>
<tr class="separator:ad1c8f986a88647813f0e43a9b80d057e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a994eb66cf09d8b08fd1c964f6afd3ab3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#a994eb66cf09d8b08fd1c964f6afd3ab3">GetKey</a> (TrackType track_type, <a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> *key)=0</td></tr>
<tr class="separator:a994eb66cf09d8b08fd1c964f6afd3ab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae33f2cdbd045572095acd7b8d6c1a789"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#ae33f2cdbd045572095acd7b8d6c1a789">GetKey</a> (const std::vector&lt; uint8_t &gt; &amp;key_id, <a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> *key)=0</td></tr>
<tr class="separator:ae33f2cdbd045572095acd7b8d6c1a789"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18806b962c858e35ed07753687605b16"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#a18806b962c858e35ed07753687605b16">GetCryptoPeriodKey</a> (uint32_t crypto_period_index, TrackType track_type, <a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> *key)=0</td></tr>
<tr class="separator:a18806b962c858e35ed07753687605b16"><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-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a0963412e7ee33d0e34893ebdf38d96c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0963412e7ee33d0e34893ebdf38d96c1"></a>
static TrackType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#a0963412e7ee33d0e34893ebdf38d96c1">GetTrackTypeFromString</a> (const std::string &amp;track_type_string)</td></tr>
<tr class="memdesc:a0963412e7ee33d0e34893ebdf38d96c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert string representation of track type to enum representation. <br/></td></tr>
<tr class="separator:a0963412e7ee33d0e34893ebdf38d96c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f9cede7a8c1678e1fac93c8fe12aa75"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f9cede7a8c1678e1fac93c8fe12aa75"></a>
static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html#a4f9cede7a8c1678e1fac93c8fe12aa75">TrackTypeToString</a> (TrackType track_type)</td></tr>
<tr class="memdesc:a4f9cede7a8c1678e1fac93c8fe12aa75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert TrackType to string. <br/></td></tr>
<tr class="separator:a4f9cede7a8c1678e1fac93c8fe12aa75"><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><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html" title="KeySource is responsible for encryption key acquisition. ">KeySource</a> is responsible for encryption key acquisition. </p>
<p>Definition at line <a class="el" href="../../dc/d3f/key__source_8h_source.html#l00030">30</a> of file <a class="el" href="../../dc/d3f/key__source_8h_source.html">key_source.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aca6ecdac6ebc131d3626b765f64cb2de"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::KeySource::FetchKeys </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;&#160;</td>
<td class="paramname"><em>pssh_box</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Fetch keys for CENC from the key server. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pssh_box</td><td>The entire PSSH box for the content to be decrypted </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success, an error status otherwise. </dd></dl>
<p>Implemented in <a class="el" href="../../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#ae6490d21a6538b9c909fdf996398e576">shaka::media::WidevineKeySource</a>, and <a class="el" href="../../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#a358b0955ecec61e6ce23611e2772265b">shaka::media::FixedKeySource</a>.</p>
</div>
</div>
<a class="anchor" id="a42df88c1cdb415e7844eea18222692bb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::KeySource::FetchKeys </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::vector&lt; uint8_t &gt;&gt; &amp;&#160;</td>
<td class="paramname"><em>key_ids</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Fetch keys for CENC from the key server. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key_ids</td><td>the key IDs for the keys to fetch from the server. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success, an error status otherwise. </dd></dl>
<p>Implemented in <a class="el" href="../../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#ae202f5af8c11fe3abe9f7b882ac57513">shaka::media::WidevineKeySource</a>, and <a class="el" href="../../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#aab2d8d84067ae5e778e3c242fec6dcb1">shaka::media::FixedKeySource</a>.</p>
</div>
</div>
<a class="anchor" id="ad1c8f986a88647813f0e43a9b80d057e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::KeySource::FetchKeys </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>asset_id</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Fetch keys for WVM decryption from the key server. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">asset_id</td><td>is the Widevine Classic asset ID for the content to be decrypted. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success, an error status otherwise. </dd></dl>
<p>Implemented in <a class="el" href="../../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#ac0be37455c1ec0a7d177e6b78dd5a58e">shaka::media::WidevineKeySource</a>, and <a class="el" href="../../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#a4dd894ee7e68340771d34bb81dce0ae5">shaka::media::FixedKeySource</a>.</p>
</div>
</div>
<a class="anchor" id="a18806b962c858e35ed07753687605b16"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::KeySource::GetCryptoPeriodKey </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>crypto_period_index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TrackType&#160;</td>
<td class="paramname"><em>track_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> *&#160;</td>
<td class="paramname"><em>key</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get encryption key of the specified track type at the specified index. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">crypto_period_index</td><td>is the sequence number of the key rotation period for which the key is being retrieved. </td></tr>
<tr><td class="paramname">track_type</td><td>is the type of track for which retrieving the key. </td></tr>
<tr><td class="paramname">key</td><td>is a pointer to the <a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> which will hold the retrieved key. Owner retains ownership, and may not be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success, an error status otherwise. </dd></dl>
<p>Implemented in <a class="el" href="../../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#ab56a71e9f9f9e545f96e667279c05bb1">shaka::media::WidevineKeySource</a>, and <a class="el" href="../../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#afa9abf3a9104cbcb4711eac65c8a5bdf">shaka::media::FixedKeySource</a>.</p>
</div>
</div>
<a class="anchor" id="a994eb66cf09d8b08fd1c964f6afd3ab3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::KeySource::GetKey </td>
<td>(</td>
<td class="paramtype">TrackType&#160;</td>
<td class="paramname"><em>track_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> *&#160;</td>
<td class="paramname"><em>key</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get encryption key of the specified track type. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">track_type</td><td>is the type of track for which retrieving the key. </td></tr>
<tr><td class="paramname">key</td><td>is a pointer to the <a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> which will hold the retrieved key. Owner retains ownership, and may not be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success, an error status otherwise. </dd></dl>
<p>Implemented in <a class="el" href="../../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#a59a16d61c6a6d05745e8b49fd3618deb">shaka::media::WidevineKeySource</a>, and <a class="el" href="../../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#a267d1f36d1c015fd5e8c20b93f270d0a">shaka::media::FixedKeySource</a>.</p>
</div>
</div>
<a class="anchor" id="ae33f2cdbd045572095acd7b8d6c1a789"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::KeySource::GetKey </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;&#160;</td>
<td class="paramname"><em>key_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> *&#160;</td>
<td class="paramname"><em>key</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the encryption key specified by the CENC key ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key_id</td><td>is the unique identifier for the key being retreived. </td></tr>
<tr><td class="paramname">key</td><td>is a pointer to the <a class="el" href="../../dd/dbd/structshaka_1_1media_1_1EncryptionKey.html">EncryptionKey</a> which will hold the retrieved key. Owner retains ownership, and may not be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success, or an error status otherwise. </dd></dl>
<p>Implemented in <a class="el" href="../../da/ddd/classshaka_1_1media_1_1WidevineKeySource.html#a59699cd998290adae74e6596ba44fdc3">shaka::media::WidevineKeySource</a>, and <a class="el" href="../../d0/dac/classshaka_1_1media_1_1FixedKeySource.html#a58f9eae1ce9148a82f70118879b6c3f1">shaka::media::FixedKeySource</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>media/base/<a class="el" href="../../dc/d3f/key__source_8h_source.html">key_source.h</a></li>
<li>media/base/<a class="el" href="../../d7/dd6/key__source_8cc_source.html">key_source.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Sep 29 2016 23:03:22 for DASH Media Packaging SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>