aclvdecCreateChannel
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Description
Creates a video decoding channel, which is reusable. After being destroyed, the channel is no longer available.
Restrictions
- Channels are thread-unsafe, that is, a separate channel should be created for each thread.
- The restrictions on the number of channels are described in Overview.
- 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 destroyed only after the channel is destroyed by calling aclvdecDestroyChannel.
- 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. |
Returns
0 on success; else, failure. For details, see aclError.