Function: vdec_create_channel
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
x |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Description
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)
Parameters
|
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
|
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.
- For details about the maximum number of channels, see Functions and Restrictions.
- The acl.media.vdec_create_channel API has encapsulated the acl.rt.create_stream and acl.rt.subscribe_report APIs.
- Two streams are created by calling the acl.rt.create_stream API twice. One stream is used for video stream decoding, and the other is used for callback function processing. These streams can be automatically destroyed only after the channel is destroyed by calling acl.media.vdec_destroy_channel.
- Call the acl.rt.subscribe_report API to specify the thread for processing the callback function in the stream. The callback function and thread are specified when the acl.media.vdec_set_channel_desc series APIs are called.
When implementing the VDEC function, you do not need to call the acl.rt.create_stream and acl.rt.subscribe_report APIs separately. However, the acl.rt.create_stream and acl.rt.subscribe_report APIs must comply with the restrictions, such as the number of streams and the number of threads that process the callback function on the stream.