aclvdecCreateChannel
Description
Creates a video decoding channel, which is reusable. After being destroyed, the channel is no longer available. This API is synchronous.
Restrictions
- Channels are thread-unsafe, that is, a separate channel should be created for each thread.
- The aclvdecCreateChannel API encapsulates aclrtCreateStream and aclrtSubscribeReport APIs.
- Two streams are created by calling aclrtCreateStream twice. One is for the video stream decoding task, and the other is for processing the callback function. These streams can be automatically freed only after the aclvdecDestroyChannel call.
- Call aclrtSubscribeReport to specify a thread for handling the callback function in a stream. The callback function and thread are specified by the calls to the aclvdecSetChannelDesc series.
In the implementation of VDEC, aclrtCreateStream and aclrtSubscribeReport do not need to be called separately. Note that aclrtCreateStream and aclrtSubscribeReport have restrictions (particularly, on the number of streams and the number of threads that handle the callback functions in the streams) and these restrictions must be met.
Prototype
aclError aclvdecCreateChannel(aclvdecChannelDesc *channelDesc)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
channelDesc |
Input/Output |
Pointer to the channel description. Call aclvdecCreateChannelDesc to create data of the aclvdecChannelDesc type as a channel description and then call the aclvdecSetChannelDesc series to set the channel description in advance. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.