InitMediaEngine

Initializes the RTE engine.

bool InitMediaEngine(std::function<void(rte::Error *err)> cb, Error *err = nullptr)
Note: The return value of InitMediaEngine only indicates whether the initialization operation was successfully enqueued to the asynchronous task queue, not whether the initialization itself succeeded.

Timing

This method must be called after creating the RTE object and setting the App ID.

Parameters

cb
Callback for asynchronous notification of the initialization result. You can obtain the result or error code via the err parameter of this callback. See Error.
err
An output parameter. Indicates the status or error information generated during initialization. See Error. When calling InitMediaEngine, if an immediately detectable error occurs (such as invalid parameters or insufficient resources), the SDK synchronously returns the error information through this parameter.

Return Values

  • true: Successfully enqueued the initialization operation to the asynchronous task queue.
  • false: Failed to enqueue the initialization operation to the asynchronous task queue.
This return value only indicates whether the initialization operation was successfully enqueued, not whether the initialization itself succeeded.