Filter SDK/C API

From Avisynth wiki
Jump to: navigation, search

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"


differences C and C++

put somewhere else.



See C++ API for descriptions. If there is no C++ API equivalent, the description is given here.

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;



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.


compiling plugins:


For now the api is described here: . An example is given here: .

Personal tools