## libspice-common#spice_common_sources = ['agent.c','agent.h','backtrace.c','backtrace.h','canvas_utils.c','canvas_utils.h','demarshallers.h','draw.h','lines.c','lines.h','log.c','log.h','lz.c','lz.h','lz_common.h','lz_config.h','macros.h','marshaller.c','marshaller.h','mem.c','mem.h','messages.h','pixman_utils.c','pixman_utils.h','quic.c','quic.h','quic_config.h','rect.h','region.c','region.h','ring.h','rop3.c','rop3.h','snd_codec.c','snd_codec.h','utils.c','utils.h','verify.h','recorder.h']if get_option('instrumentation') == 'recorder'spice_common_sources += ['recorder/recorder.c','recorder/recorder.h','recorder/recorder_ring.c','recorder/recorder_ring.h']endifif get_option('instrumentation') == 'agent'spice_common_sources += ['agent_interface.c','agent_interface.h']endifspice_common_lib = static_library('spice-common', spice_common_sources,install : false,include_directories : spice_common_include,dependencies : spice_common_deps)spice_common_dep = declare_dependency(link_with : spice_common_lib,include_directories : spice_common_include,dependencies : spice_common_deps)# client_demarshallersif spice_common_generate_client_code or spice_common_generate_server_codecodegen_cmd = [python, spice_codegen]codegen_args = ['--generate-demarshallers','--client','--include', 'common/messages.h','--generated-declaration-file', '@OUTPUT1@','@INPUT@', '@OUTPUT0@']client_demarshallers = custom_target('client_demarshallers',input : [spice_proto],output : ['generated_client_demarshallers.c', 'generated_messages.h'],install : false,command : [codegen_cmd, codegen_args],depend_files : [spice_codegen_files, 'messages.h'])endif
## libspice-common-client#if spice_common_generate_client_code# client_marshallerscodegen_args = ['--generate-marshallers','--generate-header','-P','--client','--include', 'common/client_marshallers.h','@INPUT0@', '@OUTPUT0@']client_marshallers = custom_target('client_marshallers',input : [spice_proto, client_demarshallers],output : ['generated_client_marshallers.c', 'generated_client_marshallers.h'],install : false,command : [codegen_cmd, codegen_args],depend_files : [spice_codegen_files, 'client_marshallers.h'])spice_common_client_sources = [client_demarshallers,client_marshallers,'client_marshallers.h','ssl_verify.c','ssl_verify.h',]spice_common_client_lib = static_library('spice-common-client', spice_common_client_sources,install : false,dependencies : [spice_common_dep, gio2_deps])spice_common_client_dep = declare_dependency(sources : client_marshallers[1],link_with : spice_common_client_lib,dependencies : [spice_common_dep, gio2_deps])endif
## libspice-common-server#if spice_common_generate_server_codestructs_args = ['-M', 'String','-M', 'Rect','-M', 'Point','-M', 'DisplayBase','-M', 'Fill','-M', 'Opaque','-M', 'Copy','-M', 'Blend','-M', 'Blackness','-M', 'Whiteness','-M', 'Invers','-M', 'Rop3','-M', 'Stroke','-M', 'Text','-M', 'Transparent','-M', 'AlphaBlend','-M', 'Composite',]targets = [{ 'name' : 'server_demarshallers','input' : [ spice_proto, client_demarshallers ],'output' : ['generated_server_demarshallers.c'],'codegen_args' : ['--generate-demarshallers','--server','--include', 'common/messages.h','@INPUT0@', '@OUTPUT0@'],},{ 'name' : 'server_marshallers','input' : [ spice_proto, client_demarshallers ],'output' : ['generated_server_marshallers.c', 'generated_server_marshallers.h'],'codegen_args' : ['--generate-marshallers','--generate-header','--server',structs_args,'--include', 'common/messages.h','@INPUT0@', '@OUTPUT0@']},]spice_common_server_sources = []spice_common_server_dep_sources = []foreach t : targetstarget = custom_target(t['name'],input : t['input'],output : t['output'],install : false,command : [codegen_cmd, t['codegen_args']],depend_files : [spice_codegen_files, 'messages.h'])spice_common_server_sources += targetif t['output'].length() > 1spice_common_server_dep_sources += target[1]endifendforeachspice_common_server_lib = static_library('spice-common-server', spice_common_server_sources,install : false,dependencies : spice_common_dep)spice_common_server_dep = declare_dependency(sources : spice_common_server_dep_sources,link_with : spice_common_server_lib,dependencies : spice_common_dep)endif
源代码文件
1、snd_codec.c/.h opus编码的封装实现
2、agent.c/.h,agent_interface.c/.h agent接口
3、canvas_base.c/.h,canvas_utils.c/.h,sw_canvas.c/.h ,draw.h 画布
4、lz.c/.h,lz_config.h,lz_common.h,lz_compress_tmpl .c,lz_decompress_tmpl .c lz压缩算法
5、macros.h 宏定义
6、mem.c/.h SpiceBuffer内存区处理
7、pixman_utils.c/.h pixman图像处理
8、quic.c/.h ,quic_config.c/.h ,quic_tmpl.h ,quic_family_tmpl.h :Spice的专有的基于SFALIC算法的图像压缩工具(图像压缩算法:quic,glz(就是调用zlib库),jpeg)。
9、region.c/.h 区域
10、ssl_verify.c/.h ,verify.c/.h ssl认证
11、rop3.c/.h 栅格化
12、log.c/.h 日志
13、ring.h 命令环
14、backtrace.c/.h 跟踪信息
15、demarshallers.c/.h ,marshaller.c/.h 序列化和反序列化
16、messages.h 打包消息