PDA

View Full Version : PureBasic port of the Avisynth C Interface


Inc
2nd June 2007, 16:41
Hi,

I wanted to crack that nut and ported the Avisynth C Interface to PureBasic. Beside basic intself Purebasic also supports Inline assembler etc., so it could be also a nice 'small' alternative to C/C++ plugin development. However, it should also be easy for VisualBasic Devs. to translate it to VB.

The Downloads:

Avisynth.pbi (http://home.arcor.de/packshot/Avisynth.pbi) <-- The header which always has to be 'included'

invert_inplace.pb (http://home.arcor.de/packshot/invert_inplace.pb) <-- a simple sample plugin where the videostream gets inverted

avisynth_get_video_info.pb (http://home.arcor.de/packshot/avisynth_get_video_info.pb) <-- a mini sample appl. where you can receive the videoinfos

If you do encounter bugs, please feel free to let me know.

Cheers,
Inc.

buzzqw
2nd June 2007, 19:03
wow! thanks!

don't know if i will ever develop a filter... but thanks anyway!

from a proud PureBasic user!

BHH

Inc
3rd June 2007, 13:23
A question to our Avisynth Developers:
Is a CPlugin forced to be loaded manually in the script via typing LoadCPlugin() first or is there any way to support autoloading, like supported on MSVC++ Plugins?

Purebasic does support both StdCall and Cdecl in in- and exporting symbols/functions.

So is there any way to archive this?

IanB
3rd June 2007, 13:58
Currently you will need to write an .AVSI that LoadStdcallPlugin()'s the .DLLs

You should probably use LoadStdcallPlugin as LoadCPlugin tends to get overloaded by Kevins original Avisynth_C.dll being autoloaded on many peoples systems.

Fizick
3rd June 2007, 18:52
IanB,
please set LoadCplugin to c-calling syntax only in new avisynth version,
and loadStdCallplugin will be stdcall.

Inc
4th June 2007, 11:06
Currently you will need to write an .AVSI

Ah ok, thats the logic I used till now also when autoloading older AVS 2.0 Plugins.

Thanx :)

IanB
5th June 2007, 07:47
please set LoadCplugin to c-calling syntax only in new avisynth version, and loadStdCallplugin will be stdcall.What? :confused:

In the core LoadCPlugin and LoadStdCallPlugin are the same. It is only when you load Kevins old avisynth_c.dll that LoadCPlugin gets overloaded and becomes different (which is why I added LoadStdCallPlugin).

As for 2.6 and greater the C interface is going to need some serious surgury. It currently does not have any concept of interface revision so just crashes when it is wrong.