shaka-packager/docs/d7/d94/representation_8cc_source.html

110 lines
96 KiB
HTML
Raw Normal View History

2018-02-10 23:37:42 +00:00
<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Shaka Packager SDK: packager/mpd/base/representation.cc Source File</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.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</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="../../dir_3f8eec2fc361645de4b1ec14c19fffc7.html">packager</a></li><li class="navelem"><a class="el" href="../../dir_b885194e7131202a9b4650a8967e838c.html">mpd</a></li><li class="navelem"><a class="el" href="../../dir_6fe4b0529cd3ec97045d3314254a0cce.html">base</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">representation.cc</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2017 Google Inc. All rights reserved.</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// Use of this source code is governed by a BSD-style</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// license that can be found in the LICENSE file or at</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// https://developers.google.com/open-source/licenses/bsd</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &quot;packager/mpd/base/representation.h&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#include &lt;gflags/gflags.h&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#include &quot;packager/base/logging.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &quot;packager/base/strings/stringprintf.h&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#include &quot;packager/file/file.h&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#include &quot;packager/media/base/muxer_util.h&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &quot;packager/mpd/base/mpd_options.h&quot;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &quot;packager/mpd/base/mpd_utils.h&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &quot;packager/mpd/base/xml/xml_node.h&quot;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="keyword">namespace </span><a class="code" href="../../d8/daf/namespaceshaka.html">shaka</a> {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="keyword">namespace </span>{</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;std::string GetMimeType(<span class="keyword">const</span> std::string&amp; prefix,</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; MediaInfo::ContainerType container_type) {</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <span class="keywordflow">switch</span> (container_type) {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keywordflow">case</span> MediaInfo::CONTAINER_MP4:</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keywordflow">return</span> prefix + <span class="stringliteral">&quot;/mp4&quot;</span>;</div><div class="line"><a name="l
<div class="ttc" id="classshaka_1_1Representation_html_a524291f7a968cb040fdce0ac1db5fbd3"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a524291f7a968cb040fdce0ac1db5fbd3">shaka::Representation::GetMediaInfo</a></div><div class="ttdeci">virtual const MediaInfo &amp; GetMediaInfo() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00211">representation.cc:211</a></div></div>
<div class="ttc" id="classshaka_1_1xml_1_1RepresentationXmlNode_html"><div class="ttname"><a href="../../df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html">shaka::xml::RepresentationXmlNode</a></div><div class="ttdoc">RepresentationType in MPD. </div><div class="ttdef"><b>Definition:</b> <a href="../../dd/de7/xml__node_8h_source.html#l00156">xml_node.h:156</a></div></div>
2018-05-23 23:12:00 +00:00
<div class="ttc" id="classshaka_1_1File_html_a383c9f670511961f334569fd1a7a103b"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a383c9f670511961f334569fd1a7a103b">shaka::File::Delete</a></div><div class="ttdeci">static bool Delete(const char *file_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00198">file.cc:198</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_ae998409ae94f3ba12909a96e8f3f4f7e"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#ae998409ae94f3ba12909a96e8f3f4f7e">shaka::Representation::Init</a></div><div class="ttdeci">bool Init()</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00117">representation.cc:117</a></div></div>
2018-05-23 23:12:00 +00:00
<div class="ttc" id="structshaka_1_1MpdParams_html_a84378ed480ed2e9b8915afd9c349b458"><div class="ttname"><a href="../../df/ddc/structshaka_1_1MpdParams.html#a84378ed480ed2e9b8915afd9c349b458">shaka::MpdParams::preserved_segments_outside_live_window</a></div><div class="ttdeci">size_t preserved_segments_outside_live_window</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d07/mpd__params_8h_source.html#l00046">mpd_params.h:46</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_a997138fcaa5deef5151a64a2d7ce6aeb"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">shaka::Representation::Representation</a></div><div class="ttdeci">Representation(const MediaInfo &amp;media_info, const MpdOptions &amp;mpd_options, uint32_t representation_id, std::unique_ptr&lt; RepresentationStateChangeListener &gt; state_change_listener)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00085">representation.cc:85</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_ae9b6536925d1107e3f22ad3130cb9fe9"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#ae9b6536925d1107e3f22ad3130cb9fe9">shaka::Representation::AddNewSegment</a></div><div class="ttdeci">virtual void AddNewSegment(int64_t start_time, int64_t duration, uint64_t size)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00171">representation.cc:171</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_a11b32833166b9c4bea78cca2c6069d98"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a11b32833166b9c4bea78cca2c6069d98">shaka::Representation::SetSampleDuration</a></div><div class="ttdeci">virtual void SetSampleDuration(uint32_t sample_duration)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00196">representation.cc:196</a></div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="../../d8/dcc/namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
<div class="ttc" id="classshaka_1_1xml_1_1XmlNode_html_a0be0a3e9b041978e118d994c1f13e8fb"><div class="ttname"><a href="../../d1/d31/classshaka_1_1xml_1_1XmlNode.html#a0be0a3e9b041978e118d994c1f13e8fb">shaka::xml::XmlNode::PassScopedPtr</a></div><div class="ttdeci">scoped_xml_ptr&lt; xmlNode &gt; PassScopedPtr()</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00204">xml_node.cc:204</a></div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="namespaceshaka_html"><div class="ttname"><a href="../../d8/daf/namespaceshaka.html">shaka</a></div><div class="ttdoc">All the methods that are virtual are virtual for mocking. </div><div class="ttdef"><b>Definition:</b> <a href="../../d4/d15/gflags__hex__bytes_8cc_source.html#l00011">gflags_hex_bytes.cc:11</a></div></div>
<div class="ttc" id="classshaka_1_1xml_1_1RepresentationXmlNode_html_a68a51ea870f2a24379a9b81cb97b6ac0"><div class="ttname"><a href="../../df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html#a68a51ea870f2a24379a9b81cb97b6ac0">shaka::xml::RepresentationXmlNode::AddVODOnlyInfo</a></div><div class="ttdeci">bool AddVODOnlyInfo(const MediaInfo &amp;media_info)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00354">xml_node.cc:354</a></div></div>
<div class="ttc" id="classshaka_1_1xml_1_1XmlNode_html_afc83f9dbaedc8ba0fc9cc1153ac23329"><div class="ttname"><a href="../../d1/d31/classshaka_1_1xml_1_1XmlNode.html#afc83f9dbaedc8ba0fc9cc1153ac23329">shaka::xml::XmlNode::SetStringAttribute</a></div><div class="ttdeci">void SetStringAttribute(const char *attribute_name, const std::string &amp;attribute)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00166">xml_node.cc:166</a></div></div>
<div class="ttc" id="classshaka_1_1BandwidthEstimator_html_a53c67d33f000489d1ebb31a2bdd766a4"><div class="ttname"><a href="../../da/d2c/classshaka_1_1BandwidthEstimator.html#a53c67d33f000489d1ebb31a2bdd766a4">shaka::BandwidthEstimator::AddBlock</a></div><div class="ttdeci">void AddBlock(uint64_t size_in_bytes, double duration)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d86/bandwidth__estimator_8cc_source.html#l00021">bandwidth_estimator.cc:21</a></div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="structshaka_1_1ContentProtectionElement_html"><div class="ttname"><a href="../../da/d43/structshaka_1_1ContentProtectionElement.html">shaka::ContentProtectionElement</a></div><div class="ttdef"><b>Definition:</b> <a href="../../de/dd6/content__protection__element_8h_source.html#l00036">content_protection_element.h:36</a></div></div>
<div class="ttc" id="classshaka_1_1xml_1_1RepresentationXmlNode_html_ae9ff190e1a653a348b00b5edd9d6cc60"><div class="ttname"><a href="../../df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html#ae9ff190e1a653a348b00b5edd9d6cc60">shaka::xml::RepresentationXmlNode::AddLiveOnlyInfo</a></div><div class="ttdeci">bool AddLiveOnlyInfo(const MediaInfo &amp;media_info, const std::list&lt; SegmentInfo &gt; &amp;segment_infos, uint32_t start_number)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00400">xml_node.cc:400</a></div></div>
<div class="ttc" id="classshaka_1_1xml_1_1XmlNode_html_a7479055041708fb681957a838e7ecc1f"><div class="ttname"><a href="../../d1/d31/classshaka_1_1xml_1_1XmlNode.html#a7479055041708fb681957a838e7ecc1f">shaka::xml::XmlNode::SetId</a></div><div class="ttdeci">void SetId(uint32_t id)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00189">xml_node.cc:189</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_a606afa5df6a90f49faad0ce427b7e960"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a606afa5df6a90f49faad0ce427b7e960">shaka::Representation::GetXml</a></div><div class="ttdeci">xml::scoped_xml_ptr&lt; xmlNode &gt; GetXml()</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00221">representation.cc:221</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_aa93fd6cd965d3091a280debc93656d57"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#aa93fd6cd965d3091a280debc93656d57">shaka::Representation::SetPresentationTimeOffset</a></div><div class="ttdeci">void SetPresentationTimeOffset(double presentation_time_offset)</div><div class="ttdoc">Set in SegmentBase / SegmentTemplate. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00288">representation.cc:288</a></div></div>
<div class="ttc" id="structshaka_1_1MpdParams_html_a88b8d28e263b2dcb36909869d3c2ceca"><div class="ttname"><a href="../../df/ddc/structshaka_1_1MpdParams.html#a88b8d28e263b2dcb36909869d3c2ceca">shaka::MpdParams::target_segment_duration</a></div><div class="ttdeci">double target_segment_duration</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d07/mpd__params_8h_source.html#l00082">mpd_params.h:82</a></div></div>
<div class="ttc" id="classshaka_1_1BandwidthEstimator_html_a0df6c40f43a89d3d481392ac0298e37c"><div class="ttname"><a href="../../da/d2c/classshaka_1_1BandwidthEstimator.html#a0df6c40f43a89d3d481392ac0298e37c">shaka::BandwidthEstimator::Max</a></div><div class="ttdeci">uint64_t Max() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d86/bandwidth__estimator_8cc_source.html#l00059">bandwidth_estimator.cc:59</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_a265d014093c9073b08505013886aaa8d"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a265d014093c9073b08505013886aaa8d">shaka::Representation::AddContentProtectionElement</a></div><div class="ttdeci">virtual void AddContentProtectionElement(const ContentProtectionElement &amp;element)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00159">representation.cc:159</a></div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="classshaka_1_1Representation_html"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html">shaka::Representation</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d2b/representation_8h_source.html#l00054">representation.h:54</a></div></div>
<div class="ttc" id="classshaka_1_1xml_1_1XmlNode_html_ab15dbcc1a051218dc16f44584276ad20"><div class="ttname"><a href="../../d1/d31/classshaka_1_1xml_1_1XmlNode.html#ab15dbcc1a051218dc16f44584276ad20">shaka::xml::XmlNode::SetIntegerAttribute</a></div><div class="ttdeci">void SetIntegerAttribute(const char *attribute_name, uint64_t number)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00173">xml_node.cc:173</a></div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="structshaka_1_1MpdOptions_html"><div class="ttname"><a href="../../d1/df3/structshaka_1_1MpdOptions.html">shaka::MpdOptions</a></div><div class="ttdoc">Defines Mpd Options. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d60/mpd__options_8h_source.html#l00025">mpd_options.h:25</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_a3d17325903aa01f0c8ff7753d94ff330"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a3d17325903aa01f0c8ff7753d94ff330">shaka::Representation::UpdateContentProtectionPssh</a></div><div class="ttdeci">virtual void UpdateContentProtectionPssh(const std::string &amp;drm_uuid, const std::string &amp;pssh)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00165">representation.cc:165</a></div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="structshaka_1_1SegmentInfo_html"><div class="ttname"><a href="../../dc/de1/structshaka_1_1SegmentInfo.html">shaka::SegmentInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="../../df/de9/segment__info_8h_source.html#l00014">segment_info.h:14</a></div></div>
2018-05-23 23:12:00 +00:00
<div class="ttc" id="structshaka_1_1MpdParams_html_a95e4824708c8de4b882b86772f680032"><div class="ttname"><a href="../../df/ddc/structshaka_1_1MpdParams.html#a95e4824708c8de4b882b86772f680032">shaka::MpdParams::time_shift_buffer_depth</a></div><div class="ttdeci">double time_shift_buffer_depth</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d07/mpd__params_8h_source.html#l00039">mpd_params.h:39</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_a473e45dbbf64e6ab6ed670ccedac84ed"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a473e45dbbf64e6ab6ed670ccedac84ed">shaka::Representation::SuppressOnce</a></div><div class="ttdeci">void SuppressOnce(SuppressFlag flag)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00284">representation.cc:284</a></div></div>
<div class="ttc" id="classshaka_1_1xml_1_1RepresentationXmlNode_html_a49050cf0e7883bfa6e8e2fb0174b2a7a"><div class="ttname"><a href="../../df/d9e/classshaka_1_1xml_1_1RepresentationXmlNode.html#a49050cf0e7883bfa6e8e2fb0174b2a7a">shaka::xml::RepresentationXmlNode::AddAudioInfo</a></div><div class="ttdeci">bool AddAudioInfo(const MediaInfo::AudioInfo &amp;audio_info)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00346">xml_node.cc:346</a></div></div>
<div class="ttc" id="classshaka_1_1Representation_html_a94fcb546e555637d33286515c1a44545"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a94fcb546e555637d33286515c1a44545">shaka::Representation::GetStartAndEndTimestamps</a></div><div class="ttdeci">bool GetStartAndEndTimestamps(double *start_timestamp_seconds, double *end_timestamp_seconds) const</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00296">representation.cc:296</a></div></div>
2018-02-10 23:37:42 +00:00
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jan 21 2020 16:58:51 for Shaka Packager SDK by &#160;<a href="http://www.doxygen.org/index.html">
2018-02-10 23:37:42 +00:00
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>