church_archive_script/Programs/doc/api/vsscript4.h.html
2023-11-29 16:12:35 +00:00

386 lines
No EOL
30 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>VSScript4.h &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="prev" title="VSHelper4.h" href="vshelper4.h.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="reference internal" href="../apireference.html">VapourSynth C API Reference</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../apireference.html#public-headers">Public Headers</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="vapoursynth4.h.html">VapourSynth4.h</a></li>
<li class="toctree-l3"><a class="reference internal" href="vshelper4.h.html">VSHelper4.h</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">VSScript4.h</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#table-of-contents">Table of contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="#introduction">Introduction</a></li>
<li class="toctree-l4"><a class="reference internal" href="#structs">Structs</a></li>
<li class="toctree-l4"><a class="reference internal" href="#functions">Functions</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../apireference.html#common-pitfalls">Common Pitfalls</a></li>
<li class="toctree-l2"><a class="reference internal" href="../apireference.html#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"><a href="../apireference.html">VapourSynth C API Reference</a></li>
<li class="breadcrumb-item active">VSScript4.h</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/api/vsscript4.h.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="vsscript4-h">
<h1>VSScript4.h<a class="headerlink" href="#vsscript4-h" title="Permalink to this heading"></a></h1>
<section id="table-of-contents">
<h2>Table of contents<a class="headerlink" href="#table-of-contents" title="Permalink to this heading"></a></h2>
<p><a class="reference internal" href="#introduction">Introduction</a></p>
<dl>
<dt><a class="reference internal" href="#structs">Structs</a></dt><dd><p><a class="reference internal" href="#vsscript">VSScript</a></p>
<p><a class="reference internal" href="#vsscriptapi">VSScriptAPI</a></p>
</dd>
<dt><a class="reference internal" href="#functions">Functions</a></dt><dd><p><a class="reference internal" href="#getvsscriptapi">getVSScriptAPI</a></p>
<p><a class="reference internal" href="#getapiversion">getApiVersion</a></p>
<p><a class="reference internal" href="#getvsapi">getVSAPI</a></p>
<p><a class="reference internal" href="#createscript">createScript</a></p>
<p><a class="reference internal" href="#getcore">getCore</a></p>
<p><a class="reference internal" href="#evaluatebuffer">evaluateBuffer</a></p>
<p><a class="reference internal" href="#evaluatefile">evaluateFile</a></p>
<p><a class="reference internal" href="#geterror">getError</a></p>
<p><a class="reference internal" href="#getexitcode">getExitCode</a></p>
<p><a class="reference internal" href="#getvariable">getVariable</a></p>
<p><a class="reference internal" href="#setvariables">setVariables</a></p>
<p><a class="reference internal" href="#getoutputnode">getOutputNode</a></p>
<p><a class="reference internal" href="#getoutputalphanode">getOutputAlphaNode</a></p>
<p><a class="reference internal" href="#getaltoutputmode">getAltOutputMode</a></p>
<p><a class="reference internal" href="#freescript">freeScript</a></p>
<p><a class="reference internal" href="#evalsetworkingdir">evalSetWorkingDir</a></p>
</dd>
</dl>
</section>
<section id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this heading"></a></h2>
<p>VSScript provides a convenient wrapper for VapourSynths scripting interface(s), allowing the evaluation of VapourSynth scripts and retrieval of output clips.</p>
<p>For reasons unknown, the VSScript library is called <code class="docutils literal notranslate"><span class="pre">VSScript</span></code> in Windows and <code class="docutils literal notranslate"><span class="pre">vapoursynth-script</span></code> everywhere else.</p>
<p>At this time, VapourSynth scripts can be written only in Python (version 3).</p>
<p>Here are a few users of the VSScript library:</p>
<blockquote>
<div><ul class="simple">
<li><p><a class="reference external" href="https://github.com/vapoursynth/vapoursynth/blob/master/src/vspipe/vspipe.cpp">vspipe</a></p></li>
<li><p><a class="reference external" href="https://github.com/vapoursynth/vapoursynth/blob/master/src/vfw/vsvfw.cpp">vsvfw</a></p></li>
<li><p><a class="reference external" href="https://github.com/vapoursynth/vapoursynth/blob/master/sdk/vsscript_example.c">an example program</a></p></li>
<li><p>the video player <a class="reference external" href="https://github.com/mpv-player/mpv/blob/master/video/filter/vf_vapoursynth.c">mpv</a></p></li>
</ul>
</div></blockquote>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If libvapoursynth-script is loaded with dlopen(), the RTLD_GLOBAL flag must be used. If not, Python wont be able to import binary modules. This is due to Pythons design.</p>
</div>
</section>
<section id="structs">
<h2>Structs<a class="headerlink" href="#structs" title="Permalink to this heading"></a></h2>
<section id="vsscript">
<h3>VSScript<a class="headerlink" href="#vsscript" title="Permalink to this heading"></a></h3>
<p>A script environment. All evaluation and communication with evaluated scripts happens through a VSScript object.</p>
</section>
<section id="vsscriptapi">
<h3>VSScriptAPI<a class="headerlink" href="#vsscriptapi" title="Permalink to this heading"></a></h3>
<p>This struct is the way to access VSScripts public API.</p>
</section>
</section>
<section id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this heading"></a></h2>
<section id="getvsscriptapi">
<h3>getVSScriptAPI<a class="headerlink" href="#getvsscriptapi" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getVSScriptAPI">
<span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSSCRIPTAPI</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">getVSScriptAPI</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">version</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getVSScriptAPI" title="Permalink to this definition"></a><br /></dt>
<dd><p>Returns a struct containing function pointer for the api. Will return NULL is the specified <em>version</em> isnt supported.</p>
<p>It is recommended to always pass <em>VSSCRIPT_API_VERSION</em>.</p>
</dd></dl>
</section>
<section id="getapiversion">
<h3>getApiVersion<a class="headerlink" href="#getapiversion" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getApiVersion">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getApiVersion</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#c.getApiVersion" title="Permalink to this definition"></a><br /></dt>
<dd><p>Returns the api version provided by vsscript.</p>
</dd></dl>
</section>
<section id="getvsapi">
<h3>getVSAPI<a class="headerlink" href="#getvsapi" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getVSAPI">
<span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSAPI</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">getVSAPI</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">version</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getVSAPI" title="Permalink to this definition"></a><br /></dt>
<dd><p>Retrieves the VSAPI struct. Exists mostly as a convenience so the vapoursynth module doesnt have to be explicitly loaded.</p>
<p>This could return NULL if the VapourSynth library doesnt provide the requested version.</p>
</dd></dl>
</section>
<section id="createscript">
<h3>createScript<a class="headerlink" href="#createscript" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.createScript">
<span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">createScript</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSCore</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">core</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.createScript" title="Permalink to this definition"></a><br /></dt>
<dd><p>Creates an empty script environment that can be used to evaluate scripts. Passing a pre-created <em>core</em> can be usful to have custom core creation flags, log callbacks or plugins pre-loaded. Passing NULL will automatically create a new core with default settings.</p>
<p>Takes over ownership of the <em>core</em> regardless of success or failure. Returns NULL on error.</p>
</dd></dl>
</section>
<section id="getcore">
<h3>getCore<a class="headerlink" href="#getcore" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getCore">
<span class="n"><span class="pre">VSCore</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">getCore</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getCore" title="Permalink to this definition"></a><br /></dt>
<dd><p>Retrieves the VapourSynth core that was created in the script environment. If a VapourSynth core has not been created yet, it will be created now, with the default options (see the <a class="reference internal" href="../pythonreference.html"><span class="doc">Python Reference</span></a>).</p>
<p>VSScript retains ownership of the returned core object.</p>
<p>Returns NULL on error.</p>
</dd></dl>
</section>
<section id="evaluatebuffer">
<h3>evaluateBuffer<a class="headerlink" href="#evaluatebuffer" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.evaluateBuffer">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">evaluateBuffer</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">buffer</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">scriptFilename</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.evaluateBuffer" title="Permalink to this definition"></a><br /></dt>
<dd><p>Evaluates a script contained in a C string. Can be called multiple times on the same script environment to successively add more processing.</p>
<dl>
<dt><em>handle</em></dt><dd><p>Pointer to a script environment.</p>
</dd>
<dt><em>buffer</em></dt><dd><p>The entire script to evaluate, as a C string.</p>
</dd>
<dt><em>scriptFilename</em></dt><dd><p>A name for the script, which will be displayed in error messages. If this is NULL, the name “&lt;string&gt;” will be used.</p>
<p>The special <code class="docutils literal notranslate"><span class="pre">__file__</span></code> variable will be set to <em>scriptFilename</em>s absolute path if this is not NULL.</p>
</dd>
</dl>
<p>Returns non-zero in case of errors. The error message can be retrieved with <a class="reference internal" href="#geterror">getError</a>(). If the script calls <em>sys.exit(code)</em> the exit code can be retrieved with <a class="reference internal" href="#getexitcode">getExitCode</a>(). The working directory behavior can be changed by calling <a class="reference internal" href="#evalsetworkingdir">evalSetWorkingDir</a>() before this function.</p>
</dd></dl>
</section>
<section id="evaluatefile">
<h3>evaluateFile<a class="headerlink" href="#evaluatefile" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.evaluateFile">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">evaluateFile</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">scriptFilename</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.evaluateFile" title="Permalink to this definition"></a><br /></dt>
<dd><p>Evaluates a script contained in a file. This is a convenience function which reads the script from a file for you. It will only read the first 16 MiB which should be enough for everyone.</p>
<p>Behaves the same as evaluateBuffer().</p>
</dd></dl>
</section>
<section id="geterror">
<h3>getError<a class="headerlink" href="#geterror" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getError">
<span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">getError</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getError" title="Permalink to this definition"></a><br /></dt>
<dd><p>Returns the error message from a script environment, or NULL, if there is no error.</p>
<p>It is okay to pass NULL.</p>
<p>VSScript retains ownership of the pointer and it is only guaranteed to be valid until the next vsscript operation on the <em>handle</em>.</p>
</dd></dl>
</section>
<section id="getexitcode">
<h3>getExitCode<a class="headerlink" href="#getexitcode" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getExitCode">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getExitCode</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getExitCode" title="Permalink to this definition"></a><br /></dt>
<dd><p>Returns the exit code if the script calls <em>sys.exit(code)</em>, or 0, if the script fails for other reasons or calls <em>sys.exit(0)</em>.</p>
<p>It is okay to pass NULL.</p>
</dd></dl>
</section>
<section id="getvariable">
<h3>getVariable<a class="headerlink" href="#getvariable" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getVariable">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getVariable</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">name</span></span>, <span class="n"><span class="pre">VSMap</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">dst</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getVariable" title="Permalink to this definition"></a><br /></dt>
<dd><p>Retrieves a variable from the script environment.</p>
<p>If a VapourSynth core has not been created yet in the script environment, one will be created now, with the default options (see the <a class="reference internal" href="../pythonreference.html"><span class="doc">Python Reference</span></a>).</p>
<dl class="simple">
<dt><em>name</em></dt><dd><p>Name of the variable to retrieve.</p>
</dd>
<dt><em>dst</em></dt><dd><p>Map where the variables value will be placed, with the key <em>name</em>.</p>
</dd>
</dl>
<p>Returns non-zero on error.</p>
</dd></dl>
</section>
<section id="setvariables">
<h3>setVariables<a class="headerlink" href="#setvariables" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.vsscript_setVariable">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">vsscript_setVariable</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">VSMap</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">vars</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.vsscript_setVariable" title="Permalink to this definition"></a><br /></dt>
<dd><p>Sets variables in the script environment.</p>
<p>The variables are now available to the script.</p>
<p>If a VapourSynth core has not been created yet in the script environment, one will be created now, with the default options (see the <a class="reference internal" href="../pythonreference.html"><span class="doc">Python Reference</span></a>).</p>
<dl class="simple">
<dt><em>vars</em></dt><dd><p>Map containing the variables to set.</p>
</dd>
</dl>
<p>Returns non-zero on error.</p>
</dd></dl>
</section>
<section id="getoutputnode">
<h3>getOutputNode<a class="headerlink" href="#getoutputnode" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getOutputNode">
<span class="n"><span class="pre">VSNode</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">getOutputNode</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">index</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getOutputNode" title="Permalink to this definition"></a><br /></dt>
<dd><p>Retrieves a node from the script environment. A node in the script must have been marked for output with the requested <em>index</em>.</p>
<p>The returned node has its reference count incremented by one.</p>
<p>Returns NULL if there is no node at the requested index.</p>
</dd></dl>
</section>
<section id="getoutputalphanode">
<h3>getOutputAlphaNode<a class="headerlink" href="#getoutputalphanode" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getOutputAlphaNode">
<span class="n"><span class="pre">VSNode</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">getOutputAlphaNode</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">index</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getOutputAlphaNode" title="Permalink to this definition"></a><br /></dt>
<dd><p>Retrieves an alpha node from the script environment. A node with associated alpha in the script must have been marked for output with the requested <em>index</em>.</p>
<p>The returned node has its reference count incremented by one.</p>
<p>Returns NULL if there is no alpha node at the requested index.</p>
</dd></dl>
</section>
<section id="getaltoutputmode">
<h3>getAltOutputMode<a class="headerlink" href="#getaltoutputmode" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.getAltOutputMode">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getAltOutputMode</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">index</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.getAltOutputMode" title="Permalink to this definition"></a><br /></dt>
<dd><p>Retrieves the alternative output mode settings from the script. This value has no fixed meaning but in vspipe and vsvfw it
indicates that alternate output formats should be used when multiple ones are available. It is up to the client application to define the exact meaning or simply disregard it completely.</p>
<p>Returns 0 if there is no alt output mode set.</p>
</dd></dl>
</section>
<section id="freescript">
<h3>freeScript<a class="headerlink" href="#freescript" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.freeScript">
<span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">freeScript</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.freeScript" title="Permalink to this definition"></a><br /></dt>
<dd><p>Frees a script environment. <em>handle</em> is no longer usable.</p>
<ul class="simple">
<li><p>Cancels any clips set for output in the script environment.</p></li>
<li><p>Clears any variables set in the script environment.</p></li>
<li><p>Clears the error message from the script environment, if there is one.</p></li>
<li><p>Frees the VapourSynth core used in the script environment, if there is one.</p></li>
</ul>
<p>Since this function frees the VapourSynth core, it must be called only after all frame requests are finished and all objects obtained from the script have been freed (frames, nodes, etc).</p>
<p>It is safe to pass NULL.</p>
</dd></dl>
</section>
<section id="evalsetworkingdir">
<h3>evalSetWorkingDir<a class="headerlink" href="#evalsetworkingdir" title="Permalink to this heading"></a></h3>
<dl class="c function">
<dt class="sig sig-object c" id="c.evalSetWorkingDir">
<span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">evalSetWorkingDir</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">VSScript</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">handle</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">setCWD</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.evalSetWorkingDir" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set whether or not the working directory is temporarily changed to the same
location as the script file when evaluateFile is called. Off by default.</p>
</dd></dl>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="vshelper4.h.html" class="btn btn-neutral float-left" title="VSHelper4.h" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</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>