<divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Copyright 2015 Google Inc. All rights reserved.</span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment">// Use of this source code is governed by a BSD-style</span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment">// license that can be found in the LICENSE file or at</span></div>
<divclass="line"><aname="l00044"></a><spanclass="lineno"> 44</span>  Status <aclass="code"href="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a5058fc394abf702d57f11e19a40c517e">Initialize</a>(<aclass="code"href="../../d5/db1/classshaka_1_1media_1_1StreamInfo.html">StreamInfo</a>* info,</div>
<divclass="line"><aname="l00050"></a><spanclass="lineno"> 50</span>  Status <aclass="code"href="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aa84782877f1afaf9519a552ac3d5d417">Finalize</a>();</div>
<divclass="line"><aname="l00055"></a><spanclass="lineno"> 55</span>  Status <aclass="code"href="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aad137d0ae95d3e47a32725276970e324">AddSample</a>(std::shared_ptr<MediaSample> sample);</div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"> 58</span> <spanclass="keyword">virtual</span> Status <aclass="code"href="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a3c7123d6d9321c72d8bd737f1f9d3c01">FinalizeSegment</a>(uint64_t start_timestamp,</div>
<divclass="line"><aname="l00070"></a><spanclass="lineno"> 70</span> <spanclass="comment">// Returns an empty vector if there are no specific ranges for the segments,</span></div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span> <spanclass="comment">// e.g. the media is in multiple files.</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment">// Otherwise, a vector of ranges for the media segments are returned.</span></div>
<divclass="line"><aname="l00084"></a><spanclass="lineno"> 84</span>  Status <aclass="code"href="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aebcf73c5a1c3ae0f2608032d2a6ee445">WriteSegmentHeader</a>(uint64_t file_size, <aclass="code"href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html">MkvWriter</a>* writer);</div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"> 86</span>  Status <aclass="code"href="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a6060ddc97c58e4435d1db932de17e131">SetCluster</a>(uint64_t start_webm_timecode,</div>
<divclass="line"><aname="l00108"></a><spanclass="lineno"> 108</span>  Status InitializeAudioTrack(<spanclass="keyword">const</span><aclass="code"href="../../da/d4e/classshaka_1_1media_1_1AudioStreamInfo.html">AudioStreamInfo</a>* info,</div>
<divclass="line"><aname="l00110"></a><spanclass="lineno"> 110</span>  Status InitializeVideoTrack(<spanclass="keyword">const</span><aclass="code"href="../../d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html">VideoStreamInfo</a>* info,</div>
<divclass="line"><aname="l00113"></a><spanclass="lineno"> 113</span> <spanclass="comment">// Writes the previous frame to the file.</span></div>
<divclass="line"><aname="l00114"></a><spanclass="lineno"> 114</span>  Status WriteFrame(<spanclass="keywordtype">bool</span> write_duration);</div>
<divclass="line"><aname="l00116"></a><spanclass="lineno"> 116</span> <spanclass="comment">// This is called when there needs to be a new (sub)segment.</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment">// In single-segment mode, a Cluster is a segment and there is no subsegment.</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"> 118</span> <spanclass="comment">// In multi-segment mode, a new file is a segment and the clusters in the file</span></div>
<divclass="line"><aname="l00119"></a><spanclass="lineno"> 119</span> <spanclass="comment">// are subsegments.</span></div>
<divclass="line"><aname="l00120"></a><spanclass="lineno"> 120</span> <spanclass="keyword">virtual</span> Status NewSegment(uint64_t start_timestamp, <spanclass="keywordtype">bool</span> is_subsegment) = 0;</div>
<divclass="line"><aname="l00122"></a><spanclass="lineno"> 122</span> <spanclass="comment">// Store the previous sample so we know which one is the last frame.</span></div>
<divclass="line"><aname="l00124"></a><spanclass="lineno"> 124</span> <spanclass="comment">// The reference frame timestamp; used to populate the ReferenceBlock element</span></div>
<divclass="line"><aname="l00125"></a><spanclass="lineno"> 125</span> <spanclass="comment">// when writing non-keyframe BlockGroups.</span></div>
<divclass="line"><aname="l00143"></a><spanclass="lineno"> 143</span> <spanclass="comment">// The position (in bytes) of the start of the Segment payload in the init</span></div>
<divclass="line"><aname="l00144"></a><spanclass="lineno"> 144</span> <spanclass="comment">// file. This is also the size of the header before the SeekHead.</span></div>
<divclass="line"><aname="l00147"></a><spanclass="lineno"> 147</span> <spanclass="comment">// Indicate whether a new segment needed to be created, which is always true</span></div>
<divclass="line"><aname="l00148"></a><spanclass="lineno"> 148</span> <spanclass="comment">// in the beginning.</span></div>
<divclass="line"><aname="l00150"></a><spanclass="lineno"> 150</span> <spanclass="comment">// Indicate whether a new subsegment needed to be created.</span></div>
<divclass="ttc"id="classshaka_1_1media_1_1webm_1_1Segmenter_html_ab85d8456bc9e4990b1c5e5d9738a2d1b"><divclass="ttname"><ahref="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#ab85d8456bc9e4990b1c5e5d9738a2d1b">shaka::media::webm::Segmenter::FromWebMTimecode</a></div><divclass="ttdeci">uint64_t FromWebMTimecode(uint64_t webm_timecode)</div><divclass="ttdoc">Converts the given time in WebM timecode to ISO BMFF timestamp. </div><divclass="ttdef"><b>Definition:</b><ahref="../../dc/d53/webm_2segmenter_8cc_source.html#l00212">segmenter.cc:212</a></div></div>
<divclass="ttc"id="classshaka_1_1media_1_1webm_1_1Segmenter_html_aaa34bab8904436eb3e67f392eaa0b549"><divclass="ttname"><ahref="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#aaa34bab8904436eb3e67f392eaa0b549">shaka::media::webm::Segmenter::FromBmffTimestamp</a></div><divclass="ttdeci">uint64_t FromBmffTimestamp(uint64_t bmff_timestamp)</div><divclass="ttdoc">Converts the given time in ISO BMFF timestamp to WebM timecode. </div><divclass="ttdef"><b>Definition:</b><ahref="../../dc/d53/webm_2segmenter_8cc_source.html#l00206">segmenter.cc:206</a></div></div>
<divclass="ttc"id="structshaka_1_1media_1_1MuxerOptions_html"><divclass="ttname"><ahref="../../d0/d27/structshaka_1_1media_1_1MuxerOptions.html">shaka::media::MuxerOptions</a></div><divclass="ttdoc">This structure contains the list of configuration options for Muxer. </div><divclass="ttdef"><b>Definition:</b><ahref="../../d0/d0e/muxer__options_8h_source.html#l00018">muxer_options.h:18</a></div></div>
<divclass="ttc"id="classshaka_1_1media_1_1webm_1_1Segmenter_html_a3c7123d6d9321c72d8bd737f1f9d3c01"><divclass="ttname"><ahref="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a3c7123d6d9321c72d8bd737f1f9d3c01">shaka::media::webm::Segmenter::FinalizeSegment</a></div><divclass="ttdeci">virtual Status FinalizeSegment(uint64_t start_timestamp, uint64_t duration_timestamp, bool is_subsegment)=0</div><divclass="ttdoc">Finalize the (sub)segment. </div><divclass="ttdef"><b>Definition:</b><ahref="../../dc/d53/webm_2segmenter_8cc_source.html#l00190">segmenter.cc:190</a></div></div>
<divclass="ttc"id="classshaka_1_1media_1_1webm_1_1Segmenter_html_a6060ddc97c58e4435d1db932de17e131"><divclass="ttname"><ahref="../../dd/dc5/classshaka_1_1media_1_1webm_1_1Segmenter.html#a6060ddc97c58e4435d1db932de17e131">shaka::media::webm::Segmenter::SetCluster</a></div><divclass="ttdeci">Status SetCluster(uint64_t start_webm_timecode, uint64_t position, MkvWriter *writer)</div><divclass="ttdoc">Creates a Cluster object with the given parameters. </div><divclass="ttdef"><b>Definition:</b><ahref="../../dc/d53/webm_2segmenter_8cc_source.html#l00256">segmenter.cc:256</a></div></div>
<divclass="ttc"id="classshaka_1_1media_1_1ProgressListener_html"><divclass="ttname"><ahref="../../d4/de6/classshaka_1_1media_1_1ProgressListener.html">shaka::media::ProgressListener</a></div><divclass="ttdoc">This class listens to progress updates events. </div><divclass="ttdef"><b>Definition:</b><ahref="../../d7/d9d/progress__listener_8h_source.html#l00020">progress_listener.h:20</a></div></div>
<divclass="ttc"id="classshaka_1_1media_1_1MkvWriter_html"><divclass="ttname"><ahref="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html">shaka::media::MkvWriter</a></div><divclass="ttdoc">An implementation of IMkvWriter using our File type. </div><divclass="ttdef"><b>Definition:</b><ahref="../../d2/dd6/mkv__writer_8h_source.html#l00021">mkv_writer.h:21</a></div></div>
<divclass="ttc"id="classshaka_1_1media_1_1VideoStreamInfo_html"><divclass="ttname"><ahref="../../d6/db1/classshaka_1_1media_1_1VideoStreamInfo.html">shaka::media::VideoStreamInfo</a></div><divclass="ttdoc">Holds video stream information. </div><divclass="ttdef"><b>Definition:</b><ahref="../../d7/d87/video__stream__info_8h_source.html#l00023">video_stream_info.h:23</a></div></div>