Apireference RST
Apireference RST
===========================
See the example filters in the sdk dir. Reading simplefilters.c, which contains
several built-in functions, can also be very helpful.
Public Headers
##############
.. toctree::
:maxdepth: 1
:glob:
api/*
Common Pitfalls
###############
There are several minor pitfalls related to the threading and design that have to
be taken into consideration. Most of them usually aren't a problem but here's a
small checklist of things you have to watch out for sometimes.
General API
-----------
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.
Plugins
-------
Plugin code may run more multithreaded than it initially appears.
*VapourSynthPluginInit* is the only function always guaranteed to not run in
parallel. This means that the contructor and destructor of a filter may be run in
parallel for several instances. Use proper synchronization if you need to
initialize shared data.
The *GetFrame* 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 *fmUnordered* or *fmSerial* other instances may enter *GetFrame* simultaneously.
There are two common misconseptions about which mode should be used. A simple rule
is that *fmSerial* should never be used. And source filters (those returning a
frame on *arInitial*) that need locking should use *fmUnordered*.
int _ChromaLocation
Full or limited range (PC/TV range). Primarily used with YUV formats.
int _Primaries
int _Matrix
int _Transfer
int _FieldBased
float _AbsoluteTime
bint _Combed
Whether or not the frame needs postprocessing, usually hinted from field
matching filters.
int _Field
string _PictType
If 1, this frame is the last frame of the current scene. The next frame starts a
new scene.
bint _SceneChangePrev
frame _Alpha
int _ColorSpace