[Spice-devel] [RFC v1 3/4] gstreamer-encoder: Use a dmabuf allocator if the drawable has a valid fd

2023-01-10 Thread Vivek Kasireddy
If the drawable contains a valid dmabuf fd, then allocate Gst memory using a dmabuf allocator. And, register a callback with the pipeline to trigger an async when the dmabuf is no longer in use. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Dongwon Kim Signed-off-by: Vivek Kasireddy ---

[Spice-devel] [RFC v1 1/4] red-parse-qxl: Extract the dmabuf fd from the scanout

2023-01-10 Thread Vivek Kasireddy
If the scanout has a valid dmabuf fd, then it is extracted and a copy (of the fd) is stored in the drawable. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Dongwon Kim Signed-off-by: Vivek Kasireddy --- server/red-parse-qxl.cpp | 8 server/red-parse-qxl.h | 1 + 2 files changed, 9

[Spice-devel] [RFC v1 4/4] video-stream: Force stream creation for a valid dmabuf fd

2023-01-10 Thread Vivek Kasireddy
If the drawable contains a valid dmabuf fd, then a stream needs to be created for all the display channels. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Dongwon Kim Signed-off-by: Vivek Kasireddy --- server/video-stream.cpp | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-)

[Spice-devel] [RFC v1 2/4] display-channel: Add the asyncs associated with dmabuf encode

2023-01-10 Thread Vivek Kasireddy
This async is triggered by the encoder indicating that the encoding process is completed. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Dongwon Kim Signed-off-by: Vivek Kasireddy --- server/display-channel.cpp | 9 + server/display-channel.h | 2 ++ server/red-qxl.cpp | 26

[Spice-devel] [RFC v1 0/4] gstreamer-encoder: Use a dmabuf allocator if the drawable has a valid fd

2023-01-10 Thread Vivek Kasireddy
This patch series enables creation of Gst memory using a dmabuf fd as the source. This ability is useful given that dmabuf is the standard mechanism for sharing buffers between various drivers and userspace in many Graphics and Media usecases. Currently, this is only used/tested with Qemu and