CreateModule
Function Usage
Creates a GPU acceleration class instance.
Restrictions
The value of moduleId must be one of the values in moduleList returned by QueryModule.
Prototype
void *CreateModule(uint32_t moduleId)
Parameter Description
Parameter |
Input/Output |
Type |
Description |
|---|---|---|---|
moduleId |
Input |
uint32_t |
Specifies the GPU model to be used for GPU acceleration. |
Return Value Description
Data type: void *, which points to a created GPU acceleration class instance. This instance can be used through APIs defined in GpuEncoderBase.
Involved APIs of the GpuEncoderBase Class
For details about involved APIs of the GpuEncoderBase class, see Init, Deinit, Start, Stop, CreateBuffer, ImportBuffer, ReleaseBuffer, MapBuffer, UnmapBuffer, RetriveBufferData, Convert, Encode, SetEncodeParam, and Reset
Returns of the GpuEncoderBase class:
1 2 3 4 5 6 7 8 9 10 11 12 13 | enum GpuEncoderErrorCode : uint32_t { OK, ERR_INVALID_STATUS, ERR_INVALID_DEVICE, ERR_INVALID_PARAM, ERR_OUT_OF_MEM, ERR_UNEXPECT_STATUS, ERR_UNSUPPORT_FORMAT, ERR_UNSUPPORT_OPERATION, ERR_INTERNAL_ERROR, ERR_NEED_RESET, // Some encoding parameters take effect after the encoder is reset. ERR_UNKNOW }; |
Parent topic: GPU Acceleration APIs (C and C++)