307 lines
19 KiB
HTML
307 lines
19 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.6"/>
|
|
<title>DASH Media Packaging SDK: shaka::media::MediaParser 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/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)">
|
|
<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>
|
|
|
|
<!-- 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="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html">MediaParser</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-types">Public Types</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="../../d5/dfa/classshaka_1_1media_1_1MediaParser-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">shaka::media::MediaParser Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="dynheader">
|
|
Inheritance diagram for shaka::media::MediaParser:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="../../d3/d0a/classshaka_1_1media_1_1MediaParser.png" usemap="#shaka::media::MediaParser_map" alt=""/>
|
|
<map id="shaka::media::MediaParser_map" name="shaka::media::MediaParser_map">
|
|
<area href="../../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html" alt="shaka::media::mp2t::Mp2tMediaParser" shape="rect" coords="0,56,223,80"/>
|
|
<area href="../../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html" alt="shaka::media::mp4::MP4MediaParser" shape="rect" coords="233,56,456,80"/>
|
|
<area href="../../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html" alt="shaka::media::WebMMediaParser" shape="rect" coords="466,56,689,80"/>
|
|
<area href="../../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html" alt="shaka::media::WebVttMediaParser" shape="rect" coords="699,56,922,80"/>
|
|
<area href="../../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html" alt="shaka::media::wvm::WvmMediaParser" shape="rect" coords="932,56,1155,80"/>
|
|
</map>
|
|
</div></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
|
|
Public Types</h2></td></tr>
|
|
<tr class="memitem:a95d25a50ad371304f1abce9971ce3704"><td class="memItemLeft" align="right" valign="top">typedef base::Callback< void(const <br class="typebreak"/>
|
|
std::vector< scoped_refptr<br class="typebreak"/>
|
|
< <a class="el" href="../../d5/db1/classshaka_1_1media_1_1StreamInfo.html">StreamInfo</a> > > &stream_info)> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a95d25a50ad371304f1abce9971ce3704">InitCB</a></td></tr>
|
|
<tr class="separator:a95d25a50ad371304f1abce9971ce3704"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0ac13291317f7d3d9175c4e91e57b891"><td class="memItemLeft" align="right" valign="top">typedef base::Callback< bool(uint32_t <br class="typebreak"/>
|
|
track_id, const scoped_refptr<br class="typebreak"/>
|
|
< <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> > &media_sample)> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0ac13291317f7d3d9175c4e91e57b891">NewSampleCB</a></td></tr>
|
|
<tr class="separator:a0ac13291317f7d3d9175c4e91e57b891"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><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:adc7c91bebe75879abba91a56dae52153"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#adc7c91bebe75879abba91a56dae52153">Init</a> (const <a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a95d25a50ad371304f1abce9971ce3704">InitCB</a> &init_cb, const <a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0ac13291317f7d3d9175c4e91e57b891">NewSampleCB</a> &new_sample_cb, <a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html">KeySource</a> *decryption_key_source)=0</td></tr>
|
|
<tr class="separator:adc7c91bebe75879abba91a56dae52153"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a26752164d7e8ae6a9a894512291ad9cd"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a26752164d7e8ae6a9a894512291ad9cd">Flush</a> () WARN_UNUSED_RESULT=0</td></tr>
|
|
<tr class="separator:a26752164d7e8ae6a9a894512291ad9cd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0c85f3cb0591f67c036276be82a1ba9d"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0c85f3cb0591f67c036276be82a1ba9d">Parse</a> (const uint8_t *buf, int size) WARN_UNUSED_RESULT=0</td></tr>
|
|
<tr class="separator:a0c85f3cb0591f67c036276be82a1ba9d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock">
|
|
<p>Definition at line <a class="el" href="../../d7/d12/media__parser_8h_source.html#l00026">26</a> of file <a class="el" href="../../d7/d12/media__parser_8h_source.html">media_parser.h</a>.</p>
|
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
<a class="anchor" id="a95d25a50ad371304f1abce9971ce3704"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef base::Callback< void(const std::vector<scoped_refptr<<a class="el" href="../../d5/db1/classshaka_1_1media_1_1StreamInfo.html">StreamInfo</a>> >& stream_info)> <a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a95d25a50ad371304f1abce9971ce3704">shaka::media::MediaParser::InitCB</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Called upon completion of parser initialization. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">stream_info</td><td>contains the stream info of all the elementary streams within this file. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Definition at line <a class="el" href="../../d7/d12/media__parser_8h_source.html#l00035">35</a> of file <a class="el" href="../../d7/d12/media__parser_8h_source.html">media_parser.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a0ac13291317f7d3d9175c4e91e57b891"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef base::Callback<bool(uint32_t track_id, const scoped_refptr<<a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a>>& media_sample)> <a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0ac13291317f7d3d9175c4e91e57b891">shaka::media::MediaParser::NewSampleCB</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Called when a new media sample has been parsed. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">track_id</td><td>is the track id of the new sample. </td></tr>
|
|
<tr><td class="paramname">media_sample</td><td>is the new media sample. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if the sample is accepted, false if something was wrong with the sample and a parsing error should be signaled. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="../../d7/d12/media__parser_8h_source.html#l00044">44</a> of file <a class="el" href="../../d7/d12/media__parser_8h_source.html">media_parser.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a26752164d7e8ae6a9a894512291ad9cd"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool shaka::media::MediaParser::Flush </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Flush data currently in the parser and put the parser in a state where it can receive data for a new seek point. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if successful, false otherwise. </dd></dl>
|
|
|
|
<p>Implemented in <a class="el" href="../../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html#ac5680e3bd6cdb07fd65af3f39fce999a">shaka::media::wvm::WvmMediaParser</a>, <a class="el" href="../../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html#aa666cb1b9ee2ff940d9fc7efda4b50d7">shaka::media::WebVttMediaParser</a>, <a class="el" href="../../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html#a6f26e0d76aeda601fa87190901de27ea">shaka::media::mp4::MP4MediaParser</a>, <a class="el" href="../../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html#afdb1a88116e3347e67afeb7715847135">shaka::media::mp2t::Mp2tMediaParser</a>, and <a class="el" href="../../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html#a6c2d4b5b36304831e637f7ae1b9e54a2">shaka::media::WebMMediaParser</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="adc7c91bebe75879abba91a56dae52153"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void shaka::media::MediaParser::Init </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a95d25a50ad371304f1abce9971ce3704">InitCB</a> & </td>
|
|
<td class="paramname"><em>init_cb</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0ac13291317f7d3d9175c4e91e57b891">NewSampleCB</a> & </td>
|
|
<td class="paramname"><em>new_sample_cb</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="../../d1/d1f/classshaka_1_1media_1_1KeySource.html">KeySource</a> * </td>
|
|
<td class="paramname"><em>decryption_key_source</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Initialize the parser with necessary callbacks. Must be called before any data is passed to <a class="el" href="../../d3/d0a/classshaka_1_1media_1_1MediaParser.html#a0c85f3cb0591f67c036276be82a1ba9d">Parse()</a>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">init_cb</td><td>will be called once enough data has been parsed to determine the initial stream configurations. </td></tr>
|
|
<tr><td class="paramname">new_sample_cb</td><td>will be called each time a new media sample is available from the parser. May be NULL, and caller retains ownership. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Implemented in <a class="el" href="../../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html#a6f931f1702724a9b19c3078a7832bc77">shaka::media::wvm::WvmMediaParser</a>, <a class="el" href="../../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html#af6c0fb7de806cccd0e1f9dd92b5310f3">shaka::media::WebVttMediaParser</a>, <a class="el" href="../../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html#acc87b9752a7f6e8c739109acbc02b69d">shaka::media::mp4::MP4MediaParser</a>, <a class="el" href="../../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html#aa2aff12312827aacf2b7db6e2f792c52">shaka::media::mp2t::Mp2tMediaParser</a>, and <a class="el" href="../../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html#a5cd5c298938e2c58c45f962b21e43b2e">shaka::media::WebMMediaParser</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a0c85f3cb0591f67c036276be82a1ba9d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool shaka::media::MediaParser::Parse </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>buf</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>size</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Should be called when there is new data to parse. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if successful. </dd></dl>
|
|
|
|
<p>Implemented in <a class="el" href="../../dc/d18/classshaka_1_1media_1_1wvm_1_1WvmMediaParser.html#a246702aa75891cbe396ca7cc11e13eeb">shaka::media::wvm::WvmMediaParser</a>, <a class="el" href="../../dc/df2/classshaka_1_1media_1_1WebVttMediaParser.html#a5295c061b251726d1525cefc091101a2">shaka::media::WebVttMediaParser</a>, <a class="el" href="../../d7/dd5/classshaka_1_1media_1_1mp4_1_1MP4MediaParser.html#a4105cdbe5ece03071a17c06fb27699b0">shaka::media::mp4::MP4MediaParser</a>, <a class="el" href="../../d3/dc1/classshaka_1_1media_1_1mp2t_1_1Mp2tMediaParser.html#af1a8a33b4ce61777c876717b005d0026">shaka::media::mp2t::Mp2tMediaParser</a>, and <a class="el" href="../../d2/ddb/classshaka_1_1media_1_1WebMMediaParser.html#a40940ec01d965e3a78213861a93f7cfc">shaka::media::WebMMediaParser</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>media/base/<a class="el" href="../../d7/d12/media__parser_8h_source.html">media_parser.h</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Thu Aug 11 2016 22:33:22 for DASH Media Packaging SDK by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|