Addon Interfaces Library: Overview

Updated: April 19, 2023

The Addon Interfaces (AOI) library (libaoi.so) provides a framework for developing and using addon interfaces.

An addon is an implementation of a set of interfaces that provide some new functionality and that can be dynamically loaded and unloaded by an application. An interface is a group of related functions and data.

By using a known set of interfaces, you can add functionality to deployed applications without having to recompile and redeploy them. For example, the multimedia renderer utility (mm-renderer), which ships with the Multimedia for QNX SDP, interacts with filters through standard addon interfaces. This design allows mm-renderer to play videos in new formats as they become available, simply by looking for filters that support the new formats.

This approach to dynamically adding functionality is different from simply loading a DLL at runtime using dlopen() because the application doesn't have to know the specific functionality contained by the DLL in advance. Rather, the application can search the DLL for a known interface and access that functionality if it's available.

If an application needs to store state information for one or more interfaces, it can create a context. The context holds whatever state information is needed, generally in a private format that isn't accessed directly. For example, a streamer context could store the position and length or it could store a file pointer, depending on how the interfaces are implemented.