Filter SDK/C API
The header, avisynth_c.h, declares all the structures and miscellaneous constants that you might need when writing a plugin. All external plugins should #include it:
#include "avisynth_c.h"
Contents |
differences C and C++
put somewhere else.
CreateScriptEnvironment
Structures
See C++ API for descriptions. If there is no C++ API equivalent, the description is given here.
C++ API | C API |
---|---|
AvisynthError | ? |
doesn't exist | AVS_FilterInfo |
VideoFrameBuffer | AVS_VideoFrameBuffer |
VideoFrame | AVS_VideoFrame |
AlignPlanar | doesn't exist |
FillBorder | doesn't exist |
ConvertAudio | doesn't exist |
IScriptEnvironment | AVS_ScriptEnvironment |
IClip | AVS_Clip |
AVSValue | AVS_Value |
AVS_FilterInfo is a structure with members (the first three are structures too):
- AVS_Clip (no members)
- AVS_ScriptEnvironment (no members)
- AVS_VideoFrame
- get_parity
- get_audio
- set_cache_hints
- free_filter
- error
- user_data
AVS_VideoFrame is a structure with members:
- offset, pitch, row_size, height, offsetU, offsetV, pitchUV
- row_sizeUV, heightUV
AVS_VideoInfo is a structure with members:
- width, height
- fps_numerator, fps_denominator
- num_frames
- pixel_type
- audio_samples_per_second
- sample_type
- num_audio_samples
- nchannels
- image_type
AVS_Value is a structure with members:
- type // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong
// for some function e'rror
- array_size;
union { void * clip; // do not use directly, use avs_take_clip char boolean; int integer; float floating_pt; const char * string; const AVS_Value * array; } d;
Structures
Constants
The available constants are the sames ones as in the C++ API.
Note contrary to the C++ API, float audio is not typedef'd to SFLOAT.
source: http://forum.doom9.org/showthread.php?p=1464911#post1464911
compiling plugins: http://forum.doom9.org/showthread.php?p=1092380#post1092380
example: http://forum.doom9.org/showthread.php?p=1001260#post1001260
For now the api is described here: http://www.kevina.org/avisynth_c/api.html . An example is given here: http://www.kevina.org/avisynth_c/example.html .