shaka-packager/docs/d7/d6d/classshaka_1_1media_1_1Medi...

455 lines
30 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::MediaSample 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&#160;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&#160;List</span></a></li>
<li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="../../hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="../../functions.html"><span>Class&#160;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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</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="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="../../df/d1c/classshaka_1_1media_1_1MediaSample-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::media::MediaSample Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Class to hold a media sample.
<a href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="../../dd/d80/media__sample_8h_source.html">media_sample.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:a5ce916afdefd3d1410f8e003d7118f8b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ce916afdefd3d1410f8e003d7118f8b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>MediaSample</b> (const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)</td></tr>
<tr class="separator:a5ce916afdefd3d1410f8e003d7118f8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52a0b18aec839de422c4e3e2df9734c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a52a0b18aec839de422c4e3e2df9734c9"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>dts</b> () const </td></tr>
<tr class="separator:a52a0b18aec839de422c4e3e2df9734c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a282f6c6f514e5500d7c601b456b02ff2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a282f6c6f514e5500d7c601b456b02ff2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_dts</b> (int64_t dts)</td></tr>
<tr class="separator:a282f6c6f514e5500d7c601b456b02ff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52612867901b81c2f9c1996e2258e3c6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a52612867901b81c2f9c1996e2258e3c6"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>pts</b> () const </td></tr>
<tr class="separator:a52612867901b81c2f9c1996e2258e3c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a766027345233f30a6ab105a0f812c9d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a766027345233f30a6ab105a0f812c9d4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_pts</b> (int64_t pts)</td></tr>
<tr class="separator:a766027345233f30a6ab105a0f812c9d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8a9942bf423d9a05bf9e39c1dbbfbda"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae8a9942bf423d9a05bf9e39c1dbbfbda"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>duration</b> () const </td></tr>
<tr class="separator:ae8a9942bf423d9a05bf9e39c1dbbfbda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31af3b3d7e02720b8b2430fb35be617a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31af3b3d7e02720b8b2430fb35be617a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_duration</b> (int64_t duration)</td></tr>
<tr class="separator:a31af3b3d7e02720b8b2430fb35be617a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad58500bfdbf703d94dab6aa9b1162831"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad58500bfdbf703d94dab6aa9b1162831"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>is_key_frame</b> () const </td></tr>
<tr class="separator:ad58500bfdbf703d94dab6aa9b1162831"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba7a2de6a183c899fae91f81a6874a5c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba7a2de6a183c899fae91f81a6874a5c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>is_encrypted</b> () const </td></tr>
<tr class="separator:aba7a2de6a183c899fae91f81a6874a5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27439e29f5da14831623e21a1f052948"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27439e29f5da14831623e21a1f052948"></a>
const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><b>data</b> () const </td></tr>
<tr class="separator:a27439e29f5da14831623e21a1f052948"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaab63d221349ecf4c0565d09f3b081f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaaab63d221349ecf4c0565d09f3b081f"></a>
uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><b>writable_data</b> ()</td></tr>
<tr class="separator:aaaab63d221349ecf4c0565d09f3b081f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af33286b61bff7af2a34ac999dcb66dda"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af33286b61bff7af2a34ac999dcb66dda"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>data_size</b> () const </td></tr>
<tr class="separator:af33286b61bff7af2a34ac999dcb66dda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fe627a85ca658b35e13246f44db9f47"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7fe627a85ca658b35e13246f44db9f47"></a>
const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><b>side_data</b> () const </td></tr>
<tr class="separator:a7fe627a85ca658b35e13246f44db9f47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31d907c69912212fd03c8a4a578955c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31d907c69912212fd03c8a4a578955c1"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>side_data_size</b> () const </td></tr>
<tr class="separator:a31d907c69912212fd03c8a4a578955c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ca652d922f5af1b74e36fe46950b8c7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ca652d922f5af1b74e36fe46950b8c7"></a>
const <a class="el" href="../../de/d49/classshaka_1_1media_1_1DecryptConfig.html">DecryptConfig</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>decrypt_config</b> () const </td></tr>
<tr class="separator:a9ca652d922f5af1b74e36fe46950b8c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34de7f4cc638cdc6b8a383ebff78d7ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a34de7f4cc638cdc6b8a383ebff78d7ca"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_data</b> (const uint8_t *data, const size_t data_size)</td></tr>
<tr class="separator:a34de7f4cc638cdc6b8a383ebff78d7ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99730eda92b89bbca7a8cd26b6b71b12"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99730eda92b89bbca7a8cd26b6b71b12"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>resize_data</b> (const size_t data_size)</td></tr>
<tr class="separator:a99730eda92b89bbca7a8cd26b6b71b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99ffbe5854478e1acd3f324b91801091"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99ffbe5854478e1acd3f324b91801091"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_is_key_frame</b> (bool value)</td></tr>
<tr class="separator:a99ffbe5854478e1acd3f324b91801091"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c7cb12233fb08f48f08ac175468db54"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c7cb12233fb08f48f08ac175468db54"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_is_encrypted</b> (bool value)</td></tr>
<tr class="separator:a8c7cb12233fb08f48f08ac175468db54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18a97b2d0901174672b6d7708cdcaf26"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18a97b2d0901174672b6d7708cdcaf26"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_decrypt_config</b> (std::unique_ptr&lt; <a class="el" href="../../de/d49/classshaka_1_1media_1_1DecryptConfig.html">DecryptConfig</a> &gt; decrypt_config)</td></tr>
<tr class="separator:a18a97b2d0901174672b6d7708cdcaf26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed890fbb315df801ab6ca3b7afb8a40a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed890fbb315df801ab6ca3b7afb8a40a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>end_of_stream</b> () const </td></tr>
<tr class="separator:aed890fbb315df801ab6ca3b7afb8a40a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad91f335c15b666edc29fdfbea1270f67"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad91f335c15b666edc29fdfbea1270f67"></a>
const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>config_id</b> () const </td></tr>
<tr class="separator:ad91f335c15b666edc29fdfbea1270f67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6217d289829ab91c85be82d8f8bdfbab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6217d289829ab91c85be82d8f8bdfbab"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>set_config_id</b> (const std::string &amp;config_id)</td></tr>
<tr class="separator:a6217d289829ab91c85be82d8f8bdfbab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3cbd9fee3a228403c3128be5141a614"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#aa3cbd9fee3a228403c3128be5141a614">ToString</a> () const </td></tr>
<tr class="separator:aa3cbd9fee3a228403c3128be5141a614"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ad8975dbb21747ff32c8604f5489bf5c9"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#ad8975dbb21747ff32c8604f5489bf5c9">CopyFrom</a> (const uint8_t *data, size_t size, bool is_key_frame)</td></tr>
<tr class="separator:ad8975dbb21747ff32c8604f5489bf5c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a910e68f46b9464e4ea36cf9cd5116b55"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a910e68f46b9464e4ea36cf9cd5116b55">CopyFrom</a> (const uint8_t *data, size_t size, const uint8_t *side_data, size_t side_data_size, bool is_key_frame)</td></tr>
<tr class="separator:a910e68f46b9464e4ea36cf9cd5116b55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a311a7302af6405531ebafa04d877d160"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a311a7302af6405531ebafa04d877d160">CopyFrom</a> (const <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &amp;media_sample)</td></tr>
<tr class="separator:a311a7302af6405531ebafa04d877d160"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c70ae863851c7a1066923cf387fb178"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a8c70ae863851c7a1066923cf387fb178">FromMetadata</a> (const uint8_t *metadata, size_t metadata_size)</td></tr>
<tr class="separator:a8c70ae863851c7a1066923cf387fb178"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a7f8d79f9ec3cd3df9a395eef71f0c6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a7f8d79f9ec3cd3df9a395eef71f0c6"></a>
static std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a4a7f8d79f9ec3cd3df9a395eef71f0c6">CreateEmptyMediaSample</a> ()</td></tr>
<tr class="memdesc:a4a7f8d79f9ec3cd3df9a395eef71f0c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html" title="Class to hold a media sample. ">MediaSample</a> object with default members. <br/></td></tr>
<tr class="separator:a4a7f8d79f9ec3cd3df9a395eef71f0c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a236e80a98d7f22ec585bbbf2e91397f5"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html#a236e80a98d7f22ec585bbbf2e91397f5">CreateEOSBuffer</a> ()</td></tr>
<tr class="separator:a236e80a98d7f22ec585bbbf2e91397f5"><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>Class to hold a media sample. </p>
<p>Definition at line <a class="el" href="../../dd/d80/media__sample_8h_source.html#l00022">22</a> of file <a class="el" href="../../dd/d80/media__sample_8h_source.html">media_sample.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad8975dbb21747ff32c8604f5489bf5c9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::shared_ptr&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt; shaka::media::MediaSample::CopyFrom </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">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_key_frame</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html" title="Class to hold a media sample. ">MediaSample</a> object from input. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>points to the buffer containing the sample data. Must not be NULL. </td></tr>
<tr><td class="paramname">size</td><td>indicates sample size in bytes. Must not be negative. </td></tr>
<tr><td class="paramname">is_key_frame</td><td>indicates whether the sample is a key frame. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../d8/d0d/media__sample_8cc_source.html#l00045">45</a> of file <a class="el" href="../../d8/d0d/media__sample_8cc_source.html">media_sample.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a910e68f46b9464e4ea36cf9cd5116b55"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::shared_ptr&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt; shaka::media::MediaSample::CopyFrom </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">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>side_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>side_data_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_key_frame</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html" title="Class to hold a media sample. ">MediaSample</a> object from input. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>points to the buffer containing the sample data. Must not be NULL. </td></tr>
<tr><td class="paramname">side_data</td><td>points to the buffer containing the additional data. Some containers allow additional data to be specified. Must not be NULL. </td></tr>
<tr><td class="paramname">size</td><td>indicates sample size in bytes. Must not be negative. </td></tr>
<tr><td class="paramname">side_data_size</td><td>indicates additional sample data size in bytes. </td></tr>
<tr><td class="paramname">is_key_frame</td><td>indicates whether the sample is a key frame. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../d8/d0d/media__sample_8cc_source.html#l00055">55</a> of file <a class="el" href="../../d8/d0d/media__sample_8cc_source.html">media_sample.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a311a7302af6405531ebafa04d877d160"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::shared_ptr&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt; shaka::media::MediaSample::CopyFrom </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>media_sample</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Make a copy of <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html" title="Class to hold a media sample. ">MediaSample</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">media_sample</td><td>is the source <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html" title="Class to hold a media sample. ">MediaSample</a> to copy from. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../d8/d0d/media__sample_8cc_source.html#l00067">67</a> of file <a class="el" href="../../d8/d0d/media__sample_8cc_source.html">media_sample.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a236e80a98d7f22ec585bbbf2e91397f5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::shared_ptr&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt; shaka::media::MediaSample::CreateEOSBuffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html" title="Class to hold a media sample. ">MediaSample</a> indicating we've reached end of stream. Calling any method other than end_of_stream() on the resulting buffer is disallowed. </p>
<p>Definition at line <a class="el" href="../../d8/d0d/media__sample_8cc_source.html#l00105">105</a> of file <a class="el" href="../../d8/d0d/media__sample_8cc_source.html">media_sample.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a8c70ae863851c7a1066923cf387fb178"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::shared_ptr&lt; <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html">MediaSample</a> &gt; shaka::media::MediaSample::FromMetadata </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>metadata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>metadata_size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a <a class="el" href="../../d7/d6d/classshaka_1_1media_1_1MediaSample.html" title="Class to hold a media sample. ">MediaSample</a> object from metadata. Unlike other factory methods, this cannot be a key frame. It must be only for metadata. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">metadata</td><td>points to the buffer containing metadata. Must not be NULL. </td></tr>
<tr><td class="paramname">metadata_size</td><td>is the size of metadata in bytes. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="../../d8/d0d/media__sample_8cc_source.html#l00093">93</a> of file <a class="el" href="../../d8/d0d/media__sample_8cc_source.html">media_sample.cc</a>.</p>
</div>
</div>
<a class="anchor" id="aa3cbd9fee3a228403c3128be5141a614"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string shaka::media::MediaSample::ToString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>a human-readable string describing |*this|. </dd></dl>
<p>Definition at line <a class="el" href="../../d8/d0d/media__sample_8cc_source.html#l00109">109</a> of file <a class="el" href="../../d8/d0d/media__sample_8cc_source.html">media_sample.cc</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>media/base/<a class="el" href="../../dd/d80/media__sample_8h_source.html">media_sample.h</a></li>
<li>media/base/<a class="el" href="../../d8/d0d/media__sample_8cc_source.html">media_sample.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 14 2017 22:09:13 for DASH Media Packaging SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>