Fundamentals 16 min read

Unlocking Multimedia Power: OpenMAX Architecture for Cross‑Platform Plug‑in Algorithms

This article explains the OpenMAX (OMX) multimedia acceleration standard, its three-layer architecture (Application, Integration, Development), how it’s used in frameworks like gStreamer, StageFright, and the AVProcessEngine plugin library to modularize audio, video, and image algorithms across Android, iOS, macOS, and Windows platforms.

NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
Unlocking Multimedia Power: OpenMAX Architecture for Cross‑Platform Plug‑in Algorithms

OMX Overview

OpenMAX (Open Media Acceleration) is a free, cross‑platform multimedia standard developed by the Khronos Group. It defines a common specification for audio, video, image, and speech algorithms, allowing developers to focus on higher‑level application logic instead of rewriting low‑level functions. OMX is used in frameworks such as FFmpeg, GStreamer, and Android’s Stagefright.

OMX Layered Architecture

OMX consists of three layers from top to bottom: Application Layer (AL), Integration Layer (IL), and Development Layer (DL). Implementers may realize any combination of these layers according to their needs.

Application Layer (OpenMAX AL)

The AL provides a standard interface between multimedia applications and the middle layer, ensuring portability. In practice, most developers rarely use the raw AL API directly.

Integration Layer (OpenMAX IL)

The IL offers a unified way for applications and frameworks to access codec and other components, hiding implementation details. Components are encapsulated behind interfaces; the IL API allows loading, controlling, connecting, and unloading components. Key concepts include IL Client, IL Core, and IL Component.

IL Client : the caller of the OpenMAX IL API, such as a multimedia framework or an application.

IL Core : loads components into memory and manages their lifecycle.

IL Component : functional modules (sources, sinks, filters, splitters, mixers) identified by names like OMX.vendor_name.component_name.

Development Layer (OpenMAX DL)

The DL defines a comprehensive set of audio, video, and image processing APIs that chip vendors can implement and that codec vendors can use. It includes functions such as FFT, filters, color‑space conversion, and video primitives.

OMX in Multimedia Frameworks

GStreamer Plugin Integration

GStreamer is a cross‑platform pipeline‑based multimedia framework where each functionality is a plug‑in. GStreamer plugins can be built on top of OMX components via the gst‑omx plug‑in, which acts as an OMX IL client.

gst‑plugins‑base: essential plugins for GStreamer applications.

gst‑plugins‑good: high‑quality LGPL plugins.

gst‑plugins‑ugly: high‑quality plugins with GPL licensing.

gst‑plugins‑bad: plugins under development.

gst‑libav: libav wrapper providing many encoders/decoders.

StageFright Integration

StageFright is Android’s native media playback engine. It uses OpenMAX IL components for both software and hardware codecs. The MediaPlayerService exposes playback to the Java layer, while the underlying StageFright core interacts with OMX components through a shared‑memory handler mechanism.

AVProcessEngine – A Multimedia Algorithm Plug‑in Library Based on OMX IL

AVProcessEngine is an OMX‑IL‑based plug‑in library that can be used by WebRTC, video players, and other media applications. It provides a unified API (AVProcessEngine API) to access algorithms such as beauty filters, face detection, audio AI howling suppression, and AI denoising. Components are delivered as dynamic libraries and loaded on demand, reducing SDK size.

Key Interfaces

/// Create a component instance and obtain its handler
OMX_ERRORTYPE makeComponentInstance(
    OMX_STRING component_name,
    OMX_CALLBACKTYPE *callbacks,
    OMX_PTR appData,
    OMX_COMPONENTTYPE **component);

/// Destroy a component instance
OMX_ERRORTYPE destroyComponentInstance(
    OMX_COMPONENTTYPE *component);

/// Enumerate supported components
OMX_ERRORTYPE enumerateComponents(
    OMX_STRING component_name,
    size_t size,
    OMX_U32 index);

/// Find the matching library name for a component
OMX_STRING findMatchingComponentLibName(OMX_STRING component_name);

A static mapping table links component names, library suffixes, and roles, e.g.:

static const struct {
    const char *mName;          // Component name
    const char *mLibNameSuffix; // Library suffix
    const char *mRole;           // Component role
} kComponents[] = {
    {"OMX.netease.beauty.process", "NERtcBeauty", "imageprocess.beauty"},
    {"OMX.netease.detect.process", "NERtcFaceDetect", "imageprocess.detect"},
    {"OMX.netease.aihowling.process", "NERtcAiHowlingd", "audioprocess.aihowling"},
    {"OMX.netease.aidenoise.process", "NERtcAiDenoised", "imageprocess.aidenoise"},
    // ...
};

Component Handler Retrieval

Handlers are obtained via a LibLoader module that loads the component’s shared library into memory and stores <LibName, Handler> pairs in shared memory. The plug‑in then queries this map to access the component’s standard interfaces.

Cross‑Platform Library Loading

Android: System.loadLibrary loads .so files placed in jniLibs.

iOS/macOS: libraries are packaged as Frameworks.

Windows: LoadLibraryEx loads .dll files.

Practical Reflections

The clear layered structure of OMX, with concise APIs at each level, offers a useful model for modularizing multimedia algorithms. Although the original specification predates many modern AI‑driven parameters, its component‑based approach can be extended to accommodate new algorithmic needs while keeping portability and ease of integration.

plugin architectureMultimediagStreamerAVProcessEngineOpenMAXStageFright
NetEase Smart Enterprise Tech+
Written by

NetEase Smart Enterprise Tech+

Get cutting-edge insights from NetEase's CTO, access the most valuable tech knowledge, and learn NetEase's latest best practices. NetEase Smart Enterprise Tech+ helps you grow from a thinker into a tech expert.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.