va_tool.h🔗

#include <va_tool.h>

Defines

VA_IMPLEMENT_PLUGIN(COMPONENT_ID, COMPONENT_VERSION)🔗

Generates code for a plugin entry point function, va_get_plugin_info.

Parameters
  • COMPONENT_ID: A globally unique identifier for the component the plugin will be placed into. If a component contains many plugins, the same component ID must be used in all of them. The component ID is used as a namespace for the tools that are defined within the component. The fully-qualified name for a tool will be composed of the component ID, its major version number and the name of the tool, for example com.visionappster.demo/1/MySum.

  • COMPONENT_VERSION: The version number of the component. The version number has three parts: major.minor.patch. If a change in the plugin breaks existing functionality, the major version number must be incremented. Features can be added but not removed when changing the minor version number. If a release does not add new functionality but just improves or fixes the implementation, patch must be incremented. Version numbering can be started at any number, but usually 1.0.0 marks the first release.

VA_IMPLEMENT_LICENSED_PLUGIN(COMPONENT_ID, COMPONENT_VERSION)🔗

Generates code for a plugin entry point function, va_get_plugin_info.

This macro works the same way as VA_IMPLEMENT_PLUGIN, but it also generates a piece of code that checks the component ID when the plugin is being loaded. This makes it hard to load the plugin without a valid license.

Typedefs

typedef void (*va_registration_func)(const char*, ...)🔗

The type of the registration function that will be passed as a function pointer to a plugin initialization function when a plugin is loaded.

The initialization function uses the registration function to register tool instances to the VisionAppster platform.

typedef void *(*va_construct_func)(void*)🔗

The type of a tool instance constructor function.

typedef void (*va_destruct_func)(void*)🔗

The type of a tool instance destructor function.

typedef int32_t (*va_process_func)(void*, void*)🔗

The type of a processing function that actually performs the job of a registered tool.

typedef void (*va_notify_func)(void*, va_event_type, void*)🔗

The type of a notification function that receives event notifications.

typedef int32_t (*va_strerror_func)(int32_t, va_string**)🔗

The type of a function that fetches an error message for a status code.

typedef void (*va_get_value_func)(const void*, void*)🔗

The type of a function that is used to retrieve default parameter values and values of meta-data entries.

typedef void (*va_plugin_init_func)(va_registration_func)🔗

The type of a function that registers tools in a plug-in.

typedef va_plugin_status (*va_plugin_info_func)(struct va_plugin_info*)🔗

The type of a function that returns basic information about a plug-in.

Enums

enum va_tool_info_type🔗

Data identifiers for a tool registration call.

There is usually no need to manually enter these values because the registration macros automatically use them where needed. They may be needed as a work-around if the number of variable arguments in a registration macro call grows larger than a particular C preprocessor implementation can handle.

Values:

enumerator va_tool_end_of_data🔗
enumerator va_tool_name🔗
enumerator va_tool_group🔗
enumerator va_tool_tag🔗
enumerator va_tool_construct🔗
enumerator va_tool_destruct🔗
enumerator va_tool_process🔗
enumerator va_tool_notify🔗
enumerator va_tool_required_input🔗
enumerator va_tool_optional_input🔗
enumerator va_tool_fixed_input🔗
enumerator va_tool_output🔗
enumerator va_tool_static_meta🔗
enumerator va_tool_dynamic_meta🔗
enumerator va_tool_exemode🔗
enumerator va_tool_strerror🔗
enumerator va_tool_last_info_type🔗
enum va_event_type🔗

Event types.

Values:

enumerator va_event_started🔗

The processing graph containing the tool was just started.

This event happens before the first call to process.

enumerator va_event_stopped🔗

The processing graph containing the tool was just stopped.

This event happens after the last call to process.

enum va_execution_mode🔗

Execution modes.

A tool can specify a single execution mode or a bitwise OR of supported modes.

Values:

enumerator va_execute_nonthreaded🔗

The tool will be executed immediately when input data is available in the context of the thread that produced the last missing parameter.

The thread may be different from time to time, but no concurrent calls will happen.

enumerator va_execute_singlethreaded🔗

The tool will be executed in a dedicated processing thread.

enumerator va_execute_multithreaded🔗

The tool will be executed by an arbitrary processing thread from a thread pool.

Many calls may be active simultaneously.

enumerator va_execute_any🔗

All execution modes are supported.