I have a plugin that performs object detection and attaches IvaMeta information to the gstreamer buffers.
Next, I would like to parse this data in another plugin in the gstreamer chain. Following your plugin example “dsexample_plugin” I try to do something like this:
// Standard way of iterating through buffer metadata
while ((gst_meta = gst_buffer_iterate_meta(inbuf, &state)) != NULL) {
// Check if this metadata is of IvaMeta type
if (!gst_meta_api_type_has_tag(gst_meta->info->api, _ivameta_quark))
continue;
...
However, the condition in the if appears to always fail.
On the other hand, if I try to access the metadata as follows, it does work.
ivameta = gst_buffer_get_iva_meta(inbuf);
if (ivameta != NULL) {
std::cout << "Found IvaMeta. Yay :)" << std::endl;
} else {
std::cout << "No IvaMeta :(" << std::endl;
continue;
}
I am using DeepStream 1.5 on Jetson TX2 and metadata was attached using gst_buffer_add_iva_meta(GstBuffer*, void*). Any idea why the standard iteration over the metadata does not work? Do I somehow need to manually add this “quark” tag after the call to gst_buffer_add_iva_meta?