fixed example for plugins
This commit is contained in:
parent
db4ee5b8ad
commit
8c1f324c55
2 changed files with 17 additions and 12 deletions
|
|
@ -35,11 +35,11 @@ void bye(const char* m)
|
||||||
}
|
}
|
||||||
|
|
||||||
CINELERRA_INTERFACE_IMPLEMENT(hello, 1, german, myopen, myclose,
|
CINELERRA_INTERFACE_IMPLEMENT(hello, 1, german, myopen, myclose,
|
||||||
//CINELERRA_INTERFACE_FUNC(hello, hallo),
|
hallo,
|
||||||
//CINELERRA_INTERFACE_FUNC(goodbye, tschuess)
|
tschuess
|
||||||
);
|
);
|
||||||
|
|
||||||
CINELERRA_INTERFACE_IMPLEMENT(hello, 1, english, myopen, myclose,
|
CINELERRA_INTERFACE_IMPLEMENT(hello, 1, english, myopen, myclose,
|
||||||
//CINELERRA_INTERFACE_FUNC(hello, hello),
|
hello,
|
||||||
//CINELERRA_INTERFACE_FUNC(goodbye, bye)
|
bye
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ int
|
||||||
main(int argc, char** argv)
|
main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
NOBUG_INIT;
|
NOBUG_INIT;
|
||||||
|
|
||||||
|
cinelerra_init_plugin ();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
we have a plugin 'hello_1' which provides us 2 hello interfaces, one for english and one for german output,
|
we have a plugin 'hello_1' which provides us 2 hello interfaces, one for english and one for german output,
|
||||||
open both try them, close them.
|
open both try them, close them.
|
||||||
|
|
@ -15,20 +18,22 @@ main(int argc, char** argv)
|
||||||
|
|
||||||
TODO("macros, doing casting and typing");
|
TODO("macros, doing casting and typing");
|
||||||
|
|
||||||
CINELERRA_INTERFACE_TYPE(hello, 1)* hello_de = (CINELERRA_INTERFACE_TYPE(hello, 1)*)
|
CINELERRA_INTERFACE_TYPE(hello, 1)* hello_de =
|
||||||
cinelerra_interface_open ("hello_1", "german_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1)));
|
(CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "german_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1)));
|
||||||
TODO("new error handling, when finished if (!hello_de) CINELERRA_DIE");
|
|
||||||
|
if (!hello_de) CINELERRA_DIE("loading plugin failed");
|
||||||
|
|
||||||
hello_de->hello();
|
hello_de->hello();
|
||||||
|
|
||||||
|
|
||||||
// struct hello_interface_1* hello_en =
|
CINELERRA_INTERFACE_TYPE(hello, 1)* hello_en =
|
||||||
// cinelerra_interface_open ("hello_1", "english_1", sizeof(struct hello_interface_1));
|
(CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "english_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1)));
|
||||||
// TODO if (!hello_en) CINELERRA_DIE;
|
|
||||||
|
|
||||||
//hello_en->hello();
|
if (!hello_en) CINELERRA_DIE("loading plugin failed");
|
||||||
|
|
||||||
//cinelerra_interface_close (hello_en);
|
hello_en->hello();
|
||||||
|
|
||||||
|
cinelerra_interface_close (hello_en);
|
||||||
cinelerra_interface_close (hello_de);
|
cinelerra_interface_close (hello_de);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue