Function: venc_create_channel

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

x

Atlas A3 training products / Atlas A3 inference products

x

Atlas A2 training products / Atlas A2 inference products

x

Atlas training products

x

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Creates a video encoding channel, which is reusable. After being destroyed, the channel is no longer available.

Prototype

  • C Prototype
    1
    aclError aclvencCreateChannel(aclvencChannelDesc *channelDesc)
    
  • Python Function
    1
    ret = acl.media.venc_create_channel(venc_channel_desc)
    

Parameters

Parameter

Description

venc_channel_desc

Int, channel description.

Use the acl.media.venc_create_channel_desc call to create data of the aclvencChannelDesc type, and use the acl.media.venc_set_channel_desc series calls 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 General Description.
  • acl.media.venc_create_channel internally calls acl.rt.create_stream twice to create two streams. One stream is used for video stream encoding, and the other stream is used for callback function processing. These streams can be automatically destroyed only after the channel is destroyed by calling acl.media.venc_destroy_channel.
  • When implementing the VENC function, you must comply with the restrictions of the acl.rt.create_stream API, such as the number of streams.

Reference

For details about the API call sequence and examples, see Media Data Processing V1.