mirror of
https://github.com/openharmony/drivers_peripheral.git
synced 2026-08-25 02:23:31 -04:00
38fb3df663
Merge pull request !841 from NickYang/master
Codec
Introduction
This repository mainly defines and implements the Hardware Driver Interfaces (HDIs) of the codec module, allowing upper-layer services to perform the following operations:
- Creating and destroying a codec
- Starting and stopping the codec
- Encoding original code streams into compressed code streams
- Decoding compressed code streams into original code streams
- Flushing the cache
Directory Structure
The source code directory structure is as follows:
/drivers/peripheral/codec
├── interfaces # Driver capability APIs provided for upper-layer services
│ └── include # APIs exposed externally
Available APIs
The codec module provides APIs that can be directly called by the framework layer to create or destroy a codec, start or stop a codec, perform encoding or decoding operations, flush the cache, and set a callback.
Table 1 describes major HDI APIs provided by the codec module.
Table 1 Major HDI APIs of the codec module
Usage Guidelines
The core functionalities of this repository are as follows:
- Provides codec HDIs that can be directly called by the framework layer to perform encoding and decoding-related operations.
- Provides standard interfaces for device developers to ensure that the OEM vendors comply with the HDI adapter standard. This promises a healthy evolution of the ecosystem.
For details about the invocation and implementation, see the API reference.