# Codec - [Introduction](#section11660541593) - [Directory Structure](#section161941989596) - [Available APIs](#section1551164914237) - [Usage Guidelines](#section129654513264) - [Repositories Involved](#section1371113476307) ## 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](#table1513255710559) describes major HDI APIs provided by the codec module. **Table 1** Major HDI APIs of the codec module