Function: vdec_create_channel
Applicable Products
|
Product |
Supported (√/x) |
|---|---|
|
|
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. Call acl.media.vdec_create_channel_desc to create data of the vdec_channel_desc type, and call acl.media.vdec_set_channel_desc APIs to set the attributes of the channel description. |
Return Values
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
Constraints
- Channels are thread-unsafe, that is, a separate channel should be created for each thread.
- For details about the channel count limits, see General Description.
- acl.media.vdec_create_channel encapsulates acl.rt.create_stream and acl.rt.subscribe_report.
- Call acl.rt.create_stream twice to create two streams. One is used for video stream decoding, and the other for processing the callback function. These stream resources can be automatically destroyed only after acl.media.vdec_destroy_channel is called to destroy the channel.
- Call acl.rt.subscribe_report 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 APIs are called.
When implementing VDEC functions, you do not need to call acl.rt.create_stream and acl.rt.subscribe_report separately. However, you need to comply with their constraints, such as the number of streams and the number of threads that process the callback function in streams.