shaka-packager/docs/d7/dda/classshaka_1_1media_1_1Byte...

168 lines
9.5 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: shaka::media::ByteQueue 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.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;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&amp;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="../../d8/daf/namespaceshaka.html">shaka</a></li><li class="navelem"><b>media</b></li><li class="navelem"><a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html">ByteQueue</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d1/d9d/classshaka_1_1media_1_1ByteQueue-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::media::ByteQueue Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="../../d7/dc6/byte__queue_8h_source.html">byte_queue.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:ab1659ef71098c37e9fb4e55ab1664e84"><td class="memItemLeft" align="right" valign="top"><a id="ab1659ef71098c37e9fb4e55ab1664e84"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#ab1659ef71098c37e9fb4e55ab1664e84">Reset</a> ()</td></tr>
<tr class="memdesc:ab1659ef71098c37e9fb4e55ab1664e84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the queue to the empty state. <br /></td></tr>
<tr class="separator:ab1659ef71098c37e9fb4e55ab1664e84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acea792e406efe5119cec2e3e522e02c2"><td class="memItemLeft" align="right" valign="top"><a id="acea792e406efe5119cec2e3e522e02c2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#acea792e406efe5119cec2e3e522e02c2">Push</a> (const uint8_t *data, int size)</td></tr>
<tr class="memdesc:acea792e406efe5119cec2e3e522e02c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append new bytes to the end of the queue. <br /></td></tr>
<tr class="separator:acea792e406efe5119cec2e3e522e02c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8565a6999f73f210ad2ac2e2ee5ada0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#a8565a6999f73f210ad2ac2e2ee5ada0e">Peek</a> (const uint8_t **data, int *size) const</td></tr>
<tr class="separator:a8565a6999f73f210ad2ac2e2ee5ada0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31b30d39d14fca3ce722b4233de95c79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#a31b30d39d14fca3ce722b4233de95c79">Pop</a> (int count)</td></tr>
<tr class="separator:a31b30d39d14fca3ce722b4233de95c79"><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>Represents a queue of bytes. Data is added to the end of the queue via an <a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#acea792e406efe5119cec2e3e522e02c2" title="Append new bytes to the end of the queue.">Push()</a> and removed via <a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#a31b30d39d14fca3ce722b4233de95c79">Pop()</a>. The contents of the queue can be observed via the <a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#a8565a6999f73f210ad2ac2e2ee5ada0e">Peek()</a> method. This class manages the underlying storage of the queue and tries to minimize the number of buffer copies when data is appended and removed. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/dc6/byte__queue_8h_source.html#l00022">22</a> of file <a class="el" href="../../d7/dc6/byte__queue_8h_source.html">byte_queue.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a8565a6999f73f210ad2ac2e2ee5ada0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8565a6999f73f210ad2ac2e2ee5ada0e">&#9670;&nbsp;</a></span>Peek()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void shaka::media::ByteQueue::Peek </td>
<td>(</td>
<td class="paramtype">const uint8_t **&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a pointer to the front of the queue and the queue size. These values are only valid until the next <a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#acea792e406efe5119cec2e3e522e02c2" title="Append new bytes to the end of the queue.">Push()</a> or <a class="el" href="../../d7/dda/classshaka_1_1media_1_1ByteQueue.html#a31b30d39d14fca3ce722b4233de95c79">Pop()</a> call. </p>
<p class="definition">Definition at line <a class="el" href="../../d7/df9/byte__queue_8cc_source.html#l00062">62</a> of file <a class="el" href="../../d7/df9/byte__queue_8cc_source.html">byte_queue.cc</a>.</p>
</div>
</div>
<a id="a31b30d39d14fca3ce722b4233de95c79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31b30d39d14fca3ce722b4233de95c79">&#9670;&nbsp;</a></span>Pop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void shaka::media::ByteQueue::Pop </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove a number of bytes from the front of the queue. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">count</td><td>specifies number of bytes to be popped. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d7/df9/byte__queue_8cc_source.html#l00069">69</a> of file <a class="el" href="../../d7/df9/byte__queue_8cc_source.html">byte_queue.cc</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>packager/media/base/<a class="el" href="../../d7/dc6/byte__queue_8h_source.html">byte_queue.h</a></li>
<li>packager/media/base/<a class="el" href="../../d7/df9/byte__queue_8cc_source.html">byte_queue.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 22 2021 00:16:05 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.17
</small></address>
</body>
</html>