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.
The table below describes major HDI 1.0 APIs provided by the codec module.
Table 1 Major HDI 1.0 APIs of the codec module
The codec module also provides codec HDI 2.0 APIs based on the OMX interfaces. The table below describes the HDI 2.0 APIs.
Table 2 HDI 2.0 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.