NvDsFrameMeta¶
- class pyds.NvDsFrameMeta¶
Holds metadata for a frame in a batch.
- Variables:
base_meta –
NvDsBaseMeta
, Base metadata for frame.pad_index – int, Pad or port index of stream muxer component for the frame in the batch.
batch_id – int, Location of the frame in the batch.
NvBufSurfaceParams
for the frame will be at index batch_id in the surfaceList array ofNvBufSurface
.frame_num – int, Current frame number of the source.
buf_pts – int, Holds the presentation timestamp (PTS) of the frame.
ntp_timestamp – int, Holds the ntp (network time protocol) timestamp.
source_id – int, Source_id of the frame in the batch e.g. camera_id. It need not be in sequential order.
num_surfaces_per_frame – int, Number of surfaces present in this frame. This is required in case multiple surfaces per frame.
source_frame_width – int, Holds the width of the frame at input to Gst-streammux.
source_frame_height – int, Holds the height of the frame at input to Gst-streammux.
surface_type – int, Surface type of sub frame. This is required in case multiple surfaces per frame.
surface_index – int, Surface index of sub frame. This is required in case multiple surfaces per frame.
num_obj_meta – int, Number of object meta elements attached to the current frame.
bInferDone – int, Boolean indicating whether inference is performed on given frame.
obj_meta_list – List of objects of type
NvDsObjectMeta
in use for the given frame.display_meta_list – List of objects of type
NvDsDisplayMeta
in use for the given frame.frame_user_meta_list – List of objects of type
NvDsUserMeta
in use for the given frame.misc_frame_info – list of int, For additional user specific batch info.
reserved – int, Reserved for internal use.
Example usage:
batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer)) #Retrieve batch metadata from gst_buffer l_frame = batch_meta.frame_meta_list while l_frame is not None: try: frame_meta = pyds.NvDsFrameMeta.cast(l_frame.data) #Must cast data in frame_meta_list to NvDsFrameMeta object except StopIteration: break frame_number=frame_meta.frame_num #Retrieve current frame number from NvDsFrameMeta object num_rects = frame_meta.num_obj_meta #Retrieve number of objects in frame from NvDsFrameMeta object l_obj=frame_meta.obj_meta_list #Retrieve list of NvDsObjectMeta objects in frame from NvDsFrameMeta object
- cast(*args, **kwargs)¶
Overloaded function.
cast(self: capsule) -> pyds.NvDsFrameMeta
cast given object/data to
NvDsFrameMeta
, call pyds.NvDsFrameMeta.cast(data)cast(self: int) -> pyds.NvDsFrameMeta
cast given object/data to
NvDsFrameMeta
, call pyds.NvDsFrameMeta.cast(data)