AviSynthPlugins のバックアップ差分(No.2)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
**Plugins [#f54be8df]
**プラグイン [#f54be8df]

With these functions you can add external functions to AviSynth.
これらの関数を用いて、AviSynthに外部関数を追加することができます。

 LoadPlugin(string filename [, ...])

loads one or more external plugins. These plugins have to use the AviSynth external plugin interface, for which some preliminary documentation is available in the [[FilterSDK]].
LoadPluginは、1つ以上の外部プラグインを読み込みます。これらのプラグインは、AviSynth外部プラグイン・インターフェイスを使用していなければなりません。これに関しては、[[FilterSDK]]において、いくつかの予備のドキュメントが入手可能です。

 LoadVirtualDubPlugin(string filename, string filtername, int preroll)

loads a plugin written for VirtualDub. "filename" is the name of the .vdf file. After calling this function, the filter will be known as "filtername" in AviSynth. VirtualDub filters only support RGB32. Some filters' output depends on previous frames; for those, preroll should be set to at least the number of frames the filter needs to pre-process to fill its buffers and/or update its internal variables.

Convenient AviSynth-style interfaces to many VirtualDub plugins are available in the file vdub_filters.avs, which is included in some AviSynth distributions and in the ShareFunctions section. To use it, edit the VirtualDub_plugin_directory variable at the top of the file to point to your VirtualDub plugin directory and import the file in your script (using [[Import]] from ScriptFunctions).

 LoadVFAPIPlugin(string filename, string filtername)

allows you to use VFAPI plugins, which are also TMPGEnc import plugins although TMPG support appears to be buggy at the moment.

Though the preceding commands still exist, starting with v2.06 of AviSynth you can specify a plugin directory for AviSynth to use. By putting all plugins, both native AviSynth and VirtualDub ones (not sure about VFAPI) in this directory, these commands become obsolete. Note that most applications using AviSynth such as GordianKnot has not been updated to reflect this change and automatically generated .avs files should have these functions removed.

 LoadCPlugin?(string filename [, ...])

C-plugins must be loaded with LoadCPlugin using AviSynth v2.52 or older versions, and can also be loaded with LoadPlugin starting from AviSynth v2.53. Advice: keep this plugin outside your auto plugin loading directory to prevent crashes. [[[discussion]:http://forum.doom9.org/showthread.php?s=&threadid=58840]] [[[AVISynth C API (by kevina20723)]:http://kevin.atkinson.dhs.org/avisynth_c/]]

**Plugin autoload and name precedence v2 [#d4bf64b8]

It is possible to put all plugins and script files with user-defined functions or (global) variables in a directory from where all files with the extension .AVS and .DLL are loaded at startup, unloaded and then loaded dynamically as the script needs them.

Scripts in this directory should only contain function definitions and global variables, no main processing section (else strange errors may occur), it also is not recommended to put other files in that directory.

The directory is stored in the registry (the registry key has changed for v2.5). You can use double-clicking a .REG-file with the following lines to set the path (of course inserting your actual path): 

 REGEDIT4
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth]
 "PluginDir2_5"="c:\\program files\\avisynth\\plugins"

The order in which function names take precedence is as follows:

+user-defined function (always have the highest priority)
+plugin-function (have higher priority than built-in functions - they will override a built-in function)
+built-in function

Inside those groups the function loaded at last takes precedence, there is no error in a namespace conflict. 

**Plugin autoload and conflicting function names v2.55 [#k8da2d4c]

Starting from v2.55 there is DLLName_function() support. The problem is that two plugins can have different functions which are named the same. To call the needed one, DLLName_function() support is added. It only works for auto-loaded plugins. It doesn't auto-generate the additional names for plug-ins loaded with LoadPlugin.

Some examples: 

 # using fielddeinterlace from decomb510.dll
 AviSource("D:\captures\jewel.avi")
 decomb510_fielddeinterlace(blend=false)

Suppose you have the plugins mpeg2dec.dll and mpeg2dec3.dll in your auto plugin dir, and you want to load a d2v file with mpeg2dec.dll (which outputs YUY2):

 # using mpeg2source from mpeg2dec.dll
 mpeg2dec_mpeg2source("F:\From_hell\from_hell.d2v")

 # using mpeg2source from mpeg2dec3.dll
 mpeg2dec3_mpeg2source("F:\From_hell\from_hell.d2v")

You can find a large selection of AviSynth plugins to download in [[[FAQ #3.4] :http://www.avisynth.org/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.4]] and [[[FAQ #3.5]:http://www.avisynth.org/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.5]].

#hr
註: このページは、http://www.avisynth.org/AviSynthPluginsの日本語訳です。