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

372 lines
19 KiB
HTML
Raw Normal View History

<!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"/>
2018-02-10 23:37:42 +00:00
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Shaka Packager 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"/>
2018-02-10 23:37:42 +00:00
<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;">
2018-02-10 23:37:42 +00:00
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Shaka Packager SDK
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
2018-02-10 23:37:42 +00:00
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
2018-02-10 23:37:42 +00:00
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</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)">
2018-02-10 23:37:42 +00:00
</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/d73/classshaka_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="../../d2/d20/classshaka_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>
2018-02-10 23:37:42 +00:00
<tr class="memitem:af560b12e0298ca3dcd8f88fddff1443b"><td class="memItemLeft" align="right" valign="top"><a id="af560b12e0298ca3dcd8f88fddff1443b"></a>
<a class="el" href="../../d2/d20/classshaka_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>
2018-02-10 23:37:42 +00:00
<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/d73/classshaka_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/d73/classshaka_1_1File.html">File</a> *source, int64_t max_copy)</td></tr>
<tr class="separator:a2dfac99ec5531ca2e102e5b145bb29ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
2018-02-10 23:37:42 +00:00
<tr class="memitem:a18993fa04b1c02069e4a060de141538b"><td class="memItemLeft" align="right" valign="top"><a id="a18993fa04b1c02069e4a060de141538b"></a>
<a class="el" href="../../d3/d73/classshaka_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/d73/classshaka_1_1File.html" title="Define an abstract file interface. ">File</a> type. </p>
2018-02-10 23:37:42 +00:00
<p class="definition">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>
2018-02-10 23:37:42 +00:00
<a id="a6603ba573e802e660921f329192738f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6603ba573e802e660921f329192738f3">&#9670;&nbsp;</a></span>ElementStartNotify()</h2>
<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>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00093">93</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a9490dbf4bc02903484acb68f038f7fe2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9490dbf4bc02903484acb68f038f7fe2">&#9670;&nbsp;</a></span>Open()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d2/d20/classshaka_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">
2018-02-10 23:37:42 +00:00
<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>
2018-02-10 23:37:42 +00:00
<p class="definition">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>
2018-02-10 23:37:42 +00:00
<a id="a468dcd83a7c087cc83e755703488e92b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a468dcd83a7c087cc83e755703488e92b">&#9670;&nbsp;</a></span>Position() <span class="overload">[1/2]</span></h2>
<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>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00074">74</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a33db41e57d0ef5a35b7f929e1a1d90db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33db41e57d0ef5a35b7f929e1a1d90db">&#9670;&nbsp;</a></span>Position() <span class="overload">[2/2]</span></h2>
<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">
2018-02-10 23:37:42 +00:00
<p>Set the current <a class="el" href="../../d3/d73/classshaka_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>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00078">78</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a8d0429e7922752db3f01d43e6340465a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d0429e7922752db3f01d43e6340465a">&#9670;&nbsp;</a></span>Seekable()</h2>
<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>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00089">89</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a2468514d1d9efdb15a9e4df2e44b75d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2468514d1d9efdb15a9e4df2e44b75d8">&#9670;&nbsp;</a></span>Write()</h2>
<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">
2018-02-10 23:37:42 +00:00
<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>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00040">40</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="ab331684a758a93bf0c77fa224fe429ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab331684a758a93bf0c77fa224fe429ea">&#9670;&nbsp;</a></span>WriteFromFile() <span class="overload">[1/2]</span></h2>
<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/d73/classshaka_1_1File.html">File</a> *&#160;</td>
<td class="paramname"><em>source</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
2018-02-10 23:37:42 +00:00
<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>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00059">59</a> of file <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html">mkv_writer.cc</a>.</p>
</div>
</div>
2018-02-10 23:37:42 +00:00
<a id="a2dfac99ec5531ca2e102e5b145bb29ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dfac99ec5531ca2e102e5b145bb29ed">&#9670;&nbsp;</a></span>WriteFromFile() <span class="overload">[2/2]</span></h2>
<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/d73/classshaka_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">
2018-02-10 23:37:42 +00:00
<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>
2018-02-10 23:37:42 +00:00
<p class="definition">Definition at line <a class="el" href="../../d6/dc8/mkv__writer_8cc_source.html#l00063">63</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>packager/media/formats/webm/<a class="el" href="../../d2/dd6/mkv__writer_8h_source.html">mkv_writer.h</a></li>
<li>packager/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>
2018-08-16 00:35:22 +00:00
Generated on Wed Aug 15 2018 17:34:24 for Shaka Packager SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
2018-02-10 23:37:42 +00:00
</a> 1.8.13
</small></address>
</body>
</html>