Function: venc_create_channel

Applicable Products

Product

Supported (√/x)

Ascend 950PR&950DT products

x

Atlas A3 products

x

Atlas A2 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.

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

Reference

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