[Spice-devel] [spice-protocol v1 4/4] protocol: add preferred video codec message

Victor Toso victortoso at redhat.com
Mon Oct 24 13:28:56 UTC 2016


From: Victor Toso <me at victortoso.com>

Client might want to choose a preferred video codec for streaming for
different reasons which having hardware decoder support being the most
interest one.

This message allows the client to send a combination of video codec
type with a ranking value of SpiceVideoCodecRank.

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 spice/enums.h    | 11 +++++++++++
 spice/protocol.h |  1 +
 2 files changed, 12 insertions(+)

diff --git a/spice/enums.h b/spice/enums.h
index 743a4a8..0523c51 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -318,6 +318,16 @@ typedef enum SpiceGlScanoutFlags {
     SPICE_GL_SCANOUT_FLAGS_MASK = 0x1
 } SpiceGlScanoutFlags;
 
+typedef enum SpiceVideoCodecRank {
+    SPICE_VIDEO_CODEC_RANK_DISABLED,
+    SPICE_VIDEO_CODEC_RANK_SOFTWARE_DECODER,
+    SPICE_VIDEO_CODEC_RANK_HARDWARE_DECODER,
+    SPICE_VIDEO_CODEC_RANK_BOTH,
+    SPICE_VIDEO_CODEC_RANK_PREFERRED,
+
+    SPICE_VIDEO_CODEC_RANK_ENUM_END
+} SpiceVideoCodecRank;
+
 typedef enum SpiceKeyboardModifierFlags {
     SPICE_KEYBOARD_MODIFIER_FLAGS_SCROLL_LOCK = (1 << 0),
     SPICE_KEYBOARD_MODIFIER_FLAGS_NUM_LOCK = (1 << 1),
@@ -528,6 +538,7 @@ enum {
     SPICE_MSGC_DISPLAY_INIT = 101,
     SPICE_MSGC_DISPLAY_STREAM_REPORT,
     SPICE_MSGC_DISPLAY_PREFERRED_COMPRESSION,
+    SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE,
     SPICE_MSGC_DISPLAY_GL_DRAW_DONE,
 
     SPICE_MSGC_END_DISPLAY
diff --git a/spice/protocol.h b/spice/protocol.h
index d742eda..657d835 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -141,6 +141,7 @@ enum {
     SPICE_DISPLAY_CAP_CODEC_MJPEG,
     SPICE_DISPLAY_CAP_CODEC_VP8,
     SPICE_DISPLAY_CAP_CODEC_H264,
+    SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE,
 };
 
 enum {
-- 
2.9.3



More information about the Spice-devel mailing list