View Full Version : AVISynth C API Now Available


kevina
4th August 2003, 08:13
I have just released a compiler neutral C Interface to AviSynth in the forum of a plugin. You can find it at http://kevin.atkinson.dhs.org/avisynth_c/. The current version is 0.14.

I would really appreate it if some AVISynth developers could look it over and give me some feedback. I am hoping that eventually it can become part of AVISynth.

It currently is designed for AVISynth 2.5.

Enjoy.

sh0dan
4th August 2003, 08:30
First impression is good - I'll have a closer look ASAP.

sh0dan
5th August 2003, 14:28
I took a few minutes and made an attempt at integrating it into the core. I tried to implement it, so it would work seamless, and results look promising.

avisynth_c.dll seems to be required for other plugins to load - no problem - it can be included in the installation package. It does however not have to be loaded as a plugin when it is part of the core.

LoadPlugin automatically remaps C-plugins to "LoadCPlugin", if a C-plugin is detected.

I get a bunch of errors like "D:\dev\avisynth2\avisynth\avisynth_c.cpp(58) : warning C4273: 'avs_release_video_frame' : inconsistent dll linkage. dllexport assumed."

Are you interested in having C-plugins put into the core?? It seems to work very nicely!

kevina
5th August 2003, 15:15
Yes I am interested in integrating it into the core. It has not been tested very well, so for right now I rather have it as a plugin since it makes updating it easier....

I am not sure why you are getting those errors. You might need to define AVISYNTH_C_EXPORTS.

If it is integrated in the core avisynth_c.dll should not be needed. However a .lib file will be needed to compile plugins since, unlike with the VC++ API, plugins need to use several symbols from avisynth_c.dll.
I hope I am making sence to you.

sh0dan
5th August 2003, 15:23
Not much ;)

But I assume it would only be a lib for avisynth_c. Shouldn't be much of a problem. I'm committing my temp work now - I'll get back with binary, libraries, etc.

Edit: Do you have CVS access??

sh0dan
6th August 2003, 13:10
New CVS binary up, with C-plugin support.

Kurosu
6th August 2003, 16:34
I didn't take time to explore this, but if it means C-only code can be used to generate plugins and/or other compilers than MS VC++ can be used without much hassle, then that's definetely a good thing, which should be put forward even further (once it's stable, I guess).

kevina
6th August 2003, 16:52
Kurosu, that is exactly what it does. C only code, or C++ code other than VC++.

sh0dan
6th August 2003, 17:18
For now I guess it can only be tested with the example plugin in the archive above.

Kurosu
6th August 2003, 17:22
Great!

Though, I'm so much used to current Avisynth framework I would take an awful time to switch to another one (even for the better, be it 3.0 or C-code - arhg, and asm syntax would change if I use another compiler :mad: ). But not having to compile with VC++ is a big step forward into the direction of "free software".

kevina
12th August 2003, 23:24
Version 0.11 is now available at http://kevin.atkinson.dhs.org/avisynth_c/.

Minor API Changes, Bug Fixes, and enhanced examples to work with YV12.

kevina
23rd August 2003, 02:21
Version 0.12 is now available at http://kevin.atkinson.dhs.org/avisynth_c/ .

Added some missing function to the API.

Si
24th August 2003, 21:59
Kevin,

I was wondering if you'd consider doing a LoadCPlugin conversion of SimpleSample (just a conversion of SimpleSample13a would do :) )

I believe your plugin could entice more people (hopefully with good ideas) into writing Avisynth filters.

regards

Simon

kevina
24th August 2003, 22:10
I guess I could. I do provide some examples however.

If someone else cares to test out my API they could attempt to convert it. Would also give me some feedback on my design.....

Sigmatador
25th August 2003, 02:21
what about speed, do the same plugin done with vcc/icl and Cplugin have the same speed ?

kevina
25th August 2003, 02:55
There is a little bit of overhead due to a extra function call for each API method used. However, since data is retrived on a per-frame bases
the overhead should be negligible.

stickboy
25th August 2003, 04:10
Just to make sure your stance on the GPL is clear: must any plug-in that uses the Avisynth C API also be GPL'd?

kevina
25th August 2003, 04:59
It is under the same copyright of Avisynth itself. So filters must not be GPL. I will try update the copyright for the next version.

Si
25th August 2003, 15:32
@stickboy
Can I ask why you raised the question?
@kevin
COuld you explain your answer So filters must not be GPL

(Have I missed something somewhere :confused: )

regards
Simon

kevina
25th August 2003, 15:37
My mistake. Filters do not have to be GPL.

Si
25th August 2003, 15:56
@Kevin
Ta- makes sense now :)
Simon

stickboy
25th August 2003, 17:02
Originally posted by siwalters
Can I ask why you raised the question?Why not?

It isn't clear what the answer is, the answer can affect adoption of the API, and it's better to get it figured out sooner rather than later.

Si
25th August 2003, 19:31
Why not?
Thank you for concise and informative answer.:rolleyes:

And to return the favour
It isn't clear what the answer is
.. it is to me. :)

regards
Simon

stickboy
25th August 2003, 20:23
Originally posted by siwalters
Thank you for concise and informative answer.I don't see the harm in asking a simple, legit question. I have no hidden agenda or ulterior motives if that's what you're wondering. I am not trying to troll.
.. it is [clear] to me.Without kevina20723's response, no, it's not clear. The FSF's stance is that programs that use GPL'd (not LGPL'd) dynamically-linked libraries also be released under the GPL or a GPL-compatible license. However, their opinion is not necessarily binding, and AFAIK the use of GPL'd DLLs is debatable and subject to some interpretation.

I'm not against the GPL, but I just wanted to make sure that whatever licensing issues there are with the Avisynth C API are clear in advance. You don't want a situation where people who want to write good, closed-source plug-ins are discouraged unnecessarily, and you also don't want a situation where people think that closed-source plugins are okay and then discover later that they're not.

Si
25th August 2003, 21:31
There's no harm in asking a simple legit question .. I think'll you'll find we both did :)

Thank you for replying to mine. :)

I understand Kevin's position because of his answers to your question.



regards
Simon

deXtoRious
26th August 2003, 14:37
I'm a non-expercienced Delphi programmer and I wanted to know if anyone has written a unit for using AviSynth... The prospect of writing all these functions myself isn't a very appealing one...

deXtoRious
9th September 2003, 14:49
Could anybody please give any links to the syntax of invoking the AviSynth dll, any examples, docs, anything???

MfA
9th September 2003, 19:28
It is not entirely clear wether using header files constitutes copying. TO be safe GPL projects which want to allow use through dynamic linking by non GPL programs should just dual license the header files IMO ... BSD and GPL, then there is no problem. You would not be using GPL'd source in your plugins, so as long as you dont distribute your plugins with Avisynth you wont be bound by the GPL (the moment you distribute them together you are though).

libs are less of an issue since the information can just be extracted from the DLL itself, using them doesnt represent copying IMO.

Guest
9th September 2003, 21:07
Originally posted by deXtoRious
I'm a non-expercienced Delphi programmer and I wanted to know if anyone has written a unit for using AviSynth... The prospect of writing all these functions myself isn't a very appealing one... http://aquaplaning.20m.com/ might be of interest, depending on what your goals are.

kevina
10th September 2003, 05:24
I am now up to version 0.14. Get it at http://kevin.atkinson.dhs.org/avisynth_c/ .

I would really appreciate it if some people will start trying it out so I can get some feedback on the interface.

Si
10th September 2003, 08:16
I'm just repeating my suggestion to produce a "conversion" (with lots of comments unfortunately :( ) of one of the SimpleSamples.

Or 2nd'ly - lots of comments in your examples.c - but 1st suggestion would be better(for me at least ;) )

Then everyone could see the sort of changes needed to use your interface.

Obviously, the experts can already but I imagine they have super douper MS VC++ programming enviroments with lots of tools and a heavy learning investment.

Us camp followers don't but we need leading :)

And your main possible "customers" will be newbies with little/no C/C++ programming skills/complier but a strong wish to implement their brilliant idea for an Avisynth filter :)

regards
Simon

sh0dan
12th September 2003, 08:29
I added v0.14 to the new CVS binary.

kevina
12th September 2003, 08:39
Thanks did you make any changes?

Also do you really want to keep my interface in a seperate DLL?

In order to use the exported symbol GetEnvironment (or something like that), avisynth.lib is required. In order to get it I had to recompile avisynth. That lib should be made easilly available. Avisynth_c.lib is required for my interface, so why not just combine them all into avisynth.lib and avoid the extra DLL avisynth_c.dll? I hope this is making sense to you.

sh0dan
12th September 2003, 09:05
I think keeping it separate until the API is more "final" is a good idea - it's easier to maintain.

Only change is "return !!res;" instead of "return res;" somewhere. I'm a bit concerned about "D:\dev\avisynth2\avisynth\avisynth_c.cpp(301) : warning C4700: local variable 'val' used without having been initialized" in "AVSValue __cdecl create_c_video_filter".


I get unload crashes, when placing "Smartdecimate" in the plugin directory. "examples.dll" work fine, when autoloaded as a plugin. Loading smartdecimate using "Loadplugin" works fine though.

kevina
12th September 2003, 09:13
Ok thats fine. Don't know what why SmartDecimate is crashing on unload. Are you using version 0.21 or better?

sh0dan
12th September 2003, 09:17
I'm using 0.22.

It crahes in ~AtExiter(), calling the shutdownfunc.

PS. I might have edited the post above while you were ansering ;)

kevina
12th September 2003, 09:25
Ok I will look into it.

deXtoRious
12th September 2003, 22:39
neuron2 and MfA

Thanks, that really helped!

all

Any chance of a Delphi/Pascal API appearing? Not all people no C very well, you know :(

kevina
12th September 2003, 22:51
Originally posted by sh0dan
I'm a bit concerned about "D:\dev\avisynth2\avisynth\avisynth_c.cpp(301) : warning C4700: local variable 'val' used without having been initialized" in "AVSValue __cdecl create_c_video_filter".

I am 99.9% sure that VC++ is getting confused and there is nothing wrong with the code. If there was something wrong with create_c_video_filter I would of noticed by now as every filter uses that function.

If you can figure out how to get VC++ to shut up please let me know.

Bidoche
13th September 2003, 10:36
Well you can use that :
#pragma warning (disable:4700)

But that's not really curing the problem, and besides sometimes you are happy to see those warnings.

Bidoche
13th September 2003, 10:53
Try that :
AVSValue val = *reinterpret_cast<AVSValue*>(&rev);

Maybe he will like it better.
MSCV is known to report an problem different to the real one, maybe he rejects the cast and then val is truly uniitialised...

stickboy
13th September 2003, 20:10
Originally posted by kevina20723
I would really appreciate it if some people will start trying it out so I can get some feedback on the interface.I'm planning to take a crack at writing a few filters once I figure out how to set up a working build environment. (This seems perfect for me, since I have a lot of experience with C but not with C++.)

However, I'm new to using gcc with Windows. What do you use or recommend? cygwin? MinGW?

kevina
13th September 2003, 21:14
If you are use to using gcc with unix then I recommend MinGW with MSYS. If you are use to emacs you might want to install Xemacs for windows.

You can also try Visual-MinGW (http://visual-mingw.sourceforge.net/) if you want a nice GUI.

kevina
13th September 2003, 23:43
Originally posted by Bidoche
Try that :
AVSValue val = *reinterpret_cast<AVSValue*>(&rev);

Nope. This did:

AVSValue val;
val = (*(const AVSValue *)&res);

stickboy
14th September 2003, 07:55
Okay, I used your C API to write my first AviSynth plug-in (SelectByString (http://www.avisynth.org/~stickboy/SelectByString.zip); it's really simple, since it doesn't do anything with video).

Anyhow, here are my impressions so far:
a brief tutorial would be nice; otherwise people need to read the C++ tutorials and flip back-and-forth between those and avisynth_c.h
examples.c needs way more comments
if some of the structures should not be accessed directly , why not make them opaque? (It's not possible with all of them, but I think you can do it with AVS_VideoFrameBuffer and AVS_VideoFrame.)
if we're supposed to treat AVS_Value structures as opaque, why does examples.c use args.d.array[0] instead of avs_array_elt?
it's not clear how I'm supposed to manage memory. For example, can I pass a heap-allocated C string to avs_new_value_string or avs_new_value_error? Will that memory be freed for me?

kevina
14th September 2003, 08:15
Thanks for the feedback.

I agree that more documentation is needed.

>if we're supposed to treat AVS_Value structures as opaque, why does examples.c use args.d.array[0] instead of avs_array_elt?

Bad Kevin. Yes you are suppose to. But I don't always follow my own rules. I will fix it.

>if some of the structures should not be accessed directly , why not make them opaque?

If I make AVS_VideoFrameBuffer and AVS_VideoFrame opaque I would have to eleminate the inline functions. Some of them may look large but since the plane paramter is often given explistly they can be greatly simplified by the compiler.

stickboy
14th September 2003, 11:39
Originally posted by kevina20723
If I make AVS_VideoFrameBuffer and AVS_VideoFrame opaque I would have to eleminate the inline functions.Oh, duh. I somehow didn't notice they were inlined.

(Did you see my last question about memory management? I edited my post while you were replying.)

Also, when specifying the parameter types, it seems that * allows zero arguments only when applied to the first parameter. (I'm not sure if this is a problem with the C interface or with AviSynth.) Here's some sample code (http://www.csua.berkeley.edu/~jameslin/tmp/AsteriskTest.zip).

kevina
14th September 2003, 11:54
(Did you see my last question about memory management? I edited my post while you were replying.)

Please don't edit posts unless it is minor. Very Annoying.

AVS_Value will NOT free stings for you. You have to make sure it gets deleted somehow.

Also, when specifying the parameter types, it seems that * allows zero arguments only when applied to the first parameter.

That is an AVISynth problem.

kevina
2nd January 2004, 03:43
Version 0.15 is now available.

As always you can find it at http://kevin.atkinson.dhs.org/avisynth_c/

This version contains various bug fixes. I also wrote some basic documentation, including an API reference and an illustrated example.

Enjoy.

vion11
2nd January 2004, 13:51
I appreciate a robust and flexible API to avisynth.

It is a valuable path to give avisynth a gui
so more users will work with.

As far I can see the current API gives developers
complete access to all aspects of avisynth.
Loading, changing and playing of graphs/scripts
is possible.

There is also a way to create line based script
debuggers with visual control for a better handling
of complex scripts.

Unfortunately Visual Basic developper are barred,
the API still uses __cdecl instead of __stdcall
calling convention.

Quite remarkable since avisynth itself uses
the more compatible __stdcall calling convention
to export functions.

What are the next steps and how long does it will
take to get a VB compatible version of the API?

kevina
3rd January 2004, 01:53
I plan on eventually switching to the stdcall calling convention as stated in the readme. I do not have a timeframe for doing this. There are some issues I need to work out.

If you have Visual C++ you can change the C API to use stdcall by changing AVSC_CC to "__stdcall" in "avisynth_c.h" and adding "@4" to the string "avisynth_c_plugin_init" in the line = (AvisynthCPluginInitFunc)GetProcAddress(plugin, "avisynth_c_pl
ugin_init"); in "avisynth_c.cpp". You will then need to recompile. The stdcall version of the C API will NOT be binary compatible with the cdecl version. Furthermore it may cause some problems with the latest version of AviSynth since it included a cdecl version of the C API. So you might need to downgrade to AviSynth 2.5.2.

vion11
3rd January 2004, 17:03
If I have a C compiler I wouldn't ask for a VB
compatible API. And there might be a way to talk
to avisynth without your C API, when I'm determined
to a specific version.

I'd like to understand your intention to write a API,
when most spreaded development plattform can't use it.

Isn't it simply a job of find and replace to compile
a second VB compatible API, so avisynth can be integrated
in nearly every application running in the windows world?

albertgasset
8th January 2004, 00:25
Hi,

I've written a plugin in C to learn how to use the AviSynth C Interface. It's the C version of a filter I wrote some time ago in C++ (my first Avisynth filter). The C API is great, it seems to have no errors and the documentation is quite good, although beginners may need a few more examples. But rather than language-specific docs, I think more detailed information about how Avisynth works would be useful.

I used Dev-C++ 4.9.8.5 with Mingw compiler. Some functions are in assembly, in order to optimize the code. I found NASM to be very easy to use for that task.

This filter overlays two clips, it works in RGB32 and YUY2, and iits optimized for MMX. Some of the parameters are: alpha, colorkey, tolerance and fade in/out.

Download: http://www.fib.upc.es/~e7716401/Blend-1.1.zip

I really like the C interface, and its possibility to be used in any C/C++ compiler. I'm going to use it in all the Avisynth plugins I write in the future. Keep improving it and thanks!

kevina
8th January 2004, 04:46
albertgasset, thanks for the feedback. I am glad you like my C Interface.

vion11, I will release an experimental stdcall in a week or so for you to try out.

kevina
9th January 2004, 23:05
A experimental stdcall version is now available at http://kevin.atkinson.dhs.org/avisynth_c/avisynth_c-stdcall.zip .

This version IS NOT binary compatible with any other version and it might have problems with AviSynth 2.5.3 so you might need to downgrade to AviSynth 2.5.2.

vion11
9th January 2004, 23:26
Many thanks.
will include and try in the AVEditor now.
Expect feedback here....

vion11
11th January 2004, 13:34
I've started dealing with 2 functions:
-> avs_create_script_environment
-> avs_function_exists

avs_create_script_environment works and returns a value.
No more "Bad calling convention".

I pass the value back to avs_function_exists along
with a function name expecting a return code.
This forces windows to close the application.

I followed the translation rules for passing arguments
to a DLL found here (http://www.rdrop.com/~cary/program/mixed_language.html) and here (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q187/9/12.asp&NoWebContent=1&NoWebContent=1).

What exactly is the return value from avs_create_script_environment?
Is it a pointer to the structure AVS_ScriptEnvironment
found in avisynth_c.cpp?

You can find source and binary to reproduce the error here (http://innerphase.de/Setup-ApiTest.exe).

Fizick
13th January 2004, 22:07
To Kevin:
What about Borland C (Free compiler tools)?
I try use it with AVISYNTH_C 0.14, but Borland use leading underscore with their library function names.

timecop
16th January 2004, 06:34
I don't want to sound like a troll here, but what exactly is everyone's beef with VC++?

So now instead of a single codebase of plugins all written in C++, using a high quality optimizing compiler, everyone and their mother can download a commie compiler/IDE like mingw/devc++ and write a crappy slow plugin?

I appreciate the effort of whoever spent time to write the C-interface for this, but after reading all 3 pages of this thread it just seems the entire purpose was to "stick the man" and "screw micro$oft".

You DO realize that avisynth runs on Windows and ONLY on Windows? There are plenty of qualified, skillful plugin writers for avisynth. Those that can't be bothered to either
a) purchase academic version of Visual C++
b) follow numerous guides explaining how to use (unoptimizing) C/C++
compiler inside .net framework package
should probably not be writing anything important that touches my video, either.

And seeing how this thread's been around for a few months, did anyone actually write anything more than a proof-of-concept plugin yet?

kevina
16th January 2004, 07:09
Dear timecop,

You, my friend are an asshole. I do not answer to assholes. That is all I am going to say.

To the moderators. If you delete my post you better delete his and ban his from this thread. If you delete (or modify) my post with out his you will probably never hear from me again.

timecop
16th January 2004, 07:38
Originally posted by kevina20723
Dear timecop,

You, my friend are an asshole. I do not answer to assholes. That is all I am going to say.

To the moderators. If you delete my post you better delete his and ban his from this thread. If you delete (or modify) my post with out his you will probably never hear from me again.

are we that touchy?
good grief.
I just stated my opinion and asked a serious question.
no need to get all bunched up over it.

kevina
16th January 2004, 07:46
You asked it in an extremely bias way:
... commie compiler/IDE like mingw/devc++ and write a crappy slow plugin?

...it just seems the entire purpose was to "stick the man" and "screw micro$oft".

timecop
16th January 2004, 07:52
Yeah.
Then (after your immediate "screw you" reply), I searched for your posts, and lo and behold, I was right.


Thread: Intent to get Avisynth working under Linux.


However, voicing my opinion about THAT particular thread will certainly get me banned from here AND start a totally offtopic discussion.

so unless you are going to (not that I'm forcing you or anything) answer the questions in my original post, consider this discussion dropped.

and to quote a message from your linux "port" thread,

Realisticly I don't think many of the current plugin writers would care enough to port them themselves, as there is no real gain by using the C-API, expect compiler independence.

I completely agree.

vion11
16th January 2004, 10:45
And seeing how this thread's been around for
a few months, did anyone actually write anything
more than a proof-of-concept plugin yet? The API is not only useful for writing plugins.
It enables better GUIs (http://forum.doom9.org/showthread.php?s=&threadid=68392) as well.

You'll see the impact when the experimental
stdcall version is ready to work.

sh0dan
16th January 2004, 10:47
@kevina20723: That was totally uncalled for! You might disagree with timecop, but if you cannot argue by other ways that flames - don't reply! You might have noticed a rule 4 strike - you are not new here, so there are no excuses. Followup to PM - not here!


@timecop: There are plenty of good reasons to have a compiler independent API. First and foremost is that people can write plugins in whatever compiler they prefer for whatever reason.

One reason is the price of the MS Dev. studio. Another reason is that it might also open open for infacing with other languages (VB, Delphi, etc). There are plenty of good reasons, and I see avisynth_c as a great advancement for AviSynth.

kevina
16th January 2004, 11:04
@sh0dan: His question was extremely leading and insulting to me. I don't particularly like online forms so I don't know if I will be posting any more to this forum.

kevina
16th January 2004, 11:46
Here is another stdcall version to try:

http://kevin.atkinson.dhs.org/avisynth_c/avisynth_c-stdcall-def.zip .

This one was compiled with a .def file. If this doesn't work I don't know what else to do. Someone with more experence on creating a proper DLL will need to play with it.

@sh0dan: You should eventually switch AviSynth over to using the stdcall version of the C API once it gets compiled into a proper DLL.

This may very well be my last version of the C API, and my last post. I far better things to do.

timecop
16th January 2004, 11:52
Originally posted by sh0dan
@timecop: There are plenty of good reasons to have a compiler independent API. First and foremost is that people can write plugins in whatever compiler they prefer for whatever reason.

One reason is the price of the MS Dev. studio. Another reason is that it might also open open for infacing with other languages (VB, Delphi, etc). There are plenty of good reasons, and I see avisynth_c as a great advancement for AviSynth.

about the first point, I suppose I don't care as long as the plugin's performance doesnt suffer from the fact that a less capable compiler was used to generate the code,

and about the second point, i believe education version of vc++ is ~$100, and even if that is too high, you can just compile your own versions with non-optimizing .net framework compilers (free) and release the source/makefiles so that others can compile it in vc++.

but yes, I see that it is indeed useful. I was more interested to know if anyone actually used this for anything other than testing/debugging, that's all. Didn't mean to start this whole mess.

Wilbert
16th January 2004, 12:16
@kevin,

Yes, timecop's post was a bit offensive and disrespectful. I hope he also noticed that.

This may very well be my last version of the C API, and my last post. I far better things to do.
Please, give it a night to think it over. We really do appreciate your work on this, and on the other filters you have made. I will be a pity if you leave this forum, just because someone posted an offensive reply.

RB
16th January 2004, 12:24
This may be a little OT, but just in case anyone cares: for a small shipping charge, you can order the Windows DDK (http://www.microsoft.com/whdc/ddk/ordernetddkcd.mspx) from MS. While the package is intended to be used for building Windows kernel drivers, it comes with their latest optimizing compiler (command line tools, no GUI) and you can happily build user mode stuff with this as well, you just need to figure out how to set up a SOURCES file and type BUILD to compile (the included docs explain everything). Or you just drop the new compiler executables into your MSVC++ (Standard ed.) directory in the appropriate places and it will automatically recognize them (optimization settings in project settings become available etc.) :D

sh0dan
16th January 2004, 13:04
Originally posted by kevina20723
This one was compiled with a .def file. If this doesn't work I don't know what else to do. Someone with more experence on creating a proper DLL will need to play with it.

Can I just use the source from the older binary to compile the dll, or is there some other changes?

kevina
16th January 2004, 13:11
Use the source in the new zip. There are some minor changes.

sh0dan
16th January 2004, 13:18
I was thinking about "avisynth_c.cpp". I'd rather not link to the library without having the source, as this would leave me with no chance of fixing any protential problems if they should arise. Having a primary API that I cannot support is not good IMO.

Edit: Ah - found the "avisynth_c-stdcall-def.zip" file - now all is good ! :)

Edit 2: The ".def"-file seems to help. The dll exports have quite nice names by now! No more @2 and @4 names.

vion11
16th January 2004, 14:34
Strike!

Got working so far:
- avs_create_script_environment
- avs_function_exists
- avs_get_cpu_flags
- avs_check_version

These declarations work:

Private Declare Function avs_create_script_environment_
Lib "AVISYNTH_CVB.DLL" (ByVal Version As Long) As Long
Private Declare Function avs_function_exists_
Lib "AVISYNTH_CVB.DLL" (ByVal pEnv As Long, ByVal sFunction As String) As Long
Private Declare Function avs_get_cpu_flags_
Lib "AVISYNTH_CVB.DLL" (ByVal pEnv As Long) As Long
Private Declare Function avs_check_version_
Lib "AVISYNTH_CVB.DLL" (ByVal pEnv As Long, nVersion As Long) As Long

I've renamed the DLL to avoid conflicts.

Ignus2
3rd December 2006, 13:05
First and foremost, I'd like to express my BIG THANKS to kevin, as my favourite compiler is GCC, and he made it possible for me to use it for writing my avisynth plugins :thanks:

Second, I'd like to request that the avisynth_c interface be updated in the 2.6 branch.

For example, I use the Y8 format between my filters, and avisynth_c.h doesn't yet define the necessary defines and functions for it (so I had to do it in my header file). I don't know if there is anything else missing.
Could someone take a look at it? It would be much appreciated.

--
Greets!