spice Main Channel definition

本文介绍了Spice协议中的多媒体时间更新方法,包括playback channel的时间戳和main channel的SPICE_MSG_MAIN_MULTI_MEDIA_TIME消息。此外,详细阐述了Spice agent的作用,Display channel的定义及其操作,包括模式设置、重置和绘制命令。同时涵盖Cursor、Playback和Record Channel的功能和定义,用于控制指针、音频回放和录音。

Multimedia time

spice定义了用于设定多媒体时间的消息用于同步视频和音频流。
有两种方法更新多媒体时间。
第一种是使用数据到达playback channel时间戳。
第二种方法是使用main channel的SPICE_MSG_MAIN_MULTI_MEDIA_TIME 消息。
当没有活动的playback channel 存在时使用第二种方法。

Spice agent

spice protocol 定义了一系列的消息用于spice client和spice client agent 在远程server上的双向交流。
spice 只提供了一个交流的通道(channel),实际交换的数据内容对于协议是不可见的。
channel 有多种用途,例如:client-guest 粘贴板的分享,授权和现实配置。

Display channel definition

定义了一系列的信息用于指示显示远程client显示的显示区域。这个协议支持使用图形元素和视频流。
协议同时也支持捕捉client的图像和色盘。spice display channel支持多种图像压缩方法。

步骤:

  1. server发送 SPICE_MSG_DISPLAY_MODE 模式的消息用于指定当前绘制的区域大小和类型。
  2. 然后client 创建一个绘制区域展示server后续发送的所有绘制命令。
  3. client只有在接收到标记命令(SPICE_MSG_DISPLAY_MARK)才会展示新的绘制内容。
  4. server 可以通过发送SPICE_MSG_DISPLAY_RESET 通知client丢弃之前的晦气区域和调色板(palette )缓存。
  5. 只有client不存在active 绘制区域时才可以发送mode 消息。
  6. 只有client存在active绘制区域时才可以发送reset消息。
  7. 只允许在mode消息和reset消息之间发送一次标记信息。
  8. 绘制命令,复制bits命令和流命令只在client有与i个active显示区域时才可以发送 (i.e., between SPICE_MSG_DISPLAY_MODE to SPICE_MSG_DISPLAY_RESET)。

一些重要的消息的内容与意义

  • Draw area control 绘制区域控制 SPICE_MSG_DISPLAY_MODE {显示区域宽度,高度和深度}
  • Raster operation descriptor 。定义了一系列标记表示光栅操作,用于source image source brush ,位置和绘制过程中的结果。
  • raw 光栅图像。描述raw raster image(pixmap) 。
    - Pixmap format types
    - SpicePalette
    - Pixmap flags
    - Pixmap
  • LZ with palette 描述了一种结合了调色板和压缩位图数据的数据结构。图像压缩算法是LZSS 。
    - LZPalette Flags
    - LZPalette
  • spice image 。 Spice image用于表示光栅图像的各种命令和数据结构。
    - Image types
    - Image flags
    - SpiceImageDescriptor
    - Image data
  • Glyph SpiceString 定义了一个用于渲染的图形数组
  • Data Types
    - RectList
    - Path segment flags
    - SpicePathSeg
    - PathSegList
    - SpiceClip types
    - SpiceClip
    - Mask flags
    - Mask
    - SpiceBrush types
    - SpicePattern
    - SpiceBrush
    - Image scale mode
    - LineAtrr flags
    - LineAtrr join style
    - SpiceLineAttr
  • Rendering command 绘制命令
    - SpiceMsgDisplayBase
    - SPICE_MSG_DISPLAY_COPY_BITS(从展示区域指定位置复制bit到指定box中。使用xy(left-top)wh的方式指定边界框)
    - SPICE_MSG_DISPLAY_DRAW_FILL 使用brush作为填充模板和rop_descriptor (Raster operation descriptor ) 指导。
    - SPICE_MSG_DISPLAY_DRAW_OPAQUE 使用rop_descriptor指令将source_image中source_area中的像素与画笔的模式结合起来。
    - SPICE_MSG_DISPLAY_DRAW_COPY 使用rop描述子 从source_image 中的source_area 复制pixels到指定区域
    - SPICE_MSG_DISPLAY_DRAW_BLEND 混合source_area 和指定区域的像素
    - SPICE_MSG_DISPLAY_DRAW_BLACKNESS 在指定区域内填充黑色
    - SPICE_MSG_DISPLAY_DRAW_WHITENESS 同上填充白色
    - SPICE_MSG_DISPLAY_DRAW_INVERS 反转指定区域内的像素
    - SPICE_MSG_DISPLAY_DRAW_ROP3 混合source_area 、 bounding_box pixels、 brush pattern
    - SPICE_MSG_DISPLAY_DRAW_TRANSPARENT 类似于SPICE_MSG_DISPLAY_DRAW_COPY 区别是?
    - SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND 绘制带有透明度的图像
    - SPICE_MSG_DISPLAY_DRAW_STROKE 使用brush line 和rop 描述子绘制路径。
    - SPICE_MSG_DISPLAY_DRAW_TEXT 使用笔刷fore_brush和rop_descriptor fore_mode在显示区域上绘制图形传串。
  • Video streaming commands 流数据允许使用损失数据的压缩算法。不要求到达即进行绘制,也允许丢失视频帧。使用音频和视频流中的时间戳实现同步。可以减少网络拥堵的现象。
    - SPICE_MSG_DISPLAY_STREAM_CREATE 流开始时发送该消息。
    - SPICE_MSG_DISPLAY_STREAM_DATA 创建流之后发送流数据
    - SPICE_MSG_DISPLAY_STREAM_CLIP 设置new stream clipping
    - SPICE_MSG_DISPLAY_STREAM_DESTROY 不需要视频流之后发送该消息
    - SPICE_MSG_DISPLAY_STREAM_DESTROY_ALL 销毁当前所有的视频流
  • Cache control

Cursor channel definition

用于控制指针在远程显示中的形态和位置,指针位置信息和client mouse mode 不相关。也定义了一系列信息用于管理client上指针形状的缓存。

Playback channel definition

Spice支持在clinet发送音频流以供回放。

  • SPICE_MSG_PLAYBACK_DATA 传输数据。
  • SPICE_MSG_PLAYBACK_MODE 回放模式
  • SPICE_MSG_PLAYBACK_START 开始,只允许在stop状态下发送
  • SP ICE_MSG_PLAYBACK_STOP 停止,只允许在start状态下发送。

Record Channel definition

支持client将捕获的音频流发送至server

****** HSPICE -- R-2020.12 linux64 (Nov 23 2020 6727817) ****** Copyright (c) 1986 - 2025 by Synopsys, Inc. All Rights Reserved. This software and the associated documentation are proprietary to Synopsys, Inc. This software may only be used in accordance with the terms and conditions of a written license agreement with Synopsys, Inc. All other use, reproduction, or distribution of this software is strictly prohibited. Input File: AB.sp Command line options: /cad/synopsys/hspice/2020.12/hspice/linux64/hspice -i AB.sp -o Start time: Sun Nov 30 16:31:09 2025 lic: lic: FLEXlm: SDK_12.9 lic: USER: u112011132 HOSTNAME: cwlu lic: HOSTID: "0cc47a6d0cd2" PID: 7964 lic: Using FLEXlm license file: lic: 26585@lshc lic: Checkout 1 hspice lic: License/Maintenance for hspice will expire on 14-jun-2027/2025.06 lic: 319(in_use)/1235(total) FLOATING license(s) on SERVER 26585@lshc lic: **warning** (AB.sp:54) measure result power redefined, ignored the previous. **info** the obsolete option acout is ignored **info** the obsolete option acout is ignored **warning** (AB.sp:5) runlvl smaller than 5, reset to 5 when accurate turned on **warning** (AB.cir:18) Parameter name is not defined in .param. Please enter parameter variable with their respective value/expression. **warning** runlvl smaller than 5, reset to 5 when accurate turned on 1****** HSPICE -- R-2020.12 linux64 (Nov 23 2020 6727817) ****** ****** **********analog ic term project: closed-loop thd********* ****** circuit name directory circuit number to circuit name directory number circuitname definition multiplier 0 main circuit 1 xab. ab 1.00 **error** (AB.cir:31) Reference p_33 not found, or instance width or length does not fit into the wmax/wmin or lmax/lmin range. It was referenced in element xab.mrefp1. The channel width= 1.000E-06 and length= 3.300E-07 . ***Template model information MODEL p_33.1 lmin=3.500000e-07 lmax=5.000000e-05 wmin=2.500000e-07 wmax=1.000000e-04 (l is out of range) ***** job aborted ****** **********analog ic term project: closed-loop thd********* ****** job statistics summary tnom= 25.000 temp= 25.000 ****** ****** Machine Information ****** CPU: model name : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz cpu MHz : 1629.052 OS: Linux version 3.10.0-1160.66.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed May 18 16:02:34 UTC 2022 ****** HSPICE Threads Information ****** Command Line Threads Count : 1 Available CPU Count : 32 Actual Threads Count : 1 ****** Circuit Statistics ****** # nodes = 37 # elements = 57 # resistors = 2 # capacitors = 3 # inductors = 0 # mutual_inds = 0 # vccs = 0 # vcvs = 2 # cccs = 0 # ccvs = 0 # volt_srcs = 8 # curr_srcs = 0 # diodes = 0 # bjts = 0 # jfets = 0 # mosfets = 42 # U elements = 0 # T elements = 0 # W elements = 0 # B elements = 0 # S elements = 0 # P elements = 0 # va device = 0 # vector_srcs = 0 # N elements = 0 ****** Runtime Statistics (seconds) ****** analysis time # points tot. iter conv.iter op point 0.00 1 0 ac analysis 0.00 115 0 readin 0.02 errchk 0.00 setup 0.00 output 0.00 peak memory used 460.73 megabytes total cpu time 0.02 seconds total elapsed time 0.27 seconds job started at 16:31:09 11/30/2025 job ended at 16:31:09 11/30/2025 job total runtime 0.27 seconds lic: Release hspice token(s) lic: total license checkout elapse time: 0.24(s)
最新发布
12-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值