Function: vdec_destroy_channel

Applicable Products

Product

Supported (√/x)

Ascend 950PR&950DT products

x

Atlas A3 products

√

Atlas A2 products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Destroys a video processing channel created by calling acl.media.vdec_create_channel.

Prototype

  • C Prototype
    1
    aclError aclvdecDestroyChannel(aclvdecChannelDesc *channelDesc)
    
  • Python Function
    1
    ret = acl.media.vdec_destroy_channel(vdec_channel_desc)
    

Parameters

Parameter

Description

vdec_channel_desc

Int, pointer address of the channel description.

It must be the same as the vdec_channel_desc passed to the acl.media.vdec_create_channel call.

Return Values

Return Value

Description

ret

Int, error code: 0 on success; else, failure.

Constraints

  • The channel is destroyed only after the transmitted frames are decoded and the callback function is processed.
  • acl.media.vdec_destroy_channel encapsulates acl.rt.unsubscribe_report to unsubscribe from a thread (callback function in the stream is no longer processed by the specified thread), and acl.rt.destroy_stream to destroy a stream. When implementing the VDEC functions, you do not need to call acl.rt.unsubscribe_report and acl.rt.destroy_stream separately.
  • If acl.media.vdec_destroy_channel_desc has been called to destroy the channel description before acl.media.vdec_destroy_channel is called to destroy the channel, an error is reported.

Reference

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