Please provide complete information as applicable to your setup.
• Hardware Platform (GPU)
• DeepStream Version 5.1
• TensorRT 7.2
• NVIDIA GPU Driver Version 4.55.23.0.5
• Issue Type(bugs)
**• How to reproduce the issue ? **
we are trying to add user_meta_data to batch_meta data to transfer data between plugins
we looked into deepstream-user-metadata-test.c app to for reference to write code for our
python plugin.
1: For start we used pyds.nvds_get_user_meta_type(“NVDS_USER_META_OUR_CASE”) as mentioned
in your python documentation to create custom type but when ever we run this
CustomMetadata.Type = pyds.nvds_get_user_meta_type("NVDS_USER_META_OUR_CASE")
print(CustomMetadata.Type)
we get this in the output.
**NvDsMetaType.???**
2: user_meta: pyds.NvDsUserMeta = pyds.nvds_acquire_user_meta_from_pool(batch_meta)
pyds.user_copyfunc(user_meta, metadata.copy)
pyds.user_releasefunc(user_meta, metadata.release)
the function metadata.copy and metadata.release never ran and these lines produce no errors
**3:**we used Cython to generate capsule instance to attach it to user_meta_data
custom_obj = metadata.CustomMetadata()
user_meta: pyds.NvDsUserMeta = pyds.nvds_acquire_user_meta_from_pool(batch_meta)
pyds.user_copyfunc(user_meta, metadata.copy)
pyds.user_releasefunc(user_meta, metadata.release)
test = Test()
Test.peek(test.vars)
user_meta.user_meta_data = test.vars
print("user_meta.", user_meta.user_meta_data)
user_meta.base_meta.meta_type = metadata.CustomMetadata.Type
pyds.nvds_add_user_meta_to_batch(batch_meta, user_meta)
**below code is to convert python data to capsule instance**
Blockquote> #cython: language_level=3
from cpython.pycapsule cimport PyCapsule_New, PyCapsule_IsValid, PyCapsule_GetPointer
class Test:
def init(self):
cdef int test = 10
cdef const char *name = “test”
self.vars = PyCapsule_New(<void *>&test, name, NULL)
@staticmethod
def peek(self):
cdef const char *name = "test"
if not PyCapsule_IsValid(self, name):
raise ValueError("invalid pointer to parameters")
cdef int test = <int >PyCapsule_GetPointer(self, name)
print(test[0])
# Print pointer address
print("{0:x}".format(<unsigned long long>test))
def get_caps(self):
cdef int test = 10
cdef const char *name = "test"
return PyCapsule_New(<void *>&test, name, NULL)
# Print pointer address
#print("{0:x}".format(<unsigned long long>test))
there are no errors on assaigning the capsule instance but when we received data on the other plugin we
get <capsule object NULL at 0x7f18db86a5a0>