multimedia.md 6.9 KB
Newer Older
M
mamingshuai 已提交
1
# Multimedia<a name="EN-US_TOPIC_0000001078026808"></a>
W
wenjun 已提交
2

M
mamingshuai 已提交
3
## Introduction<a name="section11660541593"></a>
W
wenjun 已提交
4

M
mamingshuai 已提交
5
The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and media resources.
W
wenjun 已提交
6

M
mamingshuai 已提交
7
This subsystem offers various media services covering audio, videos, and cameras, which provide the following capabilities:
L
liudongmiao 已提交
8

M
mamingshuai 已提交
9 10
-   Audio playback and recording
-   Video playback and recording
L
liudongmiao 已提交
11

M
mamingshuai 已提交
12
-   Photographing and recording \(with cameras\)
W
wenjun 已提交
13

14 15 16
## Architecture<a name="section11660541594"></a>

**Figure  1**  Common architecture of the multimedia subsystem<a name="fig13371156141412"></a>  
W
wenjun 已提交
17 18


M
mamingshuai 已提交
19
![](figures/en-us_image_0000001163462711.png)
W
wenjun 已提交
20

21
**Figure  2**  Architecture of the multimedia subsystem suitable for the small system<a name="fig866802061417"></a>  
W
wenjun 已提交
22

M
mamingshuai 已提交
23 24 25 26 27 28 29 30 31

![](figures/multimedia-subsystem-architecture.png)

**Figure  3**  Multimedia service flow for the small system<a name="fig1334042801419"></a>  
![](figures/multimedia-service-flow-for-the-small-system.png "multimedia-service-flow-for-the-small-system")

## Directory Structure<a name="section161941989596"></a>

The structure of the repository directory is as follows:
L
liudongmiao 已提交
32 33

```
M
mamingshuai 已提交
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
/foundation/multimedia                                 # Service code
├── audio_lite                                         # Audio module for the small system
│   ├── figures                                        # Architecture and process figures of the audio module for the small system
│   ├── frameworks                                     # Audio framework implementation for the small system
│   └── interfaces                                     # Audio module APIs for the small system
├── audio_standard                                     # Audio module for the standard system
│   ├── figures                                        # Architecture and process figures of the audio module for the standard system
│   ├── frameworks                                     # Audio framework implementation for the standard system
│   ├── interfaces                                     # Audio module APIs for the standard system
│   ├── sa_profile                                     # Audio service profile for the standard system
│   └── services                                       # Audio service implementation for the standard system
├── camera_lite                                        # Camera module for the small system
│   ├── figures                                        # Architecture and process figures of the camera module for the small system
│   ├── frameworks                                     # Camera framework implementation for the small system
│   └── interfaces                                     # Camera module APIs for the small system
├── camera_standard                                    # Camera module for the standard system
│   ├── figures                                        # Architecture and process figures of the camera module for the standard system
│   ├── frameworks                                     # Camera framework implementation for the standard system
│   └── interfaces                                     # Camera module APIs for the standard system
├── media_lite                                         # Playback and recording module for the small system
│   ├── figures                                        # Architecture and process figures of the playback and recording module for the small system
│   ├── frameworks                                     # Playback and recording framework implementation for the small system
│   ├── interfaces                                     # Playback and recording module APIs for the small system
│   └── services                                       # Playback and recording service implementation for the small system
├── media_standard                                     # Playback and recording module for the standard system
│   ├── figures                                        # Architecture and process figures of the playback and recording module for the standard system
│   ├── frameworks                                     # Playback and recording framework implementation for the standard system
│   └── interfaces                                     # Playback and recording module APIs for the standard system
└── utils                                              # Subsystem utility module
    └── lite                                           # Utility module for the small system
        ├── figures                                    # Architecture and process figures of the utility module for the small system
        ├── hals                                       # Hardware abstraction interfaces of the subsystem for the small system
        ├── interfaces                                 # Utility module APIs for the standard system
        └── src                                        # Utility module framework implementation for the small system
L
liudongmiao 已提交
68
```
W
wenjun 已提交
69

M
mamingshuai 已提交
70
## Constraints<a name="section119744591305"></a>
W
wenjun 已提交
71

M
mamingshuai 已提交
72
Hardware-based decoding and encoding functions of audio and video data are device-specific.
W
wenjun 已提交
73

M
mamingshuai 已提交
74
## Usage Guidelines<a name="section1312121216216"></a>
W
wenjun 已提交
75

M
mamingshuai 已提交
76
You can use the APIs in any of the provided classes based on your development requirements.
H
harmony_zhangjian 已提交
77

78
-   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).
M
mamingshuai 已提交
79 80 81
-   For a simple player, use  **Player**  and  **Recorder**  classes to quickly implement the playback and recording features.
-   The  **CameraKit**  class provides a group of effective methods for controlling a camera, which facilitates the camera development.
-   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.
W
wenjun 已提交
82

M
mamingshuai 已提交
83
## Installation<a name="section11914418405"></a>
W
wenjun 已提交
84

85
Load the kernel and related drivers before installing the repository. For details, see readme files of kernel and driver subsystems.
H
harmony_zhangjian 已提交
86

M
mamingshuai 已提交
87
## Repositories Involved<a name="section1371113476307"></a>
W
wenjun 已提交
88

89
[multimedia\_camera\_lite](https://gitee.com/openharmony/multimedia_camera_lite)
W
wenjun 已提交
90

91
[multimedia\_audio\_lite](https://gitee.com/openharmony/multimedia_audio_lite)
W
wenjun 已提交
92

93
[multimedia\_media\_lite](https://gitee.com/openharmony/multimedia_media_lite)
W
wenjun 已提交
94

95
[multimedia\_utils\_lite](https://gitee.com/openharmony/multimedia_utils_lite)
W
wenjun 已提交
96

97
[multimedia\_camera\_standard](https://gitee.com/openharmony/multimedia_camera_standard)
W
wenjun 已提交
98

99
[multimedia\_audio\_standard](https://gitee.com/openharmony/multimedia_audio_standard)
W
wenjun 已提交
100

101
[multimedia\_media\_standard](https://gitee.com/openharmony/multimedia_media_standard)
H
hangliebe 已提交
102