do zero-copy in gstreamer for decoding
Submitted by Victor Toso
Assigned to Spice Bug List
Created attachment 130109 massif on mjpeg stream
I did a quick test doing streaming with mjpeg and vp8 to compare the memory usage in the client. In this test I played a ~2 min video in the guest in maximized window.
With mjpeg we have a peak of 34.13 MB which is somewhat fine.
With vp8 we got a peak of 205.6 MB, mostly around gstreamer code.
For now, I can see two ways to improve the code:
1-) Having some memory pool in spice-channel to avoid malloc for each new message. In the code itself we already have a FIXME for that, saying:
/* FIXME: do not allow others to take ref on in, and use realloc here?
- this would avoid malloc/free on each message?
2-) Doing zero-copy with gstreamer, like we do in server for encoding.
Attaching massif data for future reference
Attachment 130109, "massif on mjpeg stream":