Function: venc_create_channel

Applicability

Product

Supported (√/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

Function Usage

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)
    

Parameter Description

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 calls 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.
  • Two streams are created by calling acl.rt.create_stream twice in the acl.media.venc_create_channel API. One is for the video stream encoding 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.venc_destroy_channel.
  • When implementing the VENC function, you need to 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 example, see Media Data Processing V1.