106 lines
86 KiB
HTML
106 lines
86 KiB
HTML
|
<!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> <span class="comment">// Copyright 2017 Google Inc. All rights reserved.</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <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> <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> <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> </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include "packager/mpd/base/representation.h"</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> </div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include "packager/base/logging.h"</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "packager/mpd/base/mpd_options.h"</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "packager/mpd/base/mpd_utils.h"</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "packager/mpd/base/xml/xml_node.h"</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">namespace </span><a class="code" href="../../d8/daf/namespaceshaka.html">shaka</a> {</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">namespace </span>{</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> std::string GetMimeType(<span class="keyword">const</span> std::string& prefix,</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  MediaInfo::ContainerType container_type) {</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  <span class="keywordflow">switch</span> (container_type) {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">case</span> MediaInfo::CONTAINER_MP4:</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keywordflow">return</span> prefix + <span class="stringliteral">"/mp4"</span>;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keywordflow">case</span> MediaInfo::CONTAINER_MPEG2_TS:</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="comment">// NOTE: DASH MPD spec uses lowercase but RFC3555 says uppercase.</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="keywordflow">return</span> prefix + <span class="stringliteral">"/MP2T"</span>;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="keywordflow">case</span> MediaInfo::CONTAINER_WEBM:</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <span class="keywordflow">return</span> prefix + <span class="stringliteral">"/webm"</span>;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keywordflow">default</sp
|
||
|
<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 & GetMediaInfo() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00226">representation.cc:226</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#l00139">xml_node.h:139</a></div></div>
|
||
|
<div class="ttc" id="classshaka_1_1Representation_html_a6ca8bbfd34ef8ca782d2ef18aeaad932"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a6ca8bbfd34ef8ca782d2ef18aeaad932">shaka::Representation::AddNewSegment</a></div><div class="ttdeci">virtual void AddNewSegment(uint64_t start_time, uint64_t duration, uint64_t size)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00192">representation.cc:192</a></div></div>
|
||
|
<div class="ttc" id="classshaka_1_1Representation_html_add422159913215feeeaa244ecb108dbb"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#add422159913215feeeaa244ecb108dbb">shaka::Representation::GetDurationSeconds</a></div><div class="ttdeci">float GetDurationSeconds() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00314">representation.cc:314</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#l00138">representation.cc:138</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 &media_info, const MpdOptions &mpd_options, uint32_t representation_id, std::unique_ptr< RepresentationStateChangeListener > state_change_listener)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00105">representation.cc:105</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#l00216">representation.cc:216</a></div></div>
|
||
|
<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< xmlNode > PassScopedPtr()</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00136">xml_node.cc:136</a></div></div>
|
||
|
<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 &media_info)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00278">xml_node.cc:278</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 &attribute)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00104">xml_node.cc:104</a></div></div>
|
||
|
<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 &media_info, const std::list< SegmentInfo > &segment_infos, uint32_t start_number)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00324">xml_node.cc:324</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#l00127">xml_node.cc:127</a></div></div>
|
||
|
<div class="ttc" id="classshaka_1_1Representation_html_ac0926d3afaec062c79858106da7634f5"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#ac0926d3afaec062c79858106da7634f5">shaka::Representation::GetEarliestTimestamp</a></div><div class="ttdeci">bool GetEarliestTimestamp(double *timestamp_seconds) const</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00303">representation.cc:303</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< xmlNode > GetXml()</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00236">representation.cc:236</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 &element)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00180">representation.cc:180</a></div></div>
|
||
|
<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#l00111">xml_node.cc:111</a></div></div>
|
||
|
<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 &drm_uuid, const std::string &pssh)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00186">representation.cc:186</a></div></div>
|
||
|
<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>
|
||
|
<div class="ttc" id="classBandwidthEstimator_html"><div class="ttname"><a href="../../d2/d6f/classBandwidthEstimator.html">BandwidthEstimator</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d19/bandwidth__estimator_8h_source.html#l00015">bandwidth_estimator.h:15</a></div></div>
|
||
|
<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#l00033">mpd_params.h:33</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#l00299">representation.cc:299</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 &audio_info)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d96/xml__node_8cc_source.html#l00270">xml_node.cc:270</a></div></div>
|
||
|
</div><!-- fragment --></div><!-- contents -->
|
||
|
<!-- start footer part -->
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated on Sat Feb 10 2018 15:36:44 for Shaka Packager SDK by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.13
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|