2015-10-16 00:33:37 +00:00
<!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.6" / >
2016-05-24 23:43:16 +00:00
< title > DASH Media Packaging SDK: shaka::media::IoCache Class Reference< / title >
2015-10-16 00:33:37 +00:00
< 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/search.js" > < / script >
< script type = "text/javascript" >
$(document).ready(function() { searchBox.OnSelectItem(0); });
< / 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 style = "padding-left: 0.5em;" >
< div id = "projectname" > DASH Media Packaging SDK
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
< script type = "text/javascript" >
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
< / script >
< div id = "navrow1" class = "tabs" >
< ul class = "tablist" >
< li > < a href = "../../index.html" > < span > Main  Page< / span > < / a > < / li >
< li > < a href = "../../namespaces.html" > < span > Namespaces< / span > < / a > < / li >
< li class = "current" > < a href = "../../annotated.html" > < span > Classes< / span > < / a > < / li >
< li > < a href = "../../files.html" > < span > Files< / span > < / a > < / li >
< li >
< div id = "MSearchBox" class = "MSearchBoxInactive" >
< span class = "left" >
< img id = "MSearchSelect" src = "../../search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
< input type = "text" id = "MSearchField" value = "Search" accesskey = "S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
< / span > < span class = "right" >
< a id = "MSearchClose" href = "javascript:searchBox.CloseResultsWindow()" > < img id = "MSearchCloseImg" border = "0" src = "../../search/close.png" alt = "" / > < / a >
< / span >
< / div >
< / li >
< / ul >
< / div >
< div id = "navrow2" class = "tabs2" >
< ul class = "tablist" >
< li > < a href = "../../annotated.html" > < span > Class  List< / span > < / a > < / li >
< li > < a href = "../../classes.html" > < span > Class  Index< / span > < / a > < / li >
< li > < a href = "../../hierarchy.html" > < span > Class  Hierarchy< / span > < / a > < / li >
< li > < a href = "../../functions.html" > < span > Class  Members< / span > < / a > < / li >
< / ul >
< / div >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
2016-05-11 18:03:07 +00:00
< a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(0)" > < span class = "SelectionMark" >   < / span > All< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(1)" > < span class = "SelectionMark" >   < / span > Classes< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(2)" > < span class = "SelectionMark" >   < / span > Namespaces< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(3)" > < span class = "SelectionMark" >   < / span > Functions< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(4)" > < span class = "SelectionMark" >   < / span > Variables< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(5)" > < span class = "SelectionMark" >   < / span > Typedefs< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(6)" > < span class = "SelectionMark" >   < / span > Enumerations< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(7)" > < span class = "SelectionMark" >   < / span > Enumerator< / a > < / div >
2015-10-16 00:33:37 +00:00
<!-- 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 >
2016-05-24 23:43:16 +00:00
< 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 = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html" > IoCache< / a > < / li > < / ul >
2015-10-16 00:33:37 +00:00
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
2016-05-24 23:43:16 +00:00
< a href = "../../dc/d02/classshaka_1_1media_1_1IoCache-members.html" > List of all members< / a > < / div >
2015-10-16 00:33:37 +00:00
< div class = "headertitle" >
2016-05-24 23:43:16 +00:00
< div class = "title" > shaka::media::IoCache Class Reference< / div > < / div >
2015-10-16 00:33:37 +00:00
< / div > <!-- header -->
< div class = "contents" >
< p > Declaration of class which implements a thread-safe circular buffer.
2016-05-24 23:43:16 +00:00
< a href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#details" > More...< / a > < / p >
2015-10-16 00:33:37 +00:00
< p > < code > #include < < a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > > < / 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 >
2016-05-24 23:43:16 +00:00
< tr class = "memitem:ad13b2eaa49737433eec0abece242df06" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ad13b2eaa49737433eec0abece242df06" > < / a >
2015-10-16 00:33:37 +00:00
  < / td > < td class = "memItemRight" valign = "bottom" > < b > IoCache< / b > (uint64_t cache_size)< / td > < / tr >
2016-05-24 23:43:16 +00:00
< tr class = "separator:ad13b2eaa49737433eec0abece242df06" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a3cb864f866af25f0ff92c367946b0945" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#a3cb864f866af25f0ff92c367946b0945" > Read< / a > (void *buffer, uint64_t size)< / td > < / tr >
< tr class = "separator:a3cb864f866af25f0ff92c367946b0945" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0349796209c24a99bfe3c1bfdafb1d28" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#a0349796209c24a99bfe3c1bfdafb1d28" > Write< / a > (const void *buffer, uint64_t size)< / td > < / tr >
< tr class = "separator:a0349796209c24a99bfe3c1bfdafb1d28" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a29080034b90671628ea681e10ea92a48" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a29080034b90671628ea681e10ea92a48" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#a29080034b90671628ea681e10ea92a48" > Clear< / a > ()< / td > < / tr >
< tr class = "memdesc:a29080034b90671628ea681e10ea92a48" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Empties the cache. < br / > < / td > < / tr >
< tr class = "separator:a29080034b90671628ea681e10ea92a48" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a23dfcb4d031d76e980e41d1b1bec7112" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#a23dfcb4d031d76e980e41d1b1bec7112" > Close< / a > ()< / td > < / tr >
< tr class = "separator:a23dfcb4d031d76e980e41d1b1bec7112" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:adc8aa1afaa3d4ef689e7f2b9ab0e5135" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#adc8aa1afaa3d4ef689e7f2b9ab0e5135" > closed< / a > ()< / td > < / tr >
< tr class = "separator:adc8aa1afaa3d4ef689e7f2b9ab0e5135" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae751faea047196ba2770f5bf90649185" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ae751faea047196ba2770f5bf90649185" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#ae751faea047196ba2770f5bf90649185" > Reopen< / a > ()< / td > < / tr >
< tr class = "memdesc:ae751faea047196ba2770f5bf90649185" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Reopens the cache. Any data still in the cache will be lost. < br / > < / td > < / tr >
< tr class = "separator:ae751faea047196ba2770f5bf90649185" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a385baed04dd0cc0d3dca20d78f61559f" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#a385baed04dd0cc0d3dca20d78f61559f" > BytesCached< / a > ()< / td > < / tr >
< tr class = "separator:a385baed04dd0cc0d3dca20d78f61559f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a74e1d7369afe4f03c551b6e67ec82ee9" > < td class = "memItemLeft" align = "right" valign = "top" > uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#a74e1d7369afe4f03c551b6e67ec82ee9" > BytesFree< / a > ()< / td > < / tr >
< tr class = "separator:a74e1d7369afe4f03c551b6e67ec82ee9" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a841a082bfd88280a4ea00ac1a9e64dac" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a841a082bfd88280a4ea00ac1a9e64dac" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../dd/d7c/classshaka_1_1media_1_1IoCache.html#a841a082bfd88280a4ea00ac1a9e64dac" > WaitUntilEmptyOrClosed< / a > ()< / td > < / tr >
< tr class = "memdesc:a841a082bfd88280a4ea00ac1a9e64dac" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Waits until the cache is empty or has been closed. < br / > < / td > < / tr >
< tr class = "separator:a841a082bfd88280a4ea00ac1a9e64dac" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2015-10-16 00:33:37 +00:00
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Declaration of class which implements a thread-safe circular buffer. < / p >
< p > Definition at line < a class = "el" href = "../../d3/d19/io__cache_8h_source.html#l00020" > 20< / a > of file < a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > .< / p >
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
2016-05-24 23:43:16 +00:00
< a class = "anchor" id = "a385baed04dd0cc0d3dca20d78f61559f" > < / a >
2015-10-16 00:33:37 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2016-05-24 23:43:16 +00:00
< td class = "memname" > uint64_t shaka::media::IoCache::BytesCached < / td >
2015-10-16 00:33:37 +00:00
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns the number of bytes in the cache. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > the number of bytes in the cache. < / dd > < / dl >
2016-08-19 23:43:16 +00:00
< p > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00127" > 127< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2015-10-16 00:33:37 +00:00
< / div >
< / div >
2016-05-24 23:43:16 +00:00
< a class = "anchor" id = "a74e1d7369afe4f03c551b6e67ec82ee9" > < / a >
2015-10-16 00:33:37 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2016-05-24 23:43:16 +00:00
< td class = "memname" > uint64_t shaka::media::IoCache::BytesFree < / td >
2015-10-16 00:33:37 +00:00
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Returns the number of free bytes in the cache. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > the number of free bytes in the cache. < / dd > < / dl >
2016-08-19 23:43:16 +00:00
< p > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00132" > 132< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2015-10-16 00:33:37 +00:00
< / div >
< / div >
2016-05-24 23:43:16 +00:00
< a class = "anchor" id = "a23dfcb4d031d76e980e41d1b1bec7112" > < / a >
2015-10-16 00:33:37 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2016-05-24 23:43:16 +00:00
< td class = "memname" > void shaka::media::IoCache::Close < / td >
2015-10-16 00:33:37 +00:00
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2015-10-20 16:47:33 +00:00
< p > Close the cache. This will call any blocking calls to unblock, and the cache won't be usable until Reopened. < / p >
2015-10-16 00:33:37 +00:00
2016-08-19 23:43:16 +00:00
< p > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00111" > 111< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2015-10-20 16:47:33 +00:00
< / div >
< / div >
2016-05-24 23:43:16 +00:00
< a class = "anchor" id = "adc8aa1afaa3d4ef689e7f2b9ab0e5135" > < / a >
2015-10-20 16:47:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
2016-05-24 23:43:16 +00:00
< td class = "memname" > bool shaka::media::IoCache::closed < / td >
2015-10-20 16:47:33 +00:00
< 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 > true if the cache is closed, false otherwise. < / dd > < / dl >
< p > Definition at line < a class = "el" href = "../../d3/d19/io__cache_8h_source.html#l00050" > 50< / a > of file < a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > .< / p >
2015-10-16 00:33:37 +00:00
< / div >
< / div >
2016-05-24 23:43:16 +00:00
< a class = "anchor" id = "a3cb864f866af25f0ff92c367946b0945" > < / a >
2015-10-16 00:33:37 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2016-05-24 23:43:16 +00:00
< td class = "memname" > uint64_t shaka::media::IoCache::Read < / td >
2015-10-16 00:33:37 +00:00
< td > (< / td >
< td class = "paramtype" > void *  < / td >
< td class = "paramname" > < em > buffer< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint64_t  < / td >
< td class = "paramname" > < em > size< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Read data from the cache. This function may block until there is data in the cache. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > buffer< / td > < td > is a buffer into which to read the data from the cache. < / td > < / tr >
< tr > < td class = "paramname" > size< / td > < td > is the size of < em > buffer< / em > . < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > the number of bytes read into < em > buffer< / em > , or 0 if the call unblocked because the cache has been closed and is empty. < / dd > < / dl >
2016-08-19 23:43:16 +00:00
< p > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00040" > 40< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2015-10-16 00:33:37 +00:00
< / div >
< / div >
2016-05-24 23:43:16 +00:00
< a class = "anchor" id = "a0349796209c24a99bfe3c1bfdafb1d28" > < / a >
2015-10-16 00:33:37 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2016-05-24 23:43:16 +00:00
< td class = "memname" > uint64_t shaka::media::IoCache::Write < / td >
2015-10-16 00:33:37 +00:00
< td > (< / td >
< td class = "paramtype" > const void *  < / td >
< td class = "paramname" > < em > buffer< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint64_t  < / td >
< td class = "paramname" > < em > size< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Write data to the cache. This function may block until there is enough room in the cache. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > buffer< / td > < td > is a buffer containing the data to be written to the cache. < / td > < / tr >
< tr > < td class = "paramname" > size< / td > < td > is the size of the data to be written to the cache. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > the amount of data written to the buffer (which will equal < em > data< / em > ), or 0 if the call unblocked because the cache has been closed. < / dd > < / dl >
2016-08-19 23:43:16 +00:00
< p > Definition at line < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html#l00068" > 68< / a > of file < a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > .< / p >
2015-10-16 00:33:37 +00:00
< / div >
< / div >
< hr / > The documentation for this class was generated from the following files:< ul >
< li > media/file/< a class = "el" href = "../../d3/d19/io__cache_8h_source.html" > io_cache.h< / a > < / li >
< li > media/file/< a class = "el" href = "../../d4/d37/io__cache_8cc_source.html" > io_cache.cc< / a > < / li >
< / ul >
< / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
2016-08-23 20:33:23 +00:00
Generated on Tue Aug 23 2016 20:33:17 for DASH Media Packaging SDK by   < a href = "http://www.doxygen.org/index.html" >
2015-10-16 00:33:37 +00:00
< img class = "footer" src = "../../doxygen.png" alt = "doxygen" / >
< / a > 1.8.6
< / small > < / address >
< / body >
< / html >