forked from osmocom/wireshark
spice: update capabilities to spice-protocol 0.12.4
Update record and display capabilities. Fix playback capabilities. Change-Id: I18b22d31c6b01f1056311a635aa060c726ee0b18 Reviewed-on: https://code.wireshark.org/review/29379 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
d2d62bf412
commit
6ac6c88816
|
@ -99,16 +99,6 @@ static const value_string playback_mode_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
enum {
|
||||
SPICE_PLAYBACK_CAP_CELT_0_5_1,
|
||||
SPICE_PLAYBACK_CAP_VOLUME
|
||||
};
|
||||
|
||||
enum {
|
||||
SPICE_PLAYBACK_CAP_CELT_0_5_1_MASK = (1 << SPICE_PLAYBACK_CAP_CELT_0_5_1),
|
||||
SPICE_PLAYBACK_CAP_VOLUME_MASK = (1 << SPICE_PLAYBACK_CAP_VOLUME)
|
||||
};
|
||||
|
||||
/* main channel */
|
||||
|
||||
enum {
|
||||
|
@ -231,15 +221,36 @@ static const value_string vd_agent_reply_error_vs[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
/* record channel capabilities - same as playback */
|
||||
/* playback channel capabilities */
|
||||
enum {
|
||||
SPICE_PLAYBACK_CAP_CELT_0_5_1,
|
||||
SPICE_PLAYBACK_CAP_VOLUME,
|
||||
SPICE_PLAYBACK_CAP_LATENCY,
|
||||
SPICE_PLAYBACK_CAP_OPUS,
|
||||
/* Number of bits to display for capabilities of the playback channel. */
|
||||
PLAYBACK_CAP_NBITS
|
||||
};
|
||||
|
||||
enum {
|
||||
SPICE_PLAYBACK_CAP_CELT_0_5_1_MASK = (1 << SPICE_PLAYBACK_CAP_CELT_0_5_1),
|
||||
SPICE_PLAYBACK_CAP_VOLUME_MASK = (1 << SPICE_PLAYBACK_CAP_VOLUME),
|
||||
SPICE_PLAYBACK_CAP_LATENCY_MASK = (1 << SPICE_PLAYBACK_CAP_LATENCY),
|
||||
SPICE_PLAYBACK_CAP_OPUS_MASK = (1 << SPICE_PLAYBACK_CAP_OPUS),
|
||||
};
|
||||
|
||||
/* record channel capabilities */
|
||||
enum {
|
||||
SPICE_RECORD_CAP_CELT_0_5_1,
|
||||
SPICE_RECORD_CAP_VOLUME
|
||||
SPICE_RECORD_CAP_VOLUME,
|
||||
SPICE_RECORD_CAP_OPUS,
|
||||
/* Number of bits to display for capabilities of the record channel. */
|
||||
RECORD_CAP_NBITS
|
||||
};
|
||||
|
||||
enum {
|
||||
SPICE_RECORD_CAP_CELT_0_5_1_MASK = (1 << SPICE_RECORD_CAP_CELT_0_5_1),
|
||||
SPICE_RECORD_CAP_VOLUME_MASK = (1 << SPICE_RECORD_CAP_VOLUME)
|
||||
SPICE_RECORD_CAP_VOLUME_MASK = (1 << SPICE_RECORD_CAP_VOLUME),
|
||||
SPICE_RECORD_CAP_OPUS_MASK = (1 << SPICE_RECORD_CAP_OPUS),
|
||||
};
|
||||
|
||||
/* display channel */
|
||||
|
@ -247,14 +258,36 @@ enum {
|
|||
SPICE_DISPLAY_CAP_SIZED_STREAM,
|
||||
SPICE_DISPLAY_CAP_MONITORS_CONFIG,
|
||||
SPICE_DISPLAY_CAP_COMPOSITE,
|
||||
SPICE_DISPLAY_CAP_A8_SURFACE
|
||||
SPICE_DISPLAY_CAP_A8_SURFACE,
|
||||
SPICE_DISPLAY_CAP_STREAM_REPORT,
|
||||
SPICE_DISPLAY_CAP_LZ4_COMPRESSION,
|
||||
SPICE_DISPLAY_CAP_PREF_COMPRESSION,
|
||||
SPICE_DISPLAY_CAP_GL_SCANOUT,
|
||||
SPICE_DISPLAY_CAP_MULTI_CODEC,
|
||||
SPICE_DISPLAY_CAP_CODEC_MJPEG,
|
||||
SPICE_DISPLAY_CAP_CODEC_VP8,
|
||||
SPICE_DISPLAY_CAP_CODEC_H264,
|
||||
SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE,
|
||||
SPICE_DISPLAY_CAP_CODEC_VP9,
|
||||
/* Number of bits to display for capabilities of the display channel. */
|
||||
DISPLAY_CAP_NBITS
|
||||
};
|
||||
|
||||
enum {
|
||||
SPICE_DISPLAY_CAP_SIZED_STREAM_MASK = (1 << SPICE_DISPLAY_CAP_SIZED_STREAM),
|
||||
SPICE_DISPLAY_CAP_MONITORS_CONFIG_MASK = (1 << SPICE_DISPLAY_CAP_MONITORS_CONFIG),
|
||||
SPICE_DISPLAY_CAP_COMPOSITE_MASK = (1 << SPICE_DISPLAY_CAP_COMPOSITE),
|
||||
SPICE_DISPLAY_CAP_A8_SURFACE_MASK = (1 << SPICE_DISPLAY_CAP_A8_SURFACE)
|
||||
SPICE_DISPLAY_CAP_A8_SURFACE_MASK = (1 << SPICE_DISPLAY_CAP_A8_SURFACE),
|
||||
SPICE_DISPLAY_CAP_STREAM_REPORT_MASK = (1 << SPICE_DISPLAY_CAP_STREAM_REPORT),
|
||||
SPICE_DISPLAY_CAP_LZ4_COMPRESSION_MASK = (1 << SPICE_DISPLAY_CAP_LZ4_COMPRESSION),
|
||||
SPICE_DISPLAY_CAP_PREF_COMPRESSION_MASK = (1 << SPICE_DISPLAY_CAP_PREF_COMPRESSION),
|
||||
SPICE_DISPLAY_CAP_GL_SCANOUT_MASK = (1 << SPICE_DISPLAY_CAP_GL_SCANOUT),
|
||||
SPICE_DISPLAY_CAP_MULTI_CODEC_MASK = (1 << SPICE_DISPLAY_CAP_MULTI_CODEC),
|
||||
SPICE_DISPLAY_CAP_CODEC_MJPEG_MASK = (1 << SPICE_DISPLAY_CAP_CODEC_MJPEG),
|
||||
SPICE_DISPLAY_CAP_CODEC_VP8_MASK = (1 << SPICE_DISPLAY_CAP_CODEC_VP8),
|
||||
SPICE_DISPLAY_CAP_CODEC_H264_MASK = (1 << SPICE_DISPLAY_CAP_CODEC_H264),
|
||||
SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE_MASK = (1 << SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE),
|
||||
SPICE_DISPLAY_CAP_CODEC_VP9_MASK = (1 << SPICE_DISPLAY_CAP_CODEC_VP9)
|
||||
};
|
||||
|
||||
/* display channel */
|
||||
|
@ -627,12 +660,27 @@ static int hf_main_client_agent_tokens = -1;
|
|||
static int hf_tranparent_src_color = -1;
|
||||
static int hf_tranparent_true_color = -1;
|
||||
static int hf_spice_sasl_auth_result = -1;
|
||||
static int hf_record_cap_volume = -1;
|
||||
static int hf_playback_cap_celt_0_5_1 = -1;
|
||||
static int hf_playback_cap_volume = -1;
|
||||
static int hf_playback_cap_latency = -1;
|
||||
static int hf_playback_cap_opus = -1;
|
||||
static int hf_record_cap_celt = -1;
|
||||
static int hf_record_cap_volume = -1;
|
||||
static int hf_record_cap_opus = -1;
|
||||
static int hf_display_cap_sized_stream = -1;
|
||||
static int hf_display_cap_monitors_config = -1;
|
||||
static int hf_display_cap_composite = -1;
|
||||
static int hf_display_cap_a8_surface = -1;
|
||||
static int hf_display_cap_stream_report = -1;
|
||||
static int hf_display_cap_lz4_compression = -1;
|
||||
static int hf_display_cap_pref_compression = -1;
|
||||
static int hf_display_cap_gl_scanout = -1;
|
||||
static int hf_display_cap_multi_codec = -1;
|
||||
static int hf_display_cap_codec_mjpeg = -1;
|
||||
static int hf_display_cap_codec_vp8 = -1;
|
||||
static int hf_display_cap_codec_h264 = -1;
|
||||
static int hf_display_cap_pref_video_codec_type = -1;
|
||||
static int hf_display_cap_codec_vp9 = -1;
|
||||
static int hf_main_uuid = -1;
|
||||
static int hf_main_name = -1;
|
||||
static int hf_main_name_len = -1;
|
||||
|
@ -2871,16 +2919,18 @@ dissect_spice_link_capabilities(tvbuff_t *tvb, packet_info* pinfo, proto_tree *t
|
|||
switch (spice_info->channel_type) {
|
||||
case SPICE_CHANNEL_PLAYBACK:
|
||||
{
|
||||
const int * playback[] = {
|
||||
&hf_common_cap_auth_select,
|
||||
&hf_common_cap_auth_spice,
|
||||
const int * playback_cap[] = {
|
||||
&hf_playback_cap_celt_0_5_1,
|
||||
&hf_playback_cap_volume,
|
||||
&hf_playback_cap_latency,
|
||||
&hf_playback_cap_opus,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (i != 0)
|
||||
return;
|
||||
|
||||
proto_tree_add_bitmask_list(tree, tvb, offset, 4, playback, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_bitmask_list(tree, tvb, offset, 4, playback_cap, ENC_LITTLE_ENDIAN);
|
||||
}
|
||||
break;
|
||||
case SPICE_CHANNEL_MAIN:
|
||||
|
@ -2906,6 +2956,16 @@ dissect_spice_link_capabilities(tvbuff_t *tvb, packet_info* pinfo, proto_tree *t
|
|||
&hf_display_cap_monitors_config,
|
||||
&hf_display_cap_composite,
|
||||
&hf_display_cap_a8_surface,
|
||||
&hf_display_cap_stream_report,
|
||||
&hf_display_cap_lz4_compression,
|
||||
&hf_display_cap_pref_compression,
|
||||
&hf_display_cap_gl_scanout,
|
||||
&hf_display_cap_multi_codec,
|
||||
&hf_display_cap_codec_mjpeg,
|
||||
&hf_display_cap_codec_vp8,
|
||||
&hf_display_cap_codec_h264,
|
||||
&hf_display_cap_pref_video_codec_type,
|
||||
&hf_display_cap_codec_vp9,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -2926,6 +2986,7 @@ dissect_spice_link_capabilities(tvbuff_t *tvb, packet_info* pinfo, proto_tree *t
|
|||
const int * record_cap[] = {
|
||||
&hf_record_cap_celt,
|
||||
&hf_record_cap_volume,
|
||||
&hf_record_cap_opus,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -3504,34 +3565,109 @@ proto_register_spice(void)
|
|||
FT_BOOLEAN, 4, TFS(&tfs_set_notset), SPICE_COMMON_CAP_MINI_HEADER_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_record_cap_volume,
|
||||
{ "Volume record channel support", "spice.record_cap_volume",
|
||||
FT_BOOLEAN, 3, TFS(&tfs_set_notset), SPICE_RECORD_CAP_VOLUME_MASK,
|
||||
{ &hf_playback_cap_celt_0_5_1,
|
||||
{ "CELT 0.5.1 playback channel support", "spice.playback_cap_celt_0_5_1",
|
||||
FT_BOOLEAN, PLAYBACK_CAP_NBITS, TFS(&tfs_set_notset), SPICE_PLAYBACK_CAP_CELT_0_5_1_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_playback_cap_volume,
|
||||
{ "Volume playback channel support", "spice.playback_cap_volume",
|
||||
FT_BOOLEAN, PLAYBACK_CAP_NBITS, TFS(&tfs_set_notset), SPICE_PLAYBACK_CAP_VOLUME_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_playback_cap_latency,
|
||||
{ "Latency playback channel support", "spice.playback_cap_latency",
|
||||
FT_BOOLEAN, PLAYBACK_CAP_NBITS, TFS(&tfs_set_notset), SPICE_PLAYBACK_CAP_LATENCY_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_playback_cap_opus,
|
||||
{ "OPUS playback channel support", "spice.playback_cap_opus",
|
||||
FT_BOOLEAN, PLAYBACK_CAP_NBITS, TFS(&tfs_set_notset), SPICE_PLAYBACK_CAP_OPUS_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_record_cap_celt,
|
||||
{ "CELT 0.5.1 record channel support", "spice.record_cap_celt",
|
||||
FT_BOOLEAN, 3, TFS(&tfs_set_notset), SPICE_RECORD_CAP_CELT_0_5_1_MASK,
|
||||
FT_BOOLEAN, RECORD_CAP_NBITS, TFS(&tfs_set_notset), SPICE_RECORD_CAP_CELT_0_5_1_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_record_cap_volume,
|
||||
{ "Volume record channel support", "spice.record_cap_volume",
|
||||
FT_BOOLEAN, RECORD_CAP_NBITS, TFS(&tfs_set_notset), SPICE_RECORD_CAP_VOLUME_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_record_cap_opus,
|
||||
{ "Opus record channel support", "spice.record_cap_opus",
|
||||
FT_BOOLEAN, RECORD_CAP_NBITS, TFS(&tfs_set_notset), SPICE_RECORD_CAP_OPUS_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_sized_stream,
|
||||
{ "Sized stream display channel support", "spice.display_cap_sized_stream",
|
||||
FT_BOOLEAN, 4, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_SIZED_STREAM_MASK,
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_SIZED_STREAM_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_monitors_config,
|
||||
{ "Monitors configuration display channel support", "spice.display_cap_monitors_config",
|
||||
FT_BOOLEAN, 4, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_MONITORS_CONFIG_MASK,
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_MONITORS_CONFIG_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_composite,
|
||||
{ "Composite capability display channel support", "spice.display_cap_composite",
|
||||
FT_BOOLEAN, 4, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_COMPOSITE_MASK,
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_COMPOSITE_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_a8_surface,
|
||||
{ "A8 bitmap display channel support", "spice.display_cap_a8_surface",
|
||||
FT_BOOLEAN, 4, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_A8_SURFACE_MASK,
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_A8_SURFACE_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_stream_report,
|
||||
{ "Stream Report display channel support", "spice.display_cap_stream_report",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_STREAM_REPORT_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_lz4_compression,
|
||||
{ "LZ4 Compression display channel support", "spice.display_cap_lz4_compression",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_LZ4_COMPRESSION_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_pref_compression,
|
||||
{ "Pref Compression display channel support", "spice.display_cap_pref_compression",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_PREF_COMPRESSION_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_gl_scanout,
|
||||
{ "GL Scanout display channel support", "spice.display_cap_gl_scanout",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_GL_SCANOUT_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_multi_codec,
|
||||
{ "Multi-codec display channel support", "spice.display_cap_multi_codec",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_MULTI_CODEC_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_codec_mjpeg,
|
||||
{ "MJPEG codec display channel support", "spice.display_cap_codec_mjpeg",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_CODEC_MJPEG_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_codec_vp8,
|
||||
{ "VP8 codec display channel support", "spice.display_cap_codec_vp8",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_CODEC_VP8_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_codec_h264,
|
||||
{ "H264 codec display channel support", "spice.display_cap_codec_h264",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_CODEC_H264_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_pref_video_codec_type,
|
||||
{ "Preferred Video Codec Type display channel support", "spice.display_cap_pref_video_codec_type",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_display_cap_codec_vp9,
|
||||
{ "VP9 codec display channel support", "spice.display_cap_codec_vp9",
|
||||
FT_BOOLEAN, DISPLAY_CAP_NBITS, TFS(&tfs_set_notset), SPICE_DISPLAY_CAP_CODEC_VP9_MASK,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_cursor_cap,
|
||||
|
|
Loading…
Reference in New Issue