Avisynth is a powerful videoframeserver which does base on a hughe amount of available plugins for videoediting.
Such plugins till now have only been developed in C++ and C.
I wanted to make PB coders also be able to do some nice image processing development on Avisynth and so I did port the C interface of Avisynth to Purebasic, including an example dll code and of course an example mini appl. where VideoInfos can be received. Means where its shown how to invoke avisynth commands directly without the VFW Avifile Interface.
The Downloads:
Avisynth.pbi <-- The header which always has to be 'included'
invert_inplace.pb <-- a simple sample plugin where the videostream gets inverted
avisynth_get_video_info.pb <-- a mini sample appl. where you can receive the videoinfos
Avisynths main page: http://avisynth.org
The filter SDK: http://avisynth.org/mediawiki/Filter_SDK
The dev. forum: http://forum.doom9.org/forumdisplay.php?f=69
Kevin Atkinsons API explanation of the Avisynth C Interface (and therefore also the PureBasic port): http://kevin.atkinson.dhs.org/avisynth_c/
If you do encounter bugs, please feel free to check the PB port by comparing to the original avisynth_c.h headerfile
Well by getting into videoimage processing maybe some people can proofe their skills on programming "fast-code" for image processing routines
Enjoy,
Inc.
Avisynth support in Purebasic
Avisynth support in Purebasic
Check out OOP support for PB here!
-
- Addict
- Posts: 1656
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Avisynth support in Purebasic
Hi, Inc.
I finally started digging into your example and looking at it. However when I went to compile the example program, the wrapper (Avisynth.pbi) throws an error on compilation. I am using PureBasic x32 versions 4.51
Sorry to bug you about this, I know you probably haven't touched in years.
I finally started digging into your example and looking at it. However when I went to compile the example program, the wrapper (Avisynth.pbi) throws an error on compilation. I am using PureBasic x32 versions 4.51
Here is the Structure/Union block generating the error.PureBasic Compiler wrote: [COMPILER]Line 116: Object mix (numeric, string, array, list and map) is not allowed in StructureUnion
Code: Select all
108: Structure sAVS_Value
109: type.w; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong
110: array_size.w
111: StructureUnion
112: *clip ; // do not use directly, use avs_take_clip
113: boolean.b
114: integer.l
115: floating_pt.f
116: string.s
117: *array.sAVS_Value
118: EndStructureUnion
119: EndStructure
Sorry to bug you about this, I know you probably haven't touched in years.
Re: Avisynth support in Purebasic
Seems that in structures strings aren't supported beside numerical elements anymore.
But as its a simple common pointer to a char array you can change the purebasic string element it to a pointer element of the structure.
But as its a simple common pointer to a char array you can change the purebasic string element it to a pointer element of the structure.
So by using PeekS or PokeS on that pointer you can change the string contend108: Structure sAVS_Value
109: type.w; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong
110: array_size.w
111: StructureUnion
112: *clip ; // do not use directly, use avs_take_clip
113: boolean.b
114: integer.l
115: floating_pt.f
116: *string
117: *array.sAVS_Value
118: EndStructureUnion
119: EndStructure
Check out OOP support for PB here!