-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gstreamer zero copy #3754
Comments
@totaam What about glimagesink? https://gstreamer.freedesktop.org/documentation/opengl/glimagesink.html?gi-language=c |
@TijZwa |
Apparently, we are meant to use |
Add some form of zero copy to the gstreamer encoder and decoder (#3706).
We use Gst.Buffers wrapping one or more Gst.Memory areas.
The problem is that the pixel data (planar
YUV
or plainRGB
) is consumed by the encoder and produced by the decoder - this data can be huge and copying it around is extremely inefficient.Despite boasting of having zero-copy mechanisms, it's not obvious how one would use them via
appsrc
andappsink
- or even using other, potentially custom, elements.Most of the buffer methods end up copying the data:
https://github.com/GStreamer/gstreamer/blob/main/subprojects/gstreamer/gst/gstbuffer.c
Do we have to mess with allocators? ie: GstDmaBufAllocator
Interesting read: Inter-Process Texture Sharing with DMA-BUF
Ideally, we don't want to tie this to a specific rendering backend, but if the decoder is on a GPU
appsink
will probably end up downloading the data to system memory..shmsrc is not a good fit as we would need to copy our data into a shared memory area.
Perhaps shmsink can give us a zero copy buffer - not clear yet.
The text was updated successfully, but these errors were encountered: