hi_mpi_hdmi_register_callback

The Atlas 200/300/500 Inference Product does not support this API.

The Atlas Training Series Product does not support this API.

Description

Registers the HDMI event callback function in user mode.

Restrictions

  • You are advised to register the HDMI event callback function.

    For example, when a hot plug event is generated, the registered callback function can be used to read the capability set information generated after the hot plug. The HDMI attributes can be modified based on the capability set information. Then you can restart the HDMI to enable the HDMI attributes to adapt to the peer-end monitor or television.

    If you do not register an event callback function, HDMI will adopt the default processing method when an event occurs, which supports hot plug of the original screen by default. If you registers an event callback function, the registered function is used for processing, and the default hot plug function in the system becomes invalid. In this case, you need to ensure the support for hot plug.

  • The callback function registration supports only the plug-in and plug-out events.

    Generally, hi_mpi_hdmi_get_sink_capability is used in the plug-in event processing function to obtain the sink capability set.

  • During callback function registration, ensure that the function pointer in the input parameter does not have issues such as memory leaks and function suspension.
  • If the HDMI displays that the device is already connected when this API is called, it does not respond to the first plug-out event and the response will start on the second plug-out event.

Prototype

hi_s32 hi_mpi_hdmi_register_callback(hi_hdmi_id hdmi, const hi_hdmi_callback_func *callback_func)

Parameters

Parameter

Input/Output

Description

hdmi

Input

HDMI ID.

Value range: [0, 2)

callback_func

Input

HDMI callback function struct.

Returns