Changes between Version 1 and Version 2 of docs_architecture


Ignore:
Timestamp:
Feb 19, 2011, 9:44:09 PM (14 years ago)
Author:
Matthias Vogelgesang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • docs_architecture

    v1 v2  
    5454
    5555An ubiquitous scheduler sets up the threading system and connected hardware accelerators like GPUs. As this is the only instance that knows where Filters can run, it should decide if a Filter should run on the GPU by inspecting the chain of computation. Furthermore, if a Filter does not need to work on a whole buffer (that means data is separable), the scheduler might also split the Filter by creating two or more instances and provide them with split data.
     56
     57
     58=== Plugins ===
     59
     60A plugin is a shared object with well-defined entry functions and a set of filter functions. A plugin must provide
     61
     62* `plugin_init(void)` initializing the plugin if needed,
     63* `plugin_destroy(void)` freeing any structures created by the plugin,
     64* `plugin_get_filter_names(void)` returning an array of filter names that are provided by the plugins and are also the corresponding function names to call,
     65* `plugin_get_filter_description(char *filter_name)` returning a human-readable description of the purpose of filter `filter_name` and
     66* `filter_foo(char *data, int32_t width, int32_t height, int32_t bytes_per_pixel)` to call the filter.
     67
     68On the UFO side a plugin is loaded by creating an UfoPlugin object and passing the name of the .so file. An UfoPlugin is a relatively thin wrapper that just calls `dlopen()` (or the respective equivalent on other operating systems) to load the shared object and returns UfoFilters by reading the function pointers according to the filter name.