# codec\_interface.h ## **Overview** **Related Modules:** [Codec](Codec.md) **Description:** Declares codec-related APIs, including functions for initializing audio and video codecs, setting parameters, and controlling and transferring data. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Functions
CodecInit () |
Initializes the internal audio and video submodules of the codec. |
CodecDeinit () |
Deinitializes the internal audio and video submodules of the codec. |
CodecEnumerateCapbility (uint32_t index, CodecCapbility *cap) |
Obtains the capabilities of a specified media type based on an index. |
CodecGetCapbility (AvCodecMime mime, CodecType type, uint32_t flags, CodecCapbility *cap) |
|
CodecCreate (const char *name, const Param *attr, int len, CODEC_HANDLETYPE *handle) |
Creates a specific codec component and returns the component context through a handle. |
CodecDestroy (CODEC_HANDLETYPE handle) |
|
CodecSetPortMode (CODEC_HANDLETYPE handle, DirectionType type, BufferMode mode) |
|
CodecSetParameter (CODEC_HANDLETYPE handle, const Param *params, int paramCnt) |
|
CodecGetParameter (CODEC_HANDLETYPE handle, Param *params, int paramCnt) |
|
CodecStart (CODEC_HANDLETYPE handle) |
|
CodecStop (CODEC_HANDLETYPE handle) |
|
CodecFlush (CODEC_HANDLETYPE handle, DirectionType directType) |
Clears the cache when the codec component is the running state. |
CodecQueueInput (CODEC_HANDLETYPE handle, const InputInfo *inputData, uint32_t timeoutMs) |
|
CodecDequeInput (CODEC_HANDLETYPE handle, uint32_t timeoutMs, InputInfo *inputData) |
|
CodecQueueOutput (CODEC_HANDLETYPE handle, OutputInfo *outInfo, uint32_t timeoutMs, int releaseFenceFd) |
|
CodecDequeueOutput (CODEC_HANDLETYPE handle, uint32_t timeoutMs, int *acquireFd, OutputInfo *outInfo) |
|
CodecSetCallback (CODEC_HANDLETYPE handle, const CodecCallback *cb, UINTPTR instance) |