shaka-packager/docs/d1/d0a/classshaka_1_1media_1_1MkvW...

385 lines
20 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::MkvWriter 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="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html">MkvWriter</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d2/dfc/classshaka_1_1media_1_1MkvWriter-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">shaka::media::MkvWriter Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>An implementation of IMkvWriter using our <a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html" title="Define an abstract file interface. ">File</a> type.
<a href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="../../d2/dd6/mkv__writer_8h_source.html">mkv_writer.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for shaka::media::MkvWriter:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.png" usemap="#shaka::media::MkvWriter_map" alt=""/>
<map id="shaka::media::MkvWriter_map" name="shaka::media::MkvWriter_map">
</map>
</div></div>
<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:a9490dbf4bc02903484acb68f038f7fe2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a9490dbf4bc02903484acb68f038f7fe2">Open</a> (const std::string &amp;name)</td></tr>
<tr class="separator:a9490dbf4bc02903484acb68f038f7fe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af560b12e0298ca3dcd8f88fddff1443b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af560b12e0298ca3dcd8f88fddff1443b"></a>
<a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#af560b12e0298ca3dcd8f88fddff1443b">Close</a> ()</td></tr>
<tr class="memdesc:af560b12e0298ca3dcd8f88fddff1443b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the file. MUST call Open before calling any other methods. <br/></td></tr>
<tr class="separator:af560b12e0298ca3dcd8f88fddff1443b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2468514d1d9efdb15a9e4df2e44b75d8"><td class="memItemLeft" align="right" valign="top">mkvmuxer::int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a2468514d1d9efdb15a9e4df2e44b75d8">Write</a> (const void *buf, mkvmuxer::uint32 len) override</td></tr>
<tr class="separator:a2468514d1d9efdb15a9e4df2e44b75d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a468dcd83a7c087cc83e755703488e92b"><td class="memItemLeft" align="right" valign="top">mkvmuxer::int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a468dcd83a7c087cc83e755703488e92b">Position</a> () const override</td></tr>
<tr class="separator:a468dcd83a7c087cc83e755703488e92b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33db41e57d0ef5a35b7f929e1a1d90db"><td class="memItemLeft" align="right" valign="top">mkvmuxer::int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a33db41e57d0ef5a35b7f929e1a1d90db">Position</a> (mkvmuxer::int64 position) override</td></tr>
<tr class="separator:a33db41e57d0ef5a35b7f929e1a1d90db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d0429e7922752db3f01d43e6340465a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a8d0429e7922752db3f01d43e6340465a">Seekable</a> () const override</td></tr>
<tr class="separator:a8d0429e7922752db3f01d43e6340465a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6603ba573e802e660921f329192738f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a6603ba573e802e660921f329192738f3">ElementStartNotify</a> (mkvmuxer::uint64 element_id, mkvmuxer::int64 position) override</td></tr>
<tr class="separator:a6603ba573e802e660921f329192738f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab331684a758a93bf0c77fa224fe429ea"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#ab331684a758a93bf0c77fa224fe429ea">WriteFromFile</a> (<a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html">File</a> *source)</td></tr>
<tr class="separator:ab331684a758a93bf0c77fa224fe429ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dfac99ec5531ca2e102e5b145bb29ed"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d0a/classshaka_1_1media_1_1MkvWriter.html#a2dfac99ec5531ca2e102e5b145bb29ed">WriteFromFile</a> (<a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html">File</a> *source, int64_t max_copy)</td></tr>
<tr class="separator:a2dfac99ec5531ca2e102e5b145bb29ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18993fa04b1c02069e4a060de141538b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18993fa04b1c02069e4a060de141538b"></a>
<a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html">File</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>file</b> ()</td></tr>
<tr class="separator:a18993fa04b1c02069e4a060de141538b"><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>An implementation of IMkvWriter using our <a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html" title="Define an abstract file interface. ">File</a> type. </p>
<p>Definition at line <a class="el" href="../../d2/dd6/mkv__writer_8h_source.html#l00021">21</a> of file <a class="el" href="../../d2/dd6/mkv__writer_8h_source.html">mkv_writer.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6603ba573e802e660921f329192738f3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void shaka::media::MkvWriter::ElementStartNotify </td>
<td>(</td>
<td class="paramtype">mkvmuxer::uint64&#160;</td>
<td class="paramname"><em>element_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mkvmuxer::int64&#160;</td>
<td class="paramname"><em>position</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">override</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="../../de/da9/structshaka_1_1Element.html">Element</a> start notification. Called whenever an element identifier is about to be written to the stream. <em>element_id</em> is the element identifier, and <em>position</em> is the location in the WebM stream where the first octet of the element identifier will be written. Note: the |MkvId| enumeration in webmids.hpp defines element values. </p>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00090">90</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a9490dbf4bc02903484acb68f038f7fe2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d0/d93/classshaka_1_1media_1_1Status.html">Status</a> shaka::media::MkvWriter::Open </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Opens the given file for writing. This MUST be called before any other calls. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>The path to the file to open. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the operation succeeded. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00016">16</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a468dcd83a7c087cc83e755703488e92b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mkvmuxer::int64 shaka::media::MkvWriter::Position </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">override</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The offset of the output position from the beginning of the output. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00071">71</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a33db41e57d0ef5a35b7f929e1a1d90db"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mkvmuxer::int32 shaka::media::MkvWriter::Position </td>
<td>(</td>
<td class="paramtype">mkvmuxer::int64&#160;</td>
<td class="paramname"><em>position</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the current <a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html" title="Define an abstract file interface. ">File</a> position. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00075">75</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a8d0429e7922752db3f01d43e6340465a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool shaka::media::MkvWriter::Seekable </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">override</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if the writer is seekable. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00086">86</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a2468514d1d9efdb15a9e4df2e44b75d8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mkvmuxer::int32 shaka::media::MkvWriter::Write </td>
<td>(</td>
<td class="paramtype">const void *&#160;</td>
<td class="paramname"><em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mkvmuxer::uint32&#160;</td>
<td class="paramname"><em>len</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">override</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes out <em>len</em> bytes of <em>buf</em>. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00037">37</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="ab331684a758a93bf0c77fa224fe429ea"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t shaka::media::MkvWriter::WriteFromFile </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html">File</a> *&#160;</td>
<td class="paramname"><em>source</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the contents of the given file to this file. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written; or &lt; 0 on error. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00056">56</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a2dfac99ec5531ca2e102e5b145bb29ed"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int64_t shaka::media::MkvWriter::WriteFromFile </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d3/d61/classshaka_1_1media_1_1File.html">File</a> *&#160;</td>
<td class="paramname"><em>source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int64_t&#160;</td>
<td class="paramname"><em>max_copy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the contents of the given file to this file, up to a maximum number of bytes. If <em>max_copy</em> is negative, will copy to EOF. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written; or &lt; 0 on error. </dd></dl>
<p>Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00060">60</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>media/formats/webm/<a class="el" href="../../d2/dd6/mkv__writer_8h_source.html">mkv_writer.h</a></li>
<li>media/formats/webm/<a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Apr 19 2017 18:34: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>