Updated: May 06, 2022

Functions that an ADAS viewer plugin library must implement


#include <adas/adas_viewer_plugin.h>
typedef struct adas_viewer_plugin {
    adas_viewer_plugin_init_t init;
    adas_viewer_plugin_deinit_t deinit;
    adas_viewer_plugin_program_t program;
    adas_viewer_plugin_process_t process_frame;
} adas_viewer_plugin_t;


adas_viewer_plugin_init_t init
The function to initialize the ADAS viewer plugin.
adas_viewer_plugin_deinit_t deinit
The function to deinitialize the ADAS viewer plugin.
adas_viewer_plugin_program_t program
The function that sets up the ADAS viewer plugin.
adas_viewer_plugin_process_t process_frame
The function that processes input frames.




The ADAS viewer plugin library must define an instance of this structure named adas_viewer_plugin_defs or adas_viewer_plugin_defs_tag, where the tag is a character string of your choice.

If only one custom camera driver is needed, we recommend not using a tag. If multiple viewer plugin drivers are desired in the same plugin library, a different tag should be used for each one. The ADAS library will use this custom driver to interface with the ADAS viewer. The tag to use must be specified in the ADAS configuration file.

For example, an external library that defines one driver will contain:
adas_viewer_plugin_t adas_viewer_plugin_defs = {
  init: my_init,
  deinit : my_deinit,
  program : my_program,
  process_frame : my_process

For example, an external library that defines two different drivers will contain:

adas_viewer_plugin_t adas_viewer_plugin_defs_driver1 = {
  init: my_init_for_driver1,

adas_viewer_plugin_t adas_viewer_plugin_defs_driver2 = {
  init: my_init_for_driver2,