• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Mar-2025-

figures/H17-Mar-2025-

frameworks/native/H17-Mar-2025-8,7637,023

interfaces/H17-Mar-2025-12,2765,090

sa_profile/H17-Mar-2025-3229

services/H17-Mar-2025-97,51381,529

test/H17-Mar-2025-1,049,182856,894

.gitignoreH A D17-Mar-2025129 87

BUILD.gnH A D17-Mar-2025805 2320

LICENSEH A D17-Mar-202511.1 KiB202169

OAT.xmlH A D17-Mar-20254.4 KiB7621

README.mdH A D17-Mar-2025952 3725

README_zh.mdH A D17-Mar-20254.9 KiB10077

bundle.jsonH A D17-Mar-20258.8 KiB259258

config.gniH A D17-Mar-20253.3 KiB121107

hisysevent.yamlH A D17-Mar-20252.5 KiB5347

README.md

1# av_codec
2
3#### Description
4{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
5
6#### Software Architecture
7Software architecture description
8
9#### Installation
10
111.  xxxx
122.  xxxx
133.  xxxx
14
15#### Instructions
16
171.  xxxx
182.  xxxx
193.  xxxx
20
21#### Contribution
22
231.  Fork the repository
242.  Create Feat_xxx branch
253.  Commit your code
264.  Create Pull Request
27
28
29#### Gitee Feature
30
311.  You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
322.  Gitee blog [blog.gitee.com](https://blog.gitee.com)
333.  Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
344.  The most valuable open source project [GVP](https://gitee.com/gvp)
355.  The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
366.  The most popular members  [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
37

README_zh.md

1# av_codec部件
2
3
4## 简介
5
6av_codec部件为OpenHarmony系统提供了统一的音视频编解码、封装、解封装能力,使得应用能够直接调用系统提供的编解码、封装、解封装能力实现音视频的播放、录制、编码等功能。
7
8av_codec部件提供了以下常用功能:
9- 音视频编解码
10- 音视频解封装
11- 音视频封装
12
13**图 1** av_codec部件架构图
14
15![av_codec部件架构图](figures/framework-image-zh_CN.png)
16
17### 模块介绍
18| 模块名称 | 功能 |
19| -------- | -------- |
20| 编解码 | 提供音视频编解码功能接口以及编解码能力查询功能接口。 |
21| 解封装 | 提供音视频资源的加载、音视频轨分离和音视频数据读取的功能接口,读取的数据可使用解码器进行解码。 |
22| 封装 | 提供将编码后的音视频数据写入媒体文件的功能接口。 |
23| 编解码生命周期管理 | 用于服务端编解码功能的创建、销毁、实例管理等。 |
24| 解封装生命周期管理 | 用于服务端解封装功能的创建、销毁、实例管理等。 |
25| 封装生命周期管理 | 用于服务端封装功能的创建、销毁、实例管理等。 |
26| 编解码能力列表 | 用于描述所有编解码器的详细信息,比如名字、mimetype、支持的分辨率等。 |
27| 硬件编解码器 | 使用专用的编解码硬件进行编解码处理的编解码器,提供编解码处理功能。 |
28| 软件编解码器 | 使用CPU进行编解码处理的编解码器,提供编解码处理功能。 |
29| 解封装器 | 提供音视频资源的加载、音视频轨分离和音视频数据读取的功能。 |
30| 封装器 | 提供将编码后的音视频数据写入媒体文件的功能。 |
31| 硬件编解码器HDI | 提供硬件编解码器的抽象接口,通过该接口对服务层屏蔽不同的硬件编解码器,向服务层提供硬件编解码能力。 |
32
33
34## 目录
35
36仓目录结构如下:
37
38```
39/foundation/multimedia/av_codec     # av_codec部件业务代码
40├── BUILD.gn                        # 编译入口
41├── bundle.json                     # 部件描述文件
42├── frameworks                      # 部件无独立进程框架代码的实现
43│   └── native                      # native c++实现
44├── interfaces                      # 外部接口层
45│   ├── inner_api                   # 系统内部件接口
46│   └── kits                        # 应用接口
47├── sa_profile                      # 部件配置
48├── services                        # 服务实现代码
49│   ├── dfx                         # dfx代码
50│   ├── engine                      # 功能实现
51│   │   ├── base                    # 功能基类
52│   │   ├── codec                   # 编解码功能实现
53│   │   ├── codeclist               # 编解码能力查询功能实现
54│   │   ├── common                  # 功能实现公共库
55│   │   ├── demuxer                 # 解封装功能实现
56│   │   ├── factory                 # 功能实现工厂库
57│   │   ├── muxer                   # 封装功能实现
58│   │   ├── plugin                  # 插件实现
59│   │   └── source                  # 媒体资源读取工具功能实现
60│   ├── etc                         # 部件进程配置
61│   ├── include                     # 服务对外头文件
62│   ├── services                    # 服务IPC实现
63│   │   ├── codec                   # 编解码IPC实现
64│   │   ├── codeclist               # 编解码能力查询IPC实现
65│   │   ├── common                  # 服务IPC实现公共库
66│   │   ├── demuxer                 # 解封装IPC实现
67│   │   ├── factory                 # 服务IPC实现工厂库
68│   │   ├── muxer                   # 封装IPC实现
69│   │   ├── sa_avcodec              # 部件主进程IPC实现
70│   │   └── source                  # 媒体资源读取工具IPC实现
71│   └── utils                       # 服务实现通用资源
72└── test                            # 测试代码
73```
74
75
76## 编译构建
77
78编译32位ARM系统av_codec部件
79```
80./build.sh --product-name {product_name} --ccache --build-target av_codec
81```
82
83编译64位ARM系统av_codec部件
84```
85./build.sh --product-name {product_name} --ccache --target-cpu arm64 --build-target av_codec
86```
87
88{product_name}为当前支持的平台,比如rk3568。
89
90
91## 说明
92
93### 使用说明
94使用说明参考[开发指导](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev/media)中音视频编解码章节。
95
96
97## 相关仓
98
99- [媒体子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%AA%92%E4%BD%93%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
100