shaka-packager/docs/dd/d17/classshaka_1_1media_1_1Demu...

304 lines
18 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::Demuxer 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="../../dd/d17/classshaka_1_1media_1_1Demuxer.html">Demuxer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d1/dad/classshaka_1_1media_1_1Demuxer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::media::Demuxer Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="../../de/dc1/demuxer_8h_source.html">demuxer.h</a>&gt;</code></p>
<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:ae2fee69f99e5815de4f686b24393402e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#ae2fee69f99e5815de4f686b24393402e">Demuxer</a> (const std::string &amp;file_name)</td></tr>
<tr class="separator:ae2fee69f99e5815de4f686b24393402e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acad9afa8ef3b5682324a4ded402ab93a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#acad9afa8ef3b5682324a4ded402ab93a">SetKeySource</a> (scoped_ptr&lt; <a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html">KeySource</a> &gt; key_source)</td></tr>
<tr class="separator:acad9afa8ef3b5682324a4ded402ab93a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a436ed9fd2a3ddd78056ec7cf656fd9ad"><td class="memItemLeft" align="right" valign="top"><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="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#a436ed9fd2a3ddd78056ec7cf656fd9ad">Initialize</a> ()</td></tr>
<tr class="separator:a436ed9fd2a3ddd78056ec7cf656fd9ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e0b4a430603fdf4639c2153622ae1a2"><td class="memItemLeft" align="right" valign="top"><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="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#a9e0b4a430603fdf4639c2153622ae1a2">Run</a> ()</td></tr>
<tr class="separator:a9e0b4a430603fdf4639c2153622ae1a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f9b7c954ff48c3021467300d755ac29"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f9b7c954ff48c3021467300d755ac29"></a>
<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="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#a0f9b7c954ff48c3021467300d755ac29">Parse</a> ()</td></tr>
<tr class="memdesc:a0f9b7c954ff48c3021467300d755ac29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read from the source and send it to the parser. <br/></td></tr>
<tr class="separator:a0f9b7c954ff48c3021467300d755ac29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a117ba5528a92b0cf4752d15d3692e158"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#a117ba5528a92b0cf4752d15d3692e158">Cancel</a> ()</td></tr>
<tr class="separator:a117ba5528a92b0cf4752d15d3692e158"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af89c3d15b452d45bcacea9470ba43a7f"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; <a class="el" href="../../d8/d5c/classshaka_1_1media_1_1MediaStream.html">MediaStream</a> * &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#af89c3d15b452d45bcacea9470ba43a7f">streams</a> ()</td></tr>
<tr class="separator:af89c3d15b452d45bcacea9470ba43a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a385c93fd8d589b7d3bccd35e14c58290"><td class="memItemLeft" align="right" valign="top">MediaContainerName&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d17/classshaka_1_1media_1_1Demuxer.html#a385c93fd8d589b7d3bccd35e14c58290">container_name</a> ()</td></tr>
<tr class="separator:a385c93fd8d589b7d3bccd35e14c58290"><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="../../dd/d17/classshaka_1_1media_1_1Demuxer.html">Demuxer</a> is responsible for extracting elementary stream samples from a media file, e.g. an ISO BMFF file. </p>
<p>Definition at line <a class="el" href="../../de/dc1/demuxer_8h_source.html#l00032">32</a> of file <a class="el" href="../../de/dc1/demuxer_8h_source.html">demuxer.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae2fee69f99e5815de4f686b24393402e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">shaka::media::Demuxer::Demuxer </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>file_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">file_name</td><td>specifies the input source. It uses prefix matching to create a proper <a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html" title="Define an abstract file interface. ">File</a> object. The user can extend <a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html" title="Define an abstract file interface. ">File</a> to support a custom <a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html" title="Define an abstract file interface. ">File</a> object with its own prefix. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../d3/dbe/demuxer_8cc_source.html#l00037">37</a> of file <a class="el" href="../../d3/dbe/demuxer_8cc_source.html">demuxer.cc</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a117ba5528a92b0cf4752d15d3692e158"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void shaka::media::Demuxer::Cancel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Cancel a demuxing job in progress. Will cause <em>Run</em> to exit with an error status of type CANCELLED. </p>
<p>Definition at line <a class="el" href="../../d3/dbe/demuxer_8cc_source.html#l00232">232</a> of file <a class="el" href="../../d3/dbe/demuxer_8cc_source.html">demuxer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a385c93fd8d589b7d3bccd35e14c58290"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">MediaContainerName shaka::media::Demuxer::container_name </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Container name (type). Value is CONTAINER_UNKNOWN if the demuxer is not initialized. </dd></dl>
<p>Definition at line <a class="el" href="../../de/dc1/demuxer_8h_source.html#l00072">72</a> of file <a class="el" href="../../de/dc1/demuxer_8h_source.html">demuxer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a436ed9fd2a3ddd78056ec7cf656fd9ad"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::Demuxer::Initialize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the <a class="el" href="../../dd/d17/classshaka_1_1media_1_1Demuxer.html">Demuxer</a>. Calling other public methods of this class without this method returning OK, results in an undefined behavior. This method primes the demuxer by parsing portions of the media file to extract stream information. </p>
<dl class="section return"><dt>Returns</dt><dd>OK on success. </dd></dl>
<p>Definition at line <a class="el" href="../../d3/dbe/demuxer_8cc_source.html#l00056">56</a> of file <a class="el" href="../../d3/dbe/demuxer_8cc_source.html">demuxer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a9e0b4a430603fdf4639c2153622ae1a2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::Demuxer::Run </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Drive the remuxing from demuxer side (push). Read the file and push the Data to <a class="el" href="../../df/d46/classshaka_1_1media_1_1Muxer.html">Muxer</a> until Eof. </p>
<p>Definition at line <a class="el" href="../../d3/dbe/demuxer_8cc_source.html#l00173">173</a> of file <a class="el" href="../../d3/dbe/demuxer_8cc_source.html">demuxer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="acad9afa8ef3b5682324a4ded402ab93a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void shaka::media::Demuxer::SetKeySource </td>
<td>(</td>
<td class="paramtype">scoped_ptr&lt; <a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html">KeySource</a> &gt;&#160;</td>
<td class="paramname"><em>key_source</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the <a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html" title="KeySource is responsible for encryption key acquisition. ">KeySource</a> for media decryption. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key_source</td><td>points to the source of decryption keys. The key source must support fetching of keys for the type of media being demuxed. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../d3/dbe/demuxer_8cc_source.html#l00052">52</a> of file <a class="el" href="../../d3/dbe/demuxer_8cc_source.html">demuxer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="af89c3d15b452d45bcacea9470ba43a7f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::vector&lt;<a class="el" href="../../d8/d5c/classshaka_1_1media_1_1MediaStream.html">MediaStream</a>*&gt;&amp; shaka::media::Demuxer::streams </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Streams in the media container being demuxed. The caller cannot add or remove streams from the returned vector, but the caller is allowed to change the internal state of the streams in the vector through <a class="el" href="../../d8/d5c/classshaka_1_1media_1_1MediaStream.html">MediaStream</a> APIs. </dd></dl>
<p>Definition at line <a class="el" href="../../de/dc1/demuxer_8h_source.html#l00068">68</a> of file <a class="el" href="../../de/dc1/demuxer_8h_source.html">demuxer.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>media/base/<a class="el" href="../../de/dc1/demuxer_8h_source.html">demuxer.h</a></li>
<li>media/base/<a class="el" href="../../d3/dbe/demuxer_8cc_source.html">demuxer.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jun 8 2016 21:47:59 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>