AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Avisynth 2,5/2,6 Plugin

Ein Thema von Garfield · begonnen am 27. Sep 2014 · letzter Beitrag vom 14. Okt 2014
Antwort Antwort
Benutzerbild von Garfield
Garfield

Registriert seit: 9. Jul 2004
Ort: Aken (Anhalt-Bitterfeld)
1.335 Beiträge
 
Delphi XE5 Professional
 
#1

AW: Avisynth 2,5/2,6 Plugin

  Alt 28. Sep 2014, 08:02
Wenn ich das richtig lese, schlägt die Initialisierung fehl.

In dem Beispiel wird so initialisiert:
Code:
// This is the function that created the filter, when the filter has been called.
// This can be used for simple parameter checking, so it is possible to create different filters,
// based on the arguments recieved.

AVSValue __cdecl Create_SimpleSample(AVSValue args, void* user_data, IScriptEnvironment* env) {
    return new SimpleSample(args[0].AsClip(),env);
    // Calls the constructor with the arguments provied.
}


// The following function is the function that actually registers the filter in AviSynth
// It is called automatically, when the plugin is loaded to see which functions this filter contains.

extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env) {
    env->AddFunction("SimpleSample", "c", Create_SimpleSample, 0);
    // The AddFunction has the following paramters:
    // AddFunction(Filtername , Arguments, Function to call,0);

    // Arguments is a string that defines the types and optional names of the arguments for you filter.
    // c - Video Clip
    // i - Integer number
    // f - Float number
    // s - String
    // b - boolean

    return "`SimpleSample' SimpleSample plugin";
    // A freeform name of the plugin.
}
In meinem Delphiprojekt:
Delphi-Quellcode:
function avisynth_c_plugin_init(env: PAVS_ScriptEnvironment): PChar; stdcall;
begin
  avs_add_function(env, 'avsBasic', avsBasic.AviSynthDescription, @create_avsBasic, nil);

  Result := 'avsBasic';
end;

exports
  avisynth_c_plugin_init;
end.
Delphi-Quellcode:
const
  AviSynthDescription = '[src]c';

function create_avsBasic(args: MSVC_AVS_Value; use_inplace: Pointer; env: PAVS_ScriptEnvironment): MSVC_AVS_Value; stdcall;
var
  avsargs : AVS_Value;
begin;
  {
  *  Parameter übernehmen.
  }

  avsargs := AVS_Value(args);
end;
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:40 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz