- class pyds.NvDsBatchMeta¶
Holds information a formed batched containing the frames from different sources.
NOTE: Both Video and Audio metadata uses the same
NOTE: Audio batch metadata is formed within nvinferaudio plugin and will not be corresponding to any one buffer output from nvinferaudio. The
NvDsBatchMetafor 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.
max_frames_in_batch – int, maximum number of frames those can be present the batch.
num_frames_in_batch – int, Number of frames present in the current batch.
NvDsMetaPool, pool of type
frame_meta_list – A list of items of type
NvDsFrameMetain use in the current batch.
batch_user_meta_list – A list of items of type
NvDsUserMetain use in the current batch.
meta_mutex – GRecMutex, lock to be taken before accessing metadata to avoid simultaneous update of same metadata by multiple components.
misc_batch_info – list of int, For additional user specific batch info.
reserved – int, Reserved for internal use.
# 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