aclvdecCreateChannel

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

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

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 Functions and Restrictions.
  • aclvdecCreateChannel encapsulates the aclrtCreateStream and aclrtSubscribeReport APIs.
    • Two streams are created by calling aclrtCreateStream twice. One stream is used for video stream decoding, and the other is used for callback function processing. The stream resources can be automatically released only after the channel is destroyed by calling aclvdecDestroyChannel.
    • Call aclrtSubscribeReport to specify a thread for processing the callback function in the stream. The callback function and thread are specified by calling the aclvdecSetChannelDesc series.

    When implementing the VDEC function, you do not need to call aclrtCreateStream and aclrtSubscribeReport separately. However, the restrictions of the two APIs must be complied with, for example, the number of streams and the number of threads that process the callback function in the stream.

Prototype

1
aclError aclvdecCreateChannel(aclvdecChannelDesc *channelDesc)

Parameters

Parameter

Input/Output

Description

channelDesc

Input/Output

Pointer to the channel description.

Call the aclvdecCreateChannelDesc API to create data of the aclvdecChannelDesc type in advance, and then call the aclvdecSetChannelDesc series APIs to set the attributes of the channel description.

Returns

0 on success; otherwise, failure. For details, see aclError.

See Also

For details about the API call sequence and examples, see Media data processing V1.