Inc
19th December 2005, 10:01
Hi,
Im working under Purebasic and so for accessing frames using avisynth directly (without vfw) the avisynth_c interface option for me looks quite interesting.
I had a look at the api reference ...
http://kevin.atkinson.dhs.org/avisynth_c/api.html
and at the avisynth_c.h out of the stdcall package from kevin atkinson which to me it seems that this equals? to the avisynth_c interface in the recent avisynth builds from shodan?
So for accessing frames I googled a bit and found this site where the developer himself posted an example:
http://www.mail-archive.com/wine-devel@winehq.org/msg00458.html
To me the most importand lines for getting the "invoke" command working seem to be these ones:
AVS_ScriptEnvironment * env =
avs_create_script_environment(AVISYNTH_INTERFACE_VERSION);
AVS_Value arg0 = avs_new_value_string(argv[1]);
AVS_Value args = avs_new_value_array(&arg0, 1);
AVS_Value res = avs_invoke(env, "avisource", args, 0);
...
...
...
...
AVS_Clip * clip = avs_take_clip(res, env)
AVS_VideoFrame * f = avs_get_frame(clip, i)
So that code above seems to be equal to
Avisource("xxxxxxxxx.yyy")
So "argv[1]" seems to be 1 argument to the videoclip if I understood right and that argument is a string including "xxxxxxxxx.yyy".
Now what about sending more then one argument to the "invoke" command, like Levels(5,1.0,250,0,255,coring="false")
?
Thanks for all kinds of assistance.
Inc.
Im working under Purebasic and so for accessing frames using avisynth directly (without vfw) the avisynth_c interface option for me looks quite interesting.
I had a look at the api reference ...
http://kevin.atkinson.dhs.org/avisynth_c/api.html
and at the avisynth_c.h out of the stdcall package from kevin atkinson which to me it seems that this equals? to the avisynth_c interface in the recent avisynth builds from shodan?
So for accessing frames I googled a bit and found this site where the developer himself posted an example:
http://www.mail-archive.com/wine-devel@winehq.org/msg00458.html
To me the most importand lines for getting the "invoke" command working seem to be these ones:
AVS_ScriptEnvironment * env =
avs_create_script_environment(AVISYNTH_INTERFACE_VERSION);
AVS_Value arg0 = avs_new_value_string(argv[1]);
AVS_Value args = avs_new_value_array(&arg0, 1);
AVS_Value res = avs_invoke(env, "avisource", args, 0);
...
...
...
...
AVS_Clip * clip = avs_take_clip(res, env)
AVS_VideoFrame * f = avs_get_frame(clip, i)
So that code above seems to be equal to
Avisource("xxxxxxxxx.yyy")
So "argv[1]" seems to be 1 argument to the videoclip if I understood right and that argument is a string including "xxxxxxxxx.yyy".
Now what about sending more then one argument to the "invoke" command, like Levels(5,1.0,250,0,255,coring="false")
?
Thanks for all kinds of assistance.
Inc.