pngd_create_chn
Applicable Products
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
x |
|
√ |
|
√ |
Description
Creates a decoding channel based on the configured channel attributes.
Prototype
- C Prototype
1hi_s32 hi_mpi_pngd_create_chn(hi_pngd_chn chn, const hi_pngd_chn_attr *attr)
- Python Function
1ret = acl.himpi.pngd_create_chn(chn, attr)
Parameters
Parameter |
Description |
|---|---|
chn |
Int, decoding channel ID. The value range of this parameter is [0, 128). The maximum number of channels is 128. NOTE:
The restrictions on the number of channels are different based on the following Ascend virtual instance templates on
The restrictions on the number of channels are different based on the following Ascend virtual instance templates on
You can run npu-smi info -t template-info on the server where AI processor is installed to view the compute specifications of the Ascend virtual instances in each scenario. |
attr |
Dict, dictionary of decoding channel attributes. For details, see hi_pngd_chn_attr. |
Return Values
Return Value |
Description |
|---|---|
ret |
Int, error code.
|
Constraints
- The channel ID of a single device cannot exceed the maximum channel ID.
- If attr is left empty, the error code HI_ERR_PNGD_NULL_PTR is returned.
- Before this API call, ensure that a channel has not been created yet or has been destroyed. Otherwise, a failure is returned.
- If the system memory is insufficient, the error code HI_ERR_PNGD_NO_MEM is returned. In this case, you can expand the OS memory as needed.
- When a setting in the channel attributes pointed by attr exceeds the decoding capability set, the error code HI_ERR_PNGD_ILLEGAL_PARAM is returned.
Reference
For the API call sequence, see Functions and Constraints.