Re: [PATCH v1 0/5] dcc: Create a stream for non-gl/remote clients that want to use dmabuf

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


Hi Vivek,
   I was trying the patch series but the client keeps crashing. I
tried different versions of remote-viewer (from Fedora and from
Ubuntu) and they both crashed.
On host I installed Intel VA drivers , Gstreamer VAAPIs and forced
gstreamer:h264 as encoder.
Anything else you need to do?

On the logs I find:

2023-03-25T19:31:36.034007Z qemu-system-x86_64: warning: Spice:
../server/dcc-send.cpp:1786:red_marshall_gl_draw_stream: bad return
value (0) from VideoEncoder::encode_dmabuf
2023-03-25T19:31:37.064219Z qemu-system-x86_64: warning: spice: no
gl-draw-done within one second
2023-03-25T19:31:58.214387Z qemu-system-x86_64: warning: Spice:
Connection reset by peer
2023-03-25T19:31:58.214482Z qemu-system-x86_64: warning: Spice:
Connection reset by peer
2023-03-25T19:31:58.214580Z qemu-system-x86_64: warning: Spice:
Connection reset by peer
2023-03-25T19:31:58.214642Z 2023-03-25T19:31:58.214636Z
qemu-system-x86_64:qemu-system-x86_64:  warning: Spice: Connection
reset by peer
warning: Spice: display:0 (0x55947e76fd10): Connection reset by peer
2023-03-25T19:31:58.214721Z qemu-system-x86_64: warning: Spice:
Connection reset by peer
2023-03-25T19:31:58.214841Z qemu-system-x86_64: warning: Spice:
Connection reset by peer
2023-03-25T19:31:58.215057Z qemu-system-x86_64: warning: Spice:
Connection reset by peer

0 value from encode_dmabuf should mean VIDEO_ENCODER_FRAME_DROP.


Il giorno gio 16 mar 2023 alle ore 06:05 Vivek Kasireddy
<vivek.kasireddy@xxxxxxxxx> ha scritto:
> For clients that cannot accept a dmabuf fd directly (such as those
> running on a remote system), this patch series provides a way for
> the Spice server to stream the gl/dmabuf data/buffer instead. This
> is mostly done by enabling the 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/VM desktop but it can be easily extended
> to other plugins and applications.
> Here is roughly how things work:
> - The application (e.g, Qemu) chooses its preferred codec (a Gstreamer
>   one) and calls gl_scanout (to update the fd) followed by gl_draw.
> - In response, the Spice server checks to see if the client is capable
>   of accepting a dmabuf fd directly or not. If yes, the fd is forwarded
>   directly to the client; otherwise, a new stream is created.
> - The Spice server then sends the dmabuf fd to the Gstreamer encoder
>   which uses it as an input for creating an encoded buffer which is then
>   sent to the client.
> - Once the encoding process is done, an async completion cookie is sent
>   to the application.
> Here is a link to the previous version that used a drawable to share
> the dmabuf fd with the Gstreamer encoder:
> Cc: Frediano Ziglio <freddy77@xxxxxxxxx>
> Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx>
> Cc: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> Cc: Dongwon Kim <>
> Vivek Kasireddy (5):
>   dcc: Check to see if the client supports multiple codecs
>   dcc: Create a stream associated with gl_draw for non-gl clients
>   dcc-send: Encode and send gl_draw stream data to the remote client
>   gstreamer-encoder: Add an encoder function that takes dmabuf fd as
>     input
>   video-stream: Don't stop a stream if a gl_draw operation is pending
>                      |   2 +-
>  server/dcc-private.h             |   4 ++
>  server/dcc-send.cpp              |  89 ++++++++++++++++++++++-
>  server/dcc.cpp                   |  36 +++++++---
>  server/display-channel-private.h |   6 ++
>  server/gstreamer-encoder.c       | 119 ++++++++++++++++++++++++++++++-
>  server/video-encoder.h           |  13 ++++
>  server/video-stream.cpp          |  65 ++++++++++++++++-
>  server/video-stream.h            |   2 +
>  9 files changed, 319 insertions(+), 17 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]