hi_mpi_vo_set_chn_frame_rate

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

Sets the display frame rate of a specified VO channel.

Prototype

hi_s32 hi_mpi_vo_set_chn_frame_rate(hi_vo_layer layer, hi_vo_chn chn, hi_s32 frame_rate)

Parameters

Parameter

Input/Output

Description

layer

Input

VO layer ID.

Value range: [0, 9)

This parameter is valid only when layer is set to 0 or 1.

chn

Input

VO channel ID.

Value range: [0, 64)

frame_rate

Input

Channel frame rate. The frame rate can be set to Nx, where N is any integer in the range of [1,64] and x is the device frame rate.

Returns

Restrictions

  • Before calling this API, you need to set the attributes of a VO channel by calling hi_mpi_vo_set_chn_attr. Otherwise, an error code indicating failure is returned.
  • Calling hi_mpi_vo_enable_chn enables the channel to play streams at the normal speed. Therefore, you must call this API to control playback after the channel is enabled.
  • If the channel is disabled, calling hi_mpi_vo_set_chn_attr will reset the channel frame rate to the display frame rate.

    The channel frame rate is the frame rate of the image data processed by the channel, and the display frame rate is the frame rate of the display device. The display frame rate can be set when the video layer attributes are set by calling hi_mpi_vo_set_video_layer_attr.

  • When the VO is bound to the VPSS, the frame rate set by calling this API takes effect.
  • Currently, this API does not support multiple processes.