The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and media resources.
The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and media resources.
...
@@ -8,23 +16,24 @@ This subsystem offers various media services covering audio, videos, and cameras
...
@@ -8,23 +16,24 @@ This subsystem offers various media services covering audio, videos, and cameras
- Audio playback and recording
- Audio playback and recording
- Video playback and recording
- Video playback and recording
- Photographing and recording \(with cameras\)
- Photographing and recording \(with cameras\)
## Architecture<a name="section11660541594"></a>
## System Architecture<a name="section11660541594"></a>
**Figure 1** Common architecture of the multimedia subsystem<aname="fig13371156141412"></a>

**Figure 1** Architecture of the multimedia subsystem<aname="fig99659301300"></a>
**Figure 2** Architecture of the multimedia subsystem suitable for the small system<aname="fig866802061417"></a>

-**Media**: provides playback and recording APIs for applications, and invokes the Gstreamer, Histreamer, or other engines through cross-process calling or direct calling.
- For the mini system, the media component invokes Histreamer to support audio playback.
- For the small system, the media component invokes recorder_lite to support audio/video recording and invokes player_lite by default to support audio/video playback. If the system variable **debug.media_service.histreamer** is set to **1**, the component invokes Histreamer to support audio/video playback. For details, see [syspara Module](https://device.harmonyos.com/en/docs/documentation/guide/subsys-boot-syspara-0000001063362360) or [syspara_lite](https://gitee.com/openharmony/startup_syspara_lite).
**Figure 3** Multimedia service flow for the small system<aname="fig1334042801419"></a>
- For the standard system, the media component invokes Gstreamer to support audio/video playback and recording.
-**Audio**: supports audio input and output, policy management, and audio focus management.
-**Camera**: provides camera operation APIs for preview, photographing, and video recording.
-**Image**: supports encoding and decoding of common image formats.
-**MediaLibrary**: supports local and distributed media data access management.
-**Histreamer**: a lightweight media engine that supports file/network streaming media input, audio/video decoding and playback, audio/video encoding and recording, and plugin extension.
-**Gstreamer**: an open-source GStreamer engine that supports streaming media, audio and video playback, and recording.