shaka-packager/docs/d3/dfa/classedash__packager_1_1Mpd...

394 lines
21 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: edash_packager::MpdBuilder 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>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="../../db/d09/namespaceedash__packager.html">edash_packager</a></li><li class="navelem"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html">MpdBuilder</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="#friends">Friends</a> &#124;
<a href="../../d7/d82/classedash__packager_1_1MpdBuilder-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">edash_packager::MpdBuilder Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This class generates DASH MPDs (Media Presentation Descriptions).
<a href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="../../d6/da3/mpd__builder_8h_source.html">mpd_builder.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for edash_packager::MpdBuilder:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d3/dfa/classedash__packager_1_1MpdBuilder.png" usemap="#edash_packager::MpdBuilder_map" alt=""/>
<map id="edash_packager::MpdBuilder_map" name="edash_packager::MpdBuilder_map">
<area href="../../db/d2e/classedash__packager_1_1MockMpdBuilder.html" alt="edash_packager::MockMpdBuilder" shape="rect" coords="0,56,208,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:a252065d59aa8c3618dc6378b506e8443"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>MpdType</b> { <b>kStatic</b> = 0,
<b>kDynamic</b>
}</td></tr>
<tr class="separator:a252065d59aa8c3618dc6378b506e8443"><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:a7c826239ca4611979691fa04a563c49f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#a7c826239ca4611979691fa04a563c49f">MpdBuilder</a> (MpdType <a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#ab23432768423d4489380f45c292c7648">type</a>, const <a class="el" href="../../d1/d5d/structedash__packager_1_1MpdOptions.html">MpdOptions</a> &amp;mpd_options)</td></tr>
<tr class="separator:a7c826239ca4611979691fa04a563c49f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5318f500aa6a5b3db7b7925c08d78d91"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#a5318f500aa6a5b3db7b7925c08d78d91">AddBaseUrl</a> (const std::string &amp;base_url)</td></tr>
<tr class="separator:a5318f500aa6a5b3db7b7925c08d78d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a301a9b49e15371117e2c050c4e5b038c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../db/de4/classedash__packager_1_1AdaptationSet.html">AdaptationSet</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#a301a9b49e15371117e2c050c4e5b038c">AddAdaptationSet</a> (const std::string &amp;lang)</td></tr>
<tr class="separator:a301a9b49e15371117e2c050c4e5b038c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9efa414ddfaf48561f3085daada49ebc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#a9efa414ddfaf48561f3085daada49ebc">WriteMpdToFile</a> (<a class="el" href="../../de/d19/classedash__packager_1_1media_1_1File.html">media::File</a> *output_file)</td></tr>
<tr class="separator:a9efa414ddfaf48561f3085daada49ebc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c0fd80514f6f1d90f70bb9e96e744a1"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#a1c0fd80514f6f1d90f70bb9e96e744a1">ToString</a> (std::string *output)</td></tr>
<tr class="separator:a1c0fd80514f6f1d90f70bb9e96e744a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab23432768423d4489380f45c292c7648"><td class="memItemLeft" align="right" valign="top">MpdType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#ab23432768423d4489380f45c292c7648">type</a> () const </td></tr>
<tr class="separator:ab23432768423d4489380f45c292c7648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e789afd6427510a43ce4c45a4ba5143"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e789afd6427510a43ce4c45a4ba5143"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#a6e789afd6427510a43ce4c45a4ba5143">InjectClockForTesting</a> (scoped_ptr&lt; base::Clock &gt; clock)</td></tr>
<tr class="memdesc:a6e789afd6427510a43ce4c45a4ba5143"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is for testing. <br/></td></tr>
<tr class="separator:a6e789afd6427510a43ce4c45a4ba5143"><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:a341e1050c0ae351db7cf0e4d23421a7f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html#a341e1050c0ae351db7cf0e4d23421a7f">MakePathsRelativeToMpd</a> (const std::string &amp;mpd_path, MediaInfo *media_info)</td></tr>
<tr class="separator:a341e1050c0ae351db7cf0e4d23421a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ab733e1a15ebcfbbce3efed7ca0bd8570"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab733e1a15ebcfbbce3efed7ca0bd8570"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>DynamicMpdBuilderTest</b></td></tr>
<tr class="separator:ab733e1a15ebcfbbce3efed7ca0bd8570"><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>This class generates DASH MPDs (Media Presentation Descriptions). </p>
<p>Definition at line <a class="el" href="../../d6/da3/mpd__builder_8h_source.html#l00058">58</a> of file <a class="el" href="../../d6/da3/mpd__builder_8h_source.html">mpd_builder.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7c826239ca4611979691fa04a563c49f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">edash_packager::MpdBuilder::MpdBuilder </td>
<td>(</td>
<td class="paramtype">MpdType&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="../../d1/d5d/structedash__packager_1_1MpdOptions.html">MpdOptions</a> &amp;&#160;</td>
<td class="paramname"><em>mpd_options</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs <a class="el" href="../../d3/dfa/classedash__packager_1_1MpdBuilder.html" title="This class generates DASH MPDs (Media Presentation Descriptions). ">MpdBuilder</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>indicates whether the MPD should be for VOD or live content (kStatic for VOD profile, or kDynamic for live profile). </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html#l00401">401</a> of file <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html">mpd_builder.cc</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a301a9b49e15371117e2c050c4e5b038c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../db/de4/classedash__packager_1_1AdaptationSet.html">AdaptationSet</a> * edash_packager::MpdBuilder::AddAdaptationSet </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>lang</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds &lt;AdaptationSet&gt; to the MPD. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">lang</td><td>is the language of the <a class="el" href="../../db/de4/classedash__packager_1_1AdaptationSet.html">AdaptationSet</a>. This can be empty for videos, for example. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new adaptation set, which is owned by this instance. </dd></dl>
<p>Definition at line <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html#l00413">413</a> of file <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html">mpd_builder.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a5318f500aa6a5b3db7b7925c08d78d91"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void edash_packager::MpdBuilder::AddBaseUrl </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>base_url</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add &lt;BaseURL&gt; entry to the MPD. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base_url</td><td>URL for &lt;BaseURL&gt; entry. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html#l00409">409</a> of file <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html">mpd_builder.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a341e1050c0ae351db7cf0e4d23421a7f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void edash_packager::MpdBuilder::MakePathsRelativeToMpd </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>mpd_path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">MediaInfo *&#160;</td>
<td class="paramname"><em>media_info</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">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Adjusts the fields of MediaInfo so that paths are relative to the specified MPD path. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mpd_path</td><td>is the file path of the MPD file. </td></tr>
<tr><td class="paramname">media_info</td><td>is the MediaInfo object to be updated with relative paths. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html#l00641">641</a> of file <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html">mpd_builder.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a1c0fd80514f6f1d90f70bb9e96e744a1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool edash_packager::MpdBuilder::ToString </td>
<td>(</td>
<td class="paramtype">std::string *&#160;</td>
<td class="paramname"><em>output</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the MPD to the given string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>is an output string where the MPD gets written. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. </dd></dl>
<p>Definition at line <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html#l00428">428</a> of file <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html">mpd_builder.cc</a>.</p>
</div>
</div>
<a class="anchor" id="ab23432768423d4489380f45c292c7648"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">MpdType edash_packager::MpdBuilder::type </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>The mpd type. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/da3/mpd__builder_8h_source.html#l00093">93</a> of file <a class="el" href="../../d6/da3/mpd__builder_8h_source.html">mpd_builder.h</a>.</p>
</div>
</div>
<a class="anchor" id="a9efa414ddfaf48561f3085daada49ebc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool edash_packager::MpdBuilder::WriteMpdToFile </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../de/d19/classedash__packager_1_1media_1_1File.html">media::File</a> *&#160;</td>
<td class="paramname"><em>output_file</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Write the MPD to specified file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">output_file</td><td>is MPD destination. output_file will be flushed but not closed. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false otherwise. </dd></dl>
<p>Definition at line <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html#l00423">423</a> of file <a class="el" href="../../dd/d11/mpd__builder_8cc_source.html">mpd_builder.cc</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>mpd/base/<a class="el" href="../../d6/da3/mpd__builder_8h_source.html">mpd_builder.h</a></li>
<li>mpd/base/<a class="el" href="../../dd/d11/mpd__builder_8cc_source.html">mpd_builder.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 31 2016 17:13:09 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>