Multiple questions about gstreamer decoding - encoding with VPS plugin

My plugin needs to consume

video/x-raw , format=(string)RGB

frames.

I was able to modify *vpsjpegtranscoder* to include my plugin, but I can’t send video back to VMS.

My pipeline is

  1. fromxprotectconverter
  2. decodebin
  3. videoconvert
  4. myplugin
  5. xprotectjoin ( with meta sink from 1. )
  6. jpegenc
  7. toxprotectconverter

I see that _chain function of myplugin executes correctly and pushes input frames as is next, but I can’t see output video in VMS

As I need to add metadata in my plugin I tried to do :

  1. fromxprotectconverter
  2. decodebin
  3. videoconvert
  4. xprotectjoin ( with meta sink from 1. )
  5. myplugin
  6. jpegenc
  7. toxprotectconverter

And I don’t have output video inside Management Client.

But when I change myplugin to identity I receive images in Management Client.

Another observation: when I run myplugin as a pipeline It sends metadata and video, but I can’t run object detection because stream is not decoded.

Another question: can I use x264enc instead of jpegenc ?

It turns out the problems was with sink CAPS.

I supposed that jpegenc can handle RGB and send the file to VMS, but apparently I had to convert back to I420 to make it work.