BaseNvDsDrawFunc

Inheritance diagram of BaseNvDsDrawFunc

BaseNvDsDrawFunc inheritance diagram

class savant.deepstream.base_drawfunc.BaseNvDsDrawFunc(condition, **kwargs)

Base PyFunc for drawing on frame.

PyFunc implementations are defined in and instantiated by a PyFunc structure.

Parameters:

condition (Dict[str, Any]) – Conditions for filtering frames to be processed by the draw function. The draw function will be applied only to frames when all conditions are met.

abstract draw(buffer, frame_meta)

Draw metadata on a frame in a batch.

Parameters:
  • buffer (Buffer) – Gstreamer buffer.

  • frame_meta (NvDsFrameMeta) – Frame metadata for a frame in a batch.

process_frame(buffer, frame_meta)

Process gstreamer buffer and frame metadata. Throws an exception if fatal error has occurred.

Use savant.deepstream.utils.get_nvds_buf_surface to get a frame image.

Parameters:
  • buffer (Buffer) – Gstreamer buffer.

  • frame_meta (NvDsFrameMeta) – Frame metadata for a frame in a batch.

can_draw_on_frame(frame_meta)

Check whether we can draw on this specific frame.