From: Victor Toso <me@xxxxxxxxxxxxxx> 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@xxxxxxxxxx> --- common/messages.h | 10 ++++++++++ spice.proto | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/common/messages.h b/common/messages.h index 516a345..7bc90fd 100644 --- a/common/messages.h +++ b/common/messages.h @@ -648,6 +648,16 @@ typedef struct SpiceMsgcDisplayPreferredCompression { uint8_t image_compression; } SpiceMsgcDisplayPreferredCompression; +typedef struct SpiceVideoCodecPreferredRank { + uint8_t type; + uint8_t rank; +} SpiceVideoCodecPreferredRank; + +typedef struct SpiceMsgcDisplayPreferredVideoCodecType { + uint32_t num_of_codecs; + SpiceVideoCodecPreferredRank codec_ranks[0]; +} SpiceMsgcDisplayPreferredVideoCodecType; + typedef struct SpiceMsgDisplayGlScanoutUnix { int drm_dma_buf_fd; uint32_t width; diff --git a/spice.proto b/spice.proto index 0bfc515..c4f1a62 100644 --- a/spice.proto +++ b/spice.proto @@ -706,6 +706,19 @@ flags32 gl_scanout_flags { Y0TOP }; +enum8 video_codec_rank { + DISABLED = 0, + SOFTWARE_DECODER, + HARDWARE_DECODER, + BOTH, + PREFERRED, +}; + +struct VideoCodecPreferredRank { + video_codec_type type; + video_codec_rank rank; +}; + channel DisplayChannel : BaseChannel { server: message { @@ -984,6 +997,11 @@ channel DisplayChannel : BaseChannel { } preferred_compression; message { + uint32 num_of_codecs; + VideoCodecPreferredRank codec_ranks[num_of_codecs] @end; + } preferred_video_codec_type; + + message { } gl_draw_done; }; -- 2.9.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel