church_archive_script/Programs/doc/apireference.html

240 lines
12 KiB
HTML
Raw Normal View History

2023-11-29 16:12:35 +00:00
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>VapourSynth C API Reference &mdash; VapourSynth R64 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="VapourSynth4.h" href="api/vapoursynth4.h.html" />
<link rel="prev" title="Applications and Libraries" href="applications.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home">
VapourSynth
</a>
<div class="version">
R64
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="gettingstarted.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="pythonreference.html">Python Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="functions.html">Function Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="output.html">Output</a></li>
<li class="toctree-l1"><a class="reference internal" href="applications.html">Applications and Libraries</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">VapourSynth C API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#public-headers">Public Headers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="api/vapoursynth4.h.html">VapourSynth4.h</a></li>
<li class="toctree-l3"><a class="reference internal" href="api/vshelper4.h.html">VSHelper4.h</a></li>
<li class="toctree-l3"><a class="reference internal" href="api/vsscript4.h.html">VSScript4.h</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#common-pitfalls">Common Pitfalls</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#general-api">General API</a></li>
<li class="toctree-l3"><a class="reference internal" href="#plugins">Plugins</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#reserved-frame-properties">Reserved Frame Properties</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">VapourSynth</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">VapourSynth C API Reference</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/apireference.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="vapoursynth-c-api-reference">
<h1>VapourSynth C API Reference<a class="headerlink" href="#vapoursynth-c-api-reference" title="Permalink to this heading"></a></h1>
<p>See the example filters in the sdk dir. Reading simplefilters.c, which contains
several built-in functions, can also be very helpful.</p>
<section id="public-headers">
<h2>Public Headers<a class="headerlink" href="#public-headers" title="Permalink to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="api/vapoursynth4.h.html">VapourSynth4.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/vshelper4.h.html">VSHelper4.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/vsscript4.h.html">VSScript4.h</a></li>
</ul>
</div>
</section>
<section id="common-pitfalls">
<h2>Common Pitfalls<a class="headerlink" href="#common-pitfalls" title="Permalink to this heading"></a></h2>
<p>There are several minor pitfalls related to the threading and design that have to be taken into consideration. Most of them usually arent a problem but heres a small checklist of things you have to watch out for sometimes.</p>
<section id="general-api">
<h3>General API<a class="headerlink" href="#general-api" title="Permalink to this heading"></a></h3>
<p>You may not pass objects (clips, functions and so on) owned by one core as arguments to filters in another core. A manual full deep copy of the data you want to pass on is required. This is generally not a problem since you should never need more than one core per filter graph.</p>
</section>
<section id="plugins">
<h3>Plugins<a class="headerlink" href="#plugins" title="Permalink to this heading"></a></h3>
<p>Plugin code may run more multithreaded than it initially appears. <em>VapourSynthPluginInit</em> is the only function always guaranteed to not run in parallel. This means that the constructor and destructor of a filter may be run in parallel for several instances. Use proper synchronization if you need to initialize shared data.</p>
<p>The <em>GetFrame</em> function is a bit more complicated so see the reference of the constants. Do however note that the parallelism is per instance. Even if a filter is <em>fmUnordered</em> or <em>fmSerial</em> other instances may enter <em>GetFrame</em> simultaneously.</p>
<p>There are two common misconseptions about which mode should be used. A simple rule is that <em>fmSerial</em> should never be used. And source filters (those returning a frame on <em>arInitial</em>) that need locking should use <em>fmUnordered</em>.</p>
</section>
</section>
<section id="reserved-frame-properties">
<h2>Reserved Frame Properties<a class="headerlink" href="#reserved-frame-properties" title="Permalink to this heading"></a></h2>
<p>All frames contain a map of keyvalue pairs. It is recommended that these
properties are named using only a-z, A-Z, 0-9 using CamelCase. There is a
special category of keys starting with _ which have strictly defined meanings
specified below. It is acceptable to not set any of these keys if they are
unknown. It is also a fatal error to set them to a value not specified below.</p>
<p>int _ChromaLocation</p>
<blockquote>
<div><p>Chroma sample position in YUV formats.</p>
<p>0=left, 1=center, 2=topleft, 3=top, 4=bottomleft, 5=bottom.</p>
</div></blockquote>
<p>int _ColorRange</p>
<blockquote>
<div><p>Full or limited range (PC/TV range). Primarily used with YUV formats.</p>
<p>0=full range, 1=limited range.</p>
</div></blockquote>
<p>int _Primaries</p>
<blockquote>
<div><p>Color primaries as specified in ITU-T H.265 Table E.3.</p>
</div></blockquote>
<p>int _Matrix</p>
<blockquote>
<div><p>Matrix coefficients as specified in ITU-T H.265 Table E.5.</p>
</div></blockquote>
<p>int _Transfer</p>
<blockquote>
<div><p>Transfer characteristics as specified in ITU-T H.265 Table E.4.</p>
</div></blockquote>
<p>int _FieldBased</p>
<blockquote>
<div><p>If the frame is composed of two independent fields (interlaced).</p>
<p>0=frame based (progressive), 1=bottom field first, 2=top field first.</p>
</div></blockquote>
<p>float _AbsoluteTime</p>
<blockquote>
<div><p>The frames absolute timestamp in seconds if reported by the source filter.
Should only be set by the source filter and not be modified. Use durations
for all operations that depend on frame length.</p>
</div></blockquote>
<p>int _DurationNum, int _DurationDen</p>
<blockquote>
<div><p>The frames duration in seconds as a rational number. Filters that
modify the framerate should also change these values.</p>
<p>This fraction should always be normalized.</p>
</div></blockquote>
<p>bint _Combed</p>
<blockquote>
<div><p>Whether or not the frame needs postprocessing, usually hinted from field
matching filters.</p>
</div></blockquote>
<p>int _Field</p>
<blockquote>
<div><p>If the frame was produced by something like core.std.SeparateFields,
this property signals which field was used to generate this frame.</p>
<p>0=from bottom field, 1=from top field.</p>
</div></blockquote>
<p>string _PictType</p>
<blockquote>
<div><p>A single character describing the frame type. It uses the common
IPB letters but other letters may also be used for formats with
additional frame types.</p>
</div></blockquote>
<p>int _SARNum, int _SARDen</p>
<blockquote>
<div><p>Pixel (sample) aspect ratio as a rational number.</p>
</div></blockquote>
<p>bint _SceneChangeNext</p>
<blockquote>
<div><p>If 1, this frame is the last frame of the current scene. The next frame starts a new scene.</p>
</div></blockquote>
<p>bint _SceneChangePrev</p>
<blockquote>
<div><p>If 1, this frame starts a new scene.</p>
</div></blockquote>
<p>frame _Alpha</p>
<blockquote>
<div><p>A clips alpha channel can be attached to the clip one frame at a
time using this property.</p>
</div></blockquote>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="applications.html" class="btn btn-neutral float-left" title="Applications and Libraries" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="api/vapoursynth4.h.html" class="btn btn-neutral float-right" title="VapourSynth4.h" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2012-2023, Fredrik Mellbin.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>