[Spice-devel] [RFC PATCH 00/16] Add a streaming channel to stream video data from guest to clients.
Frediano Ziglio
fziglio at redhat.com
Wed Jan 25 12:42:23 UTC 2017
This series of patches introduce a new DisplayChannel (in the
protocol terminology) and a new guest device implementation which
allows the guest to send streamed data to clients.
This will allow GPU passthrough card to stream data using a new
"stream" guest agent.
This guest agent is required as the host as no control (beside
specific cases) to the guest card.
This implementation has the advantage that it does not require
any client change (during some testing lot of warnings are thrown
by the client but these can be easily removed).
This series require the addition of some protocol declaration
which can be found at
https://cgit.freedesktop.org/~fziglio/spice-protocol/log/?h=stream.
To have a go and try how does it work I wrote a small test
program you can find at
https://cgit.freedesktop.org/~fziglio/stream_send.
It requires currently a stream file encoded as H264 to
be sent.
To add the required device to the VM I add these lines
to libvirt configuration:
<channel type='spiceport'>
<source channel='com.redhat.stream.0'/>
<target type='virtio' name='com.redhat.stream.0'/>
</channel>
This configuration, beside the device name, is similar to folder sharing
setting (see
https://www.spice-space.org/docs/manual/manual.chunked/ar01s10.html)
Due to some limitation the VM should have another single
QXL device as video device. This as currently the new
DisplayChannel id is fixed as 1.
Any bandwidth control is missing, there are not even any
protocol declaration for this. It's planned that the guest
should informed if it's using too much bandwidth so can
tune it's settings (frame rate/quality) to allows to support
low bandwidth/low latency connection better.
Frediano Ziglio (16):
OT: small optimization
OT: style
char-device: Allows to handle port events from any char device
stream-device: Add device to handle streaming
stream-device: Start parsing new protocol from guest - TODO
stream-channel: Write a really base channel to implement the streaming
stream-channel: Start implementing DisplayChannel properly
stream-device: Create channel for stream device
stream-channel: Implements initialization
stream-device: Handle streaming data from device to channel
stream-channel: Allows not fixed size
stream-channel: Allows to register callback to get new stream request
stream-channel: Support client connection/disconnection
stream-channel: Do not show an empty blank screen on start
char-device: Do not stop and clear interface on reset
stream-device: Start supporting resetting device when close/open on guest
server/Makefile.am | 3 +-
server/char-device.c | 31 +-
server/char-device.h | 10 +-
server/red-channel.c | 3 +-
server/reds.c | 8 +-
server/spicevmc.c | 10 +-
server/stream-channel.c | 522 +++++++++++++++++++++++++++++++++++++++++-
server/stream-channel.h | 69 +++++-
server/stream-device.c | 276 ++++++++++++++++++++++-
9 files changed, 913 insertions(+), 19 deletions(-)
create mode 100644 server/stream-channel.c
create mode 100644 server/stream-channel.h
create mode 100644 server/stream-device.c
base-commit: fe1b819a970d582aaaacbcc4e6702e40305b5eaa
--
git-series 0.9.1
More information about the Spice-devel
mailing list