NvDsBatchMeta

class pyds.NvDsBatchMeta

Holds information a formed batched containing the frames from different sources.

NOTE: Both Video and Audio metadata uses the same NvDsBatchMeta type.

NOTE: Audio batch metadata is formed within nvinferaudio plugin and will not be corresponding to any one buffer output from nvinferaudio. The NvDsBatchMeta for audio is attached to the last input buffer when the audio batch buffering reach configurable threshold (audio frame length) and this is when inference output is available.

Variables:
  • base_metaNvDsBaseMeta, base_meta

  • max_frames_in_batchint, maximum number of frames those can be present the batch.

  • num_frames_in_batchint, Number of frames present in the current batch.

  • frame_meta_poolNvDsMetaPool, pool of type NvDsFrameMeta.

  • obj_meta_poolNvDsMetaPool, pool of type NvDsObjMeta.

  • classifier_meta_poolNvDsMetaPool, pool of type NvDsClassifierMeta.

  • display_meta_poolNvDsMetaPool, A pool of type NvDsDisplayMeta.

  • user_meta_poolNvDsMetaPool, A pool of type NvDsUserMeta.

  • label_info_meta_poolNvDsMetaPool, A pool of type NvDsLabelInfo.

  • frame_meta_list – A list of items of type NvDsFrameMeta in use in the current batch.

  • batch_user_meta_list – A list of items of type NvDsUserMeta in use in the current batch.

  • meta_mutexGRecMutex, lock to be taken before accessing metadata to avoid simultaneous update of same metadata by multiple components.

  • misc_batch_infolist of int, For additional user specific batch info.

  • reservedint, Reserved for internal use.

Example usage:

# Retrieve batch metadata from the gst_buffer
# Note that pyds.gst_buffer_get_nvds_batch_meta() expects the
# C address of gst_buffer as input, which is obtained with hash(gst_buffer)
batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
l_frame = batch_meta.frame_meta_list #Get list containing NvDsFrameMeta objects from retrieved NvDsBatchMeta
cast(*args, **kwargs)

Overloaded function.

  1. cast(self: capsule) -> pyds.NvDsBatchMeta

cast given object/data to NvDsBatchMeta, call pyds.NvDsBatchMeta.cast(data)

  1. cast(self: int) -> pyds.NvDsBatchMeta

cast given object/data to NvDsBatchMeta, call pyds.NvDsBatchMeta.cast(data)