shaka-packager/docs/d9/d66/classshaka_1_1media_1_1Pack...

297 lines
15 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: shaka::media::PackedAudioSegmenter Class Reference</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="../../d8/daf/namespaceshaka.html">shaka</a></li><li class="navelem"><b>media</b></li><li class="navelem"><a class="el" href="../../d9/d66/classshaka_1_1media_1_1PackedAudioSegmenter.html">PackedAudioSegmenter</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d1/d74/classshaka_1_1media_1_1PackedAudioSegmenter-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::media::PackedAudioSegmenter Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="../../d9/d2e/packed__audio__segmenter_8h_source.html">packed_audio_segmenter.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7cadce72cd6c52fd8564b79a5c328b9a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d66/classshaka_1_1media_1_1PackedAudioSegmenter.html#a7cadce72cd6c52fd8564b79a5c328b9a">PackedAudioSegmenter</a> (uint32_t transport_stream_timestamp_offset)</td></tr>
<tr class="separator:a7cadce72cd6c52fd8564b79a5c328b9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaca6b224a4fc198b4c7d599c1348d6c2"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d20/classshaka_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d66/classshaka_1_1media_1_1PackedAudioSegmenter.html#aaca6b224a4fc198b4c7d599c1348d6c2">Initialize</a> (const <a class="el" href="../../d5/db1/classshaka_1_1media_1_1StreamInfo.html">StreamInfo</a> &amp;stream_info)</td></tr>
<tr class="separator:aaca6b224a4fc198b4c7d599c1348d6c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac403002f18ebdecfbdcb0b6dd5b3da4e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d20/classshaka_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d66/classshaka_1_1media_1_1PackedAudioSegmenter.html#ac403002f18ebdecfbdcb0b6dd5b3da4e">AddSample</a> (const <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &amp;sample)</td></tr>
<tr class="separator:ac403002f18ebdecfbdcb0b6dd5b3da4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9e72b3ecdde3e2e200c2566a33e08c7"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d20/classshaka_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d66/classshaka_1_1media_1_1PackedAudioSegmenter.html#ad9e72b3ecdde3e2e200c2566a33e08c7">FinalizeSegment</a> ()</td></tr>
<tr class="separator:ad9e72b3ecdde3e2e200c2566a33e08c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae74956e5b79d0e74ecce440bd7849670"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d66/classshaka_1_1media_1_1PackedAudioSegmenter.html#ae74956e5b79d0e74ecce440bd7849670">TimescaleScale</a> () const</td></tr>
<tr class="separator:ae74956e5b79d0e74ecce440bd7849670"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a345a5117da1d4a34061f7293fdffd16d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d41/classshaka_1_1media_1_1BufferWriter.html">BufferWriter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d66/classshaka_1_1media_1_1PackedAudioSegmenter.html#a345a5117da1d4a34061f7293fdffd16d">segment_buffer</a> ()</td></tr>
<tr class="separator:a345a5117da1d4a34061f7293fdffd16d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implements packed audio segment writer. <a href="https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-3.4">https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-3.4</a> A Packed Audio Segment contains encoded audio samples and ID3 tags that are simply packed together with minimal framing and no per-sample timestamps. </p>
<p class="definition">Definition at line <a class="el" href="../../d9/d2e/packed__audio__segmenter_8h_source.html#l00040">40</a> of file <a class="el" href="../../d9/d2e/packed__audio__segmenter_8h_source.html">packed_audio_segmenter.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a7cadce72cd6c52fd8564b79a5c328b9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cadce72cd6c52fd8564b79a5c328b9a">&#9670;&nbsp;</a></span>PackedAudioSegmenter()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">shaka::media::PackedAudioSegmenter::PackedAudioSegmenter </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>transport_stream_timestamp_offset</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">transport_stream_timestamp_offset</td><td>is the offset to be applied to sample timestamps to compensate for possible negative timestamps in the input. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html#l00027">27</a> of file <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html">packed_audio_segmenter.cc</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac403002f18ebdecfbdcb0b6dd5b3da4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac403002f18ebdecfbdcb0b6dd5b3da4e">&#9670;&nbsp;</a></span>AddSample()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d2/d20/classshaka_1_1Status.html">Status</a> shaka::media::PackedAudioSegmenter::AddSample </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &amp;&#160;</td>
<td class="paramname"><em>sample</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sample</td><td>gets added to this object. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success. </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html#l00055">55</a> of file <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html">packed_audio_segmenter.cc</a>.</p>
</div>
</div>
<a id="ad9e72b3ecdde3e2e200c2566a33e08c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9e72b3ecdde3e2e200c2566a33e08c7">&#9670;&nbsp;</a></span>FinalizeSegment()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d2/d20/classshaka_1_1Status.html">Status</a> shaka::media::PackedAudioSegmenter::FinalizeSegment </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Flush all the samples that are (possibly) buffered and write them to the current segment. </p><dl class="section return"><dt>Returns</dt><dd>OK on success. </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html#l00076">76</a> of file <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html">packed_audio_segmenter.cc</a>.</p>
</div>
</div>
<a id="aaca6b224a4fc198b4c7d599c1348d6c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaca6b224a4fc198b4c7d599c1348d6c2">&#9670;&nbsp;</a></span>Initialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d2/d20/classshaka_1_1Status.html">Status</a> shaka::media::PackedAudioSegmenter::Initialize </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="../../d5/db1/classshaka_1_1media_1_1StreamInfo.html">StreamInfo</a> &amp;&#160;</td>
<td class="paramname"><em>stream_info</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the object. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stream_info</td><td>is the stream info for the segmenter. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OK on success. </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html#l00033">33</a> of file <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html">packed_audio_segmenter.cc</a>.</p>
</div>
</div>
<a id="a345a5117da1d4a34061f7293fdffd16d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a345a5117da1d4a34061f7293fdffd16d">&#9670;&nbsp;</a></span>segment_buffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../dc/d41/classshaka_1_1media_1_1BufferWriter.html">BufferWriter</a>* shaka::media::PackedAudioSegmenter::segment_buffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>A pointer to the buffer for the current segment. </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d9/d2e/packed__audio__segmenter_8h_source.html#l00071">71</a> of file <a class="el" href="../../d9/d2e/packed__audio__segmenter_8h_source.html">packed_audio_segmenter.h</a>.</p>
</div>
</div>
<a id="ae74956e5b79d0e74ecce440bd7849670"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae74956e5b79d0e74ecce440bd7849670">&#9670;&nbsp;</a></span>TimescaleScale()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double shaka::media::PackedAudioSegmenter::TimescaleScale </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The scale for converting timestamp in input stream's scale to output stream's scale. </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html#l00081">81</a> of file <a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html">packed_audio_segmenter.cc</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>packager/media/formats/packed_audio/<a class="el" href="../../d9/d2e/packed__audio__segmenter_8h_source.html">packed_audio_segmenter.h</a></li>
<li>packager/media/formats/packed_audio/<a class="el" href="../../d5/d51/packed__audio__segmenter_8cc_source.html">packed_audio_segmenter.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Aug 20 2018 10:47:01 for Shaka Packager SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>