example code showing plugin usage
This commit is contained in:
parent
ba4a14e183
commit
bd218fb7ca
2 changed files with 31 additions and 0 deletions
3
tests/examples/DIR_INFO
Normal file
3
tests/examples/DIR_INFO
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
working example code
|
||||
This directory contains example code which shows how to use specific features.
|
||||
All examples will be build and run as part of the testsuite
|
||||
28
tests/examples/plugin_main.c
Normal file
28
tests/examples/plugin_main.c
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
|
||||
#include "plugin.h"
|
||||
#include "hello_interface.h"
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
struct hello_interface_1* hello_de =
|
||||
cinelerra_interface_open ("hello_1", "german_1", sizeof(struct hello_interface_1));
|
||||
if (!hello) CINELERRA_DIE;
|
||||
|
||||
struct hello_interface_1* hello_en =
|
||||
cinelerra_interface_open ("hello_1", "english_1", sizeof(struct hello_interface_1));
|
||||
if (!hello) CINELERRA_DIE;
|
||||
|
||||
hello_de->say_hello();
|
||||
hello_en->say_hello();
|
||||
|
||||
cinelerra_interface_close (hello_en);
|
||||
cinelerra_interface_close (hello_de);
|
||||
}
|
||||
Loading…
Reference in a new issue