<!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/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Rémi,</p>
<p>On 2017-02-01 20:22, Rémi Denis-Courmont wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> I have a hard time following the code. It really does not help that directory
and file callbacks appear to be artificially multiplexed.</code></pre>
</blockquote>
<p>It might be easier if I supplied some additional comments explaining what the different callbacks are for, but in short:</p>
<ul>
<li><p>functions that begin with <code>libarchive_</code> are callback used by <em>libarchive</em> in order to read from the <em>VLC</em> <code>stream_t</code> (the source).</p></li>
<li><p>functions that begin with <code>archive_</code> are helpers used by the <em>stream-extractor</em> itself (such as for setting up the <code>libarchive_</code> callbacks).</p></li>
<li><p>functions that begin with a capital letter (<code>Open</code>, <code>Read</code>, <code>Seek</code>, <code>Control</code>, <code>Close</code>) are the callbacks supplied to the <em>vlc core</em>.</p></li>
</ul>
<p>The reason it might feel like there is duplicate behavior is probably due to the fact that <em>libarchive</em> requires callbacks in order to read from the source <code>stream_t</code>, which requires the same functionality as that exposed to the <em>vlc core</em> through the regular <code>pf_read</code> (etc.).</p>
<p>Do you think comments that include the information posted above will aid in terms of following the implementation?</p>
<p>Best Regards, Filip Roséen</p>
</body>
</html>