InitMediaEngine

Initializes the RTE engine.

bool InitMediaEngine(std::function<void(rte::Error *err)> cb, Error *err = nullptr);
Since
v4.5.0

This method is asynchronous, which means that the result of initialization is returned through a callback.

Call timing

Call this method after the intializing the RTE object and setting the App ID.

Restrictions

None.

Parameters

cb
An asynchronous callback, which is used to return the initialization result. You can get the initialization result or the error code using the err parameter of this callback. For details, see Error.
err
The error information during initialization: Error. When initializing the RTE engine using InitMediaEngine, if errors that can be instantly detected occur, such as an invalid parameter or insufficient resource, the SDK synchronizes the error information in this parameter.

Returns

Whether the asynchronous operation is added to the queue:
  • true: Yes.
  • false: No.
Attention: The return value indicates whether initialization is added in the asynchronous queue; it does not indicate whether the initialization is successful or not.