Updated on 2022-03-13 GMT+08:00

CreateDvppApi

Syntax

int CreateDvppApi(IDVPPAPI*& pIDVPPAPI)

Function

Creates a DVPP API instance, which is equivalent to creating the handle to the DVPP executor. The caller can use the applied DVPP API instance to call DvppCtl to process an image, either across functions or across threads.

Input

IDVPPAPI pointer reference. The input pointer must be NULL.

Output

IDVPPAPI pointer reference. If a DVPP API instance fails to be obtained, the output pointer is NULL. If a DVPP API instance is successfully obtained, the output pointer is not NULL.

Return Value

  • 0: success
  • –1: failure

Instructions

The caller creates the IDVPPAPI object pointer, which is initialized to NULL. The IDVPPAPI object pointer is passed by calling the CreateDvppApi function. If the application is successful, the CreateDvppApi function returns the DVPP API instance. Otherwise, NULL is returned. The caller needs to verify the return value.

Restriction

The caller is responsible for the life cycle of the DVPP API instance, including the application and release, which are implemented by using CreateDvppApi and DestroyDvppApi, respectively.

Calling Example

IDVPPAPI *pidvppapi = NULL;
CreateDvppApi(pidvppapi);