我要评分
获取效率
正确性
完整性
易理解

CreateModule

Function Usage

Creates an instance of the specified GPU acceleration class.

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 the created instance of the specified GPU acceleration class. 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

Return values 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
};