[RFC v2 0/5] gstreamer-encoder: Use a dmabuf allocator if the drawable has a valid fd (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 remote-viewer using the x264enc/dec
codec to stream the Guest desktop but it can be extended to other
plugins and applications.

Here is the flow of things from the Spice server side:
- The application calls gl_scanout (to update the fd) and gl_draw_async
  and also sets the flag to indicate whether it is dealing with a local
  or remote client.
- Create a new drawable and extract the dmabuf fd from the scanout
  as a response to QXL_CMD_DRAW cmd sent by the application.
- Share the drawable's copy of the fd with the Encoder.
- Send the async completion cookie to the application once the encoder
  is done using the fd.

v2:
- Used the already existing gl_scanout and gl_draw_async APIs instead
  of adding new ones.
- Slightly refactored and improved the commits and their messages.

Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Cc: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
Cc: Dongwon Kim <dongwon.kim@xxxxxxxxx>

Vivek Kasireddy (5):
  gstreamer-encoder: Use a dmabuf allocator for a valid fd
  display-channel: Extract the dmabuf fd from the scanout
  display-channel: Share the drawable's copy of fd with the encoder
  video-stream: Force stream creation for a valid dmabuf fd
  red-qxl: Add a new parameter to gl_scanout and gl_draw_async

 meson.build                |  2 +-
 server/dcc-send.cpp        | 30 ++++++++++++++++++++++++
 server/display-channel.cpp | 23 ++++++++++++++++++
 server/display-channel.h   |  4 ++++
 server/gstreamer-encoder.c | 48 +++++++++++++++++++++++++++++++++++---
 server/red-qxl.cpp         | 14 +++++++----
 server/spice-qxl.h         |  4 ++--
 server/video-encoder.h     |  7 ++++++
 server/video-stream.cpp    | 11 ++++++++-
 9 files changed, 132 insertions(+), 11 deletions(-)

-- 
2.37.2




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]