displaying format=(string)GRAY8 on ximagesink

Erik Rull erik.rull at rdsoftware.de
Thu Apr 23 13:18:08 UTC 2020


Josh Doe wrote:
> On Thu, Apr 23, 2020 at 5:49 AM Erik Rull <erik.rull at rdsoftware.de
> <mailto:erik.rull at rdsoftware.de>> wrote:
> Allocate enough memory for the 404x404 padded image, then memcpy each 401 pixel
> row to the start of each 404 pixel row, leaving the caps as saying 401. In other
> words you pad each row with 3 bytes, uninitialized data is fine. GStreamer
> elements and the video library assume there is padding and will account for it.
> I have to do this all the time in my plugins, see [0] for an example.
> 
> [0]: https://github.com/joshdoe/gst-plugins-vision/blob/master/sys/imperxflex/gstframelinksrc.c#L603
> 
> -Josh 
> 

That was it, it works!

Thanks a lot!

Best regards,

Erik


More information about the gstreamer-devel mailing list