Function: vdec_create_channel
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Creates a video processing channel, which is reusable. After being destroyed, the channel is no longer available.
Prototype
- C Prototype
1aclError aclvdecCreateChannel(aclvdecChannelDesc *channelDesc)
- Python Function
1ret = acl.media.vdec_create_channel(vdec_channel_desc)
Parameter Description
|
Parameter |
Description |
|---|---|
|
vdec_channel_desc |
Int, pointer address of the channel description. Use the acl.media.vdec_create_channel_desc call to create data of the vdec_channel_desc type, and use the acl.media.vdec_set_channel_desc APIs to set the attributes of the channel description. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
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 General Description.
- The acl.media.vdec_create_channel API encapsulates acl.rt.create_stream and acl.rt.subscribe_report APIs.
- Two streams are created by calling acl.rt.create_stream 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 acl.media.vdec_destroy_channel.
- The acl.rt.subscribe_report call specifies a thread for processing the callback function in a stream. The callback function and thread are specified by using the acl.media.vdec_set_channel_desc calls.
In the implementation of VDEC, acl.rt.create_stream and acl.rt.subscribe_report do not need to be called separately. Note that acl.rt.create_stream and acl.rt.subscribe_report 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.