• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Multimedia<a name="EN-US_TOPIC_0000001078026808"></a>
2
3-   [Introduction](#section11660541593)
4-   [Directory Structure](#section161941989596)
5-   [Constraints](#section119744591305)
6-   [Usage Guidelines](#section1312121216216)
7-   [Installation](#section11914418405)
8-   [Repositories Involved](#section1371113476307)
9
10## Introduction<a name="section11660541593"></a>
11
12The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and media resources.
13
14This subsystem offers various media services covering audio, videos, and cameras, which provide the following capabilities:
15
16-   Audio playback and recording
17-   Video playback and recording
18
19-   Photographing and recording \(with cameras\)
20
21## Architecture<a name="section11660541594"></a>
22
23**Figure  1**  Common architecture of the multimedia subsystem<a name="fig13371156141412"></a>
24
25
26![](figures/en-us_image_0000001163462711.png)
27
28**Figure  2**  Architecture of the multimedia subsystem suitable for the small system<a name="fig866802061417"></a>
29
30
31![](figures/multimedia-subsystem-architecture.png)
32
33**Figure  3**  Multimedia service flow for the small system<a name="fig1334042801419"></a>
34![](figures/multimedia-service-flow-for-the-small-system.png "multimedia-service-flow-for-the-small-system")
35
36## Directory Structure<a name="section161941989596"></a>
37
38The structure of the repository directory is as follows:
39
40```
41/foundation/multimedia                                 # Service code
42├── audio_lite                                         # Audio module for the small system
43│   ├── figures                                        # Architecture and process figures of the audio module for the small system
44│   ├── frameworks                                     # Audio framework implementation for the small system
45│   └── interfaces                                     # Audio module APIs for the small system
46├── audio_standard                                     # Audio module for the standard system
47│   ├── figures                                        # Architecture and process figures of the audio module for the standard system
48│   ├── frameworks                                     # Audio framework implementation for the standard system
49│   ├── interfaces                                     # Audio module APIs for the standard system
50│   ├── sa_profile                                     # Audio service profile for the standard system
51│   └── services                                       # Audio service implementation for the standard system
52├── camera_lite                                        # Camera module for the small system
53│   ├── figures                                        # Architecture and process figures of the camera module for the small system
54│   ├── frameworks                                     # Camera framework implementation for the small system
55│   └── interfaces                                     # Camera module APIs for the small system
56├── camera_standard                                    # Camera module for the standard system
57│   ├── figures                                        # Architecture and process figures of the camera module for the standard system
58│   ├── frameworks                                     # Camera framework implementation for the standard system
59│   └── interfaces                                     # Camera module APIs for the standard system
60├── media_lite                                         # Playback and recording module for the small system
61│   ├── figures                                        # Architecture and process figures of the playback and recording module for the small system
62│   ├── frameworks                                     # Playback and recording framework implementation for the small system
63│   ├── interfaces                                     # Playback and recording module APIs for the small system
64│   └── services                                       # Playback and recording service implementation for the small system
65├── media_standard                                     # Playback and recording module for the standard system
66│   ├── figures                                        # Architecture and process figures of the playback and recording module for the standard system
67│   ├── frameworks                                     # Playback and recording framework implementation for the standard system
68│   └── interfaces                                     # Playback and recording module APIs for the standard system
69└── utils                                              # Subsystem utility module
70    └── lite                                           # Utility module for the small system
71        ├── figures                                    # Architecture and process figures of the utility module for the small system
72        ├── hals                                       # Hardware abstraction interfaces of the subsystem for the small system
73        ├── interfaces                                 # Utility module APIs for the standard system
74        └── src                                        # Utility module framework implementation for the small system
75```
76
77## Constraints<a name="section119744591305"></a>
78
79Hardware-based decoding and encoding functions of audio and video data are device-specific.
80
81## Usage Guidelines<a name="section1312121216216"></a>
82
83You can use the APIs in any of the provided classes based on your development requirements.
84
85-   For details about how to call media APIs to implement the video recording, preview, and playback, see  [Multimedia Development Guide](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/subsys-multimedia.md).
86-   For a simple player, use  **Player**  and  **Recorder**  classes to quickly implement the playback and recording features.
87-   The  **CameraKit**  class provides a group of effective methods for controlling a camera, which facilitates the camera development.
88-   You can create a  **CameraKit**  object and register various callbacks to respond to many events in the multimedia module. Then, create a  **Camera**  object to operate camera resources, for example, to start preview, recording, and stream capturing, and set related parameters.
89
90## Installation<a name="section11914418405"></a>
91
92Load the kernel and related drivers before installing the repository. For details, see readme files of kernel and driver subsystems.
93
94## Repositories Involved<a name="section1371113476307"></a>
95
96[multimedia\_camera\_lite](https://gitee.com/openharmony/multimedia_camera_lite)
97
98[multimedia\_audio\_lite](https://gitee.com/openharmony/multimedia_audio_lite)
99
100[multimedia\_media\_lite](https://gitee.com/openharmony/multimedia_media_lite)
101
102[multimedia\_utils\_lite](https://gitee.com/openharmony/multimedia_utils_lite)
103
104[multimedia\_camera\_standard](https://gitee.com/openharmony/multimedia_camera_standard)
105
106[multimedia\_audio\_standard](https://gitee.com/openharmony/multimedia_audio_standard)
107
108[multimedia\_media\_standard](https://gitee.com/openharmony/multimedia_media_standard)
109
110