Q1- Suppose I create a pipeline and the last pipeline produce with caps : video/x-raw(memory:NVMM) and I want to create a custom plugin and perform some processing on nvidia jetson devices. This need to do processing in GPU buffer? Is it possible to convert buffers to numpy? If it so, Is it optimal solution?
Q2- I create a class that inherited from GstBase.BaseTransform and has this method:
def do_transform_ip(self, buffer: Gst.Buffer) -> Gst.FlowReturn:
// Do some processing on Buffer and metadata
return Gst.FlowReturn.OK
My problem is that when I added this custom plugin to pipeline in deepstream, the pipeline doesn’t any work but doesn’t throw any error, Is it possible to use custom plugin in deepstream pipeline along with deepstream plugin?
Yes, but it’s slow. As DaneLLL says, it’s better to modify gst-dsexample, compile that, and you can use the resulting plugin in Python. (or any language that supports GStreamer). You don’t have to write everything in C, but when it comes to custom elements, you really need at least some C/C++/Rust/Vala.
One solution is to convert buffer to numpy array and then pass ndarray to model, but How I can to pass buffer without numpy array conversation and pass to model?