267 lines
37 KiB
HTML
267 lines
37 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Shaka Packager SDK: packager/mpd/base/representation.h 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.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="../../menudata.js"></script>
|
|
<script type="text/javascript" src="../../menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('../../',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</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.h</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> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#ifndef PACKAGER_MPD_BASE_REPRESENTATION_H_</span></div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#define PACKAGER_MPD_BASE_REPRESENTATION_H_</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  </div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include <stdint.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="preprocessor">#include <list></span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include <memory></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> <span class="preprocessor">#include "packager/base/optional.h"</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "packager/mpd/base/bandwidth_estimator.h"</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "packager/mpd/base/media_info.pb.h"</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "packager/mpd/base/segment_info.h"</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "packager/mpd/base/xml/xml_node.h"</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">namespace </span><a class="code" href="../../d8/daf/namespaceshaka.html">shaka</a> {</div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">struct </span>ContentProtectionElement;</div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">struct </span>MpdOptions;</div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  </div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html"> 28</a></span> <span class="keyword">class </span><a class="code" href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html">RepresentationStateChangeListener</a> {</div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <a class="code" href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html">RepresentationStateChangeListener</a>() {}</div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keyword">virtual</span> ~<a class="code" href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html">RepresentationStateChangeListener</a>() {}</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html#aae4407f3eeec13299f6f778a382ae5d5">OnNewSegmentForRepresentation</a>(int64_t start_time,</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  int64_t duration) = 0;</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html#a64bc6f8299a1479c85f294f8ab3f6819">OnSetFrameRateForRepresentation</a>(uint32_t frame_duration,</div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  uint32_t timescale) = 0;</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> };</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  </div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../de/d52/classshaka_1_1Representation.html"> 50</a></span> <span class="keyword">class </span><a class="code" href="../../de/d52/classshaka_1_1Representation.html">Representation</a> {</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keyword">enum</span> SuppressFlag {</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  kSuppressWidth = 1,</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  kSuppressHeight = 2,</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  kSuppressFrameRate = 4,</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  };</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  </div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">virtual</span> ~<a class="code" href="../../de/d52/classshaka_1_1Representation.html">Representation</a>();</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  </div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">bool</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#ae998409ae94f3ba12909a96e8f3f4f7e">Init</a>();</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a265d014093c9073b08505013886aaa8d">AddContentProtectionElement</a>(</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">const</span> <a class="code" href="../../da/d43/structshaka_1_1ContentProtectionElement.html">ContentProtectionElement</a>& element);</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a3d17325903aa01f0c8ff7753d94ff330">UpdateContentProtectionPssh</a>(<span class="keyword">const</span> std::string& drm_uuid,</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keyword">const</span> std::string& pssh);</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#ae9b6536925d1107e3f22ad3130cb9fe9">AddNewSegment</a>(int64_t start_time,</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  int64_t duration,</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  uint64_t size);</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a11b32833166b9c4bea78cca2c6069d98">SetSampleDuration</a>(uint32_t sample_duration);</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  </div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keyword">virtual</span> <span class="keyword">const</span> MediaInfo& <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a524291f7a968cb040fdce0ac1db5fbd3">GetMediaInfo</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  </div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  base::Optional<xml::XmlNode> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#ab4008b130a91b83198e769d15b3dfac3">GetXml</a>();</div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  </div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordtype">void</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a473e45dbbf64e6ab6ed670ccedac84ed">SuppressOnce</a>(SuppressFlag flag);</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  </div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordtype">void</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#aa93fd6cd965d3091a280debc93656d57">SetPresentationTimeOffset</a>(<span class="keywordtype">double</span> presentation_time_offset);</div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  </div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordtype">bool</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a94fcb546e555637d33286515c1a44545">GetStartAndEndTimestamps</a>(<span class="keywordtype">double</span>* start_timestamp_seconds,</div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keywordtype">double</span>* end_timestamp_seconds) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  </div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="../../de/d52/classshaka_1_1Representation.html#a9cb9a38de5e57bff1feb81d2575ae1b2"> 142</a></span>  uint32_t <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a9cb9a38de5e57bff1feb81d2575ae1b2">id</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> id_; }</div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  </div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordtype">void</span> set_media_info(<span class="keyword">const</span> MediaInfo& media_info) { media_info_ = media_info; }</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  </div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">Representation</a>(</div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keyword">const</span> MediaInfo& media_info,</div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keyword">const</span> MpdOptions& mpd_options,</div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  uint32_t representation_id,</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  std::unique_ptr<RepresentationStateChangeListener> state_change_listener);</div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  </div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">Representation</a>(</div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keyword">const</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">Representation</a>& representation,</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  std::unique_ptr<RepresentationStateChangeListener> state_change_listener);</div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  </div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">Representation</a>(<span class="keyword">const</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">Representation</a>&) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">Representation</a>& operator=(<span class="keyword">const</span> <a class="code" href="../../de/d52/classshaka_1_1Representation.html#a997138fcaa5deef5151a64a2d7ce6aeb">Representation</a>&) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  </div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keyword">friend</span> <span class="keyword">class </span>AdaptationSet;</div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keyword">friend</span> <span class="keyword">class </span>RepresentationTest;</div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  </div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="comment">// Returns true if |media_info_| has required fields to generate a valid</span></div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="comment">// Representation. Otherwise returns false.</span></div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordtype">bool</span> HasRequiredMediaInfoFields() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="comment">// Add a SegmentInfo. This function may insert an adjusted SegmentInfo if</span></div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="comment">// |allow_approximate_segment_timeline_| is set.</span></div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordtype">void</span> AddSegmentInfo(int64_t start_time, int64_t duration);</div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  </div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="comment">// Check if two timestamps are approximately equal if</span></div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="comment">// |allow_approximate_segment_timeline_| is set; Otherwise check whether the</span></div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="comment">// two times match.</span></div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordtype">bool</span> ApproximiatelyEqual(int64_t time1, int64_t time2) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  </div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="comment">// Return adjusted duration if |allow_aproximate_segment_timeline_or_duration|</span></div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">// is set; otherwise duration is returned without adjustment.</span></div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  int64_t AdjustDuration(int64_t duration) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="comment">// Remove elements from |segment_infos_| for dynamic live profile. Increments</span></div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="comment">// |start_number_| by the number of segments removed.</span></div>
|
|
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordtype">void</span> SlideWindow();</div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">// Remove the first segment in |segment_info|.</span></div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordtype">void</span> RemoveOldSegment(SegmentInfo* segment_info);</div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  </div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="comment">// Note: Because 'mimeType' is a required field for a valid MPD, these return</span></div>
|
|
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="comment">// strings.</span></div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  std::string GetVideoMimeType() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  std::string GetAudioMimeType() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  std::string GetTextMimeType() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  </div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="comment">// Get Representation as string. For debugging.</span></div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  std::string RepresentationAsString() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  </div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="comment">// Init() checks that only one of VideoInfo, AudioInfo, or TextInfo is set. So</span></div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">// any logic using this can assume only one set.</span></div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  MediaInfo media_info_;</div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  std::list<ContentProtectionElement> content_protection_elements_;</div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  </div>
|
|
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  int64_t current_buffer_depth_ = 0;</div>
|
|
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="comment">// TODO(kqyang): Address sliding window issue with multiple periods.</span></div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  std::list<SegmentInfo> segment_infos_;</div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// A list to hold the file names of the segments to be removed temporarily.</span></div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="comment">// Once a file is actually removed, it is removed from the list.</span></div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  std::list<std::string> segments_to_be_removed_;</div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  </div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keyword">const</span> uint32_t id_;</div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  std::string mime_type_;</div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  std::string codecs_;</div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  BandwidthEstimator bandwidth_estimator_;</div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keyword">const</span> MpdOptions& mpd_options_;</div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  </div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="comment">// startNumber attribute for SegmentTemplate.</span></div>
|
|
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// Starts from 1.</span></div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  uint32_t start_number_ = 1;</div>
|
|
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  </div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="comment">// If this is not null, then Representation is responsible for calling the</span></div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="comment">// right methods at right timings.</span></div>
|
|
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  std::unique_ptr<RepresentationStateChangeListener> state_change_listener_;</div>
|
|
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  </div>
|
|
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="comment">// Bit vector for tracking witch attributes should not be output.</span></div>
|
|
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordtype">int</span> output_suppression_flags_ = 0;</div>
|
|
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  </div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="comment">// When set to true, allows segments to have slightly different durations (up</span></div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="comment">// to one sample).</span></div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> allow_approximate_segment_timeline_ = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="comment">// Segments with duration difference less than one frame duration are</span></div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="comment">// considered to have the same duration.</span></div>
|
|
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  uint32_t frame_duration_ = 0;</div>
|
|
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> };</div>
|
|
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  </div>
|
|
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span> } <span class="comment">// namespace shaka</span></div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  </div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> <span class="preprocessor">#endif // PACKAGER_MPD_BASE_REPRESENTATION_H_</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassshaka_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#l00085">representation.cc:85</a></div></div>
|
|
<div class="ttc" id="aclassshaka_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#l00300">representation.cc:300</a></div></div>
|
|
<div class="ttc" id="aclassshaka_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="anamespaceshaka_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="aclassshaka_1_1Representation_html_a9cb9a38de5e57bff1feb81d2575ae1b2"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#a9cb9a38de5e57bff1feb81d2575ae1b2">shaka::Representation::id</a></div><div class="ttdeci">uint32_t id() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d2b/representation_8h_source.html#l00142">representation.h:142</a></div></div>
|
|
<div class="ttc" id="aclassshaka_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>
|
|
<div class="ttc" id="aclassshaka_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>
|
|
<div class="ttc" id="aclassshaka_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#l00050">representation.h:50</a></div></div>
|
|
<div class="ttc" id="aclassshaka_1_1RepresentationStateChangeListener_html"><div class="ttname"><a href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html">shaka::RepresentationStateChangeListener</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d2b/representation_8h_source.html#l00028">representation.h:28</a></div></div>
|
|
<div class="ttc" id="aclassshaka_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#l00159">representation.cc:159</a></div></div>
|
|
<div class="ttc" id="aclassshaka_1_1RepresentationStateChangeListener_html_aae4407f3eeec13299f6f778a382ae5d5"><div class="ttname"><a href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html#aae4407f3eeec13299f6f778a382ae5d5">shaka::RepresentationStateChangeListener::OnNewSegmentForRepresentation</a></div><div class="ttdeci">virtual void OnNewSegmentForRepresentation(int64_t start_time, int64_t duration)=0</div></div>
|
|
<div class="ttc" id="aclassshaka_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 @presentationTimeOffset in SegmentBase / SegmentTemplate.</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00292">representation.cc:292</a></div></div>
|
|
<div class="ttc" id="aclassshaka_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#l00165">representation.cc:165</a></div></div>
|
|
<div class="ttc" id="aclassshaka_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#l00211">representation.cc:211</a></div></div>
|
|
<div class="ttc" id="aclassshaka_1_1RepresentationStateChangeListener_html_a64bc6f8299a1479c85f294f8ab3f6819"><div class="ttname"><a href="../../df/d94/classshaka_1_1RepresentationStateChangeListener.html#a64bc6f8299a1479c85f294f8ab3f6819">shaka::RepresentationStateChangeListener::OnSetFrameRateForRepresentation</a></div><div class="ttdeci">virtual void OnSetFrameRateForRepresentation(uint32_t frame_duration, uint32_t timescale)=0</div></div>
|
|
<div class="ttc" id="aclassshaka_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#l00288">representation.cc:288</a></div></div>
|
|
<div class="ttc" id="astructshaka_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="aclassshaka_1_1Representation_html_ab4008b130a91b83198e769d15b3dfac3"><div class="ttname"><a href="../../de/d52/classshaka_1_1Representation.html#ab4008b130a91b83198e769d15b3dfac3">shaka::Representation::GetXml</a></div><div class="ttdeci">base::Optional< xml::XmlNode > GetXml()</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d94/representation_8cc_source.html#l00221">representation.cc:221</a></div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Tue Jun 22 2021 00:16:04 for Shaka Packager SDK by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|