[ English | 简体中文 ]

Multimedia API

The openvela multimedia framework provides unified capabilities for audio/video playback, recording, audio focus management, policy control, and media session, along with voice wakeup and utility interfaces.

openvela Implementation Notes

  • Codec Backend: The underlying audio/video codec, muxing/demuxing, and filter capabilities are provided by FFmpeg, with source located at external/ffmpeg/ (LGPL v2.1+)

  • Usage Recommendations:

    • Prefer the openvela framework/media wrappers (media_player_* / media_recorder_*, etc.), which integrate audio focus, policy control, and session synchronization
    • For custom filter graphs, direct codec access, or probing non-standard streaming media, use the FFmpeg native API directly; refer to the FFmpeg Official Documentation
  • FFmpeg Integration Configuration (external/ffmpeg/Kconfig):

    CONFIG_LIB_FFMPEG=y                # Main switch: enable FFmpeg library
    CONFIG_LIB_FFMPEG_CONFIGURATION="" # Arguments passed to FFmpeg ./configure for component trimming
    CONFIG_LIB_FFMPEG_TEST=n           # Whether to compile FFmpeg test targets
    CONFIG_UTILS_FFMPEG_PRIORITY=100   # Task priority for the ffmpeg CLI tool
    CONFIG_UTILS_FFMPEG_STACKSIZE=51200 # Task stack size for the ffmpeg CLI tool
    

    Component trimming is done via the CONFIG_LIB_FFMPEG_CONFIGURATION string passed to FFmpeg's built-in ./configure script. For example:

    CONFIG_LIB_FFMPEG_CONFIGURATION="--disable-everything --enable-decoder=mp3,aac --enable-demuxer=mov,mp4"
    

    For available --enable-* / --disable-* options, refer to FFmpeg's official ./configure --help.

Core Capabilities

  • Player — Audio/video playback (local/network stream/byte stream)
  • Recorder — Audio/video recording and image capture
  • Media Session — Controller-controllee playback control and state synchronization

Audio Policy

  • Audio Focus — Multi-application audio playback priority coordination
  • Audio Policy — Audio routing, device management, volume and mode switching

Voice Wakeup

  • Media Trigger — High-level voice wakeup interface (acoustic model loading + recognition control)
  • Sound Model — Low-level acoustic model operations (loading/properties/hotword detection)

Utilities and Debugging

  • Media Utils — DTMF signal generation, event name lookup, dump, custom commands