<divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Copyright 2017 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="l00052"></a><spanclass="lineno"> 52</span>  Status <aclass="code"href="../../d4/d43/classshaka_1_1media_1_1ChunkingHandler.html#a76a5f4b74da3876cc72f44301c389ebd">InitializeInternal</a>() <spanclass="keyword">override</span>;</div>
<divclass="line"><aname="l00053"></a><spanclass="lineno"> 53</span>  Status <aclass="code"href="../../d4/d43/classshaka_1_1media_1_1ChunkingHandler.html#a44c30ffd7c283be2ba4347bda7848633">Process</a>(std::unique_ptr<StreamData> stream_data) <spanclass="keyword">override</span>;</div>
<divclass="line"><aname="l00054"></a><spanclass="lineno"> 54</span>  Status <aclass="code"href="../../d4/d43/classshaka_1_1media_1_1ChunkingHandler.html#ab526bd53e4d49d7209f01d9b10b9ab52">OnFlushRequest</a>(<spanclass="keywordtype">size_t</span> input_stream_index) <spanclass="keyword">override</span>;</div>
<divclass="line"><aname="l00063"></a><spanclass="lineno"> 63</span> <spanclass="comment">// Processes media sample and apply chunking if needed.</span></div>
<divclass="line"><aname="l00064"></a><spanclass="lineno"> 64</span>  Status ProcessMediaSample(<spanclass="keyword">const</span><aclass="code"href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a>* sample);</div>
<divclass="line"><aname="l00066"></a><spanclass="lineno"> 66</span> <spanclass="comment">// Dispatch cached non main stream samples before |timestamp_threshold|.</span></div>
<divclass="line"><aname="l00067"></a><spanclass="lineno"> 67</span>  Status DispatchNonMainSamples(int64_t timestamp_threshold);</div>
<divclass="line"><aname="l00069"></a><spanclass="lineno"> 69</span> <spanclass="comment">// The (sub)segments are aligned and dispatched together.</span></div>
<divclass="line"><aname="l00070"></a><spanclass="lineno"> 70</span>  Status DispatchSegmentInfoForAllStreams();</div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span>  Status DispatchSubsegmentInfoForAllStreams();</div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</span> <spanclass="comment">// The inputs are expected to come from the same thread.</span></div>
<divclass="line"><aname="l00078"></a><spanclass="lineno"> 78</span> <spanclass="comment">// The video stream is the main stream; if there is only one stream, it is the</span></div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span> <spanclass="comment">// main stream. The chunking is based on the main stream.</span></div>
<divclass="line"><aname="l00082"></a><spanclass="lineno"> 82</span> <spanclass="comment">// Segment and subsegment duration in main stream's time scale.</span></div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"> 86</span> <spanclass="comment">// The streams are expected to be synchronized. Cache non main (video) stream</span></div>
<divclass="line"><aname="l00087"></a><spanclass="lineno"> 87</span> <spanclass="comment">// samples so we can determine whether the next segment should include these</span></div>
<divclass="line"><aname="l00088"></a><spanclass="lineno"> 88</span> <spanclass="comment">// samples. The samples will be dispatched after seeing the next main stream</span></div>
<divclass="line"><aname="l00092"></a><spanclass="lineno"> 92</span> <spanclass="comment">// Current segment index, useful to determine where to do chunking.</span></div>
<divclass="line"><aname="l00094"></a><spanclass="lineno"> 94</span> <spanclass="comment">// Current subsegment index, useful to determine where to do chunking.</span></div>
<divclass="line"><aname="l00100"></a><spanclass="lineno"> 100</span> <spanclass="comment">// The end timestamp of the last dispatched sample.</span></div>
<divclass="ttc"id="classshaka_1_1media_1_1ChunkingHandler_html_ab526bd53e4d49d7209f01d9b10b9ab52"><divclass="ttname"><ahref="../../d4/d43/classshaka_1_1media_1_1ChunkingHandler.html#ab526bd53e4d49d7209f01d9b10b9ab52">shaka::media::ChunkingHandler::OnFlushRequest</a></div><divclass="ttdeci">Status OnFlushRequest(size_t input_stream_index) override</div><divclass="ttdoc">Event handler for flush request at the specific input stream index. </div><divclass="ttdef"><b>Definition:</b><ahref="../../d9/d12/chunking__handler_8cc_source.html#l00114">chunking_handler.cc:114</a></div></div>
<divclass="ttc"id="structshaka_1_1ChunkingParams_html"><divclass="ttname"><ahref="../../d2/d1f/structshaka_1_1ChunkingParams.html">shaka::ChunkingParams</a></div><divclass="ttdoc">Chunking (segmentation) related parameters. </div><divclass="ttdef"><b>Definition:</b><ahref="../../db/d79/chunking__params_8h_source.html#l00013">chunking_params.h:13</a></div></div>
<divclass="ttc"id="classshaka_1_1media_1_1MediaSample_html"><divclass="ttname"><ahref="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">shaka::media::MediaSample</a></div><divclass="ttdoc">Class to hold a media sample. </div><divclass="ttdef"><b>Definition:</b><ahref="../../dd/d80/media__sample_8h_source.html#l00022">media_sample.h:22</a></div></div>