Commit Graph

341 Commits

Author SHA1 Message Date
Alexander Larsson
c621b2bdf1 Support extra prefix in code generators
This is require when we add a new spice.proto for the old (major 1)
protocol description.
2010-06-22 16:01:57 +02:00
Alexander Larsson
36fd22a9db Add more emacs mode headers 2010-06-22 12:03:21 +02:00
Alexander Larsson
5c05a24ba1 Convert client to use indirect calls for message marshalling
This is required to support multiple versions
2010-06-22 10:54:59 +02:00
Alexander Larsson
5341b632e2 Support creating marshallers that are called indirectly
This is needed if we want to switch marshallers depending on what
major version the remote side has.
2010-06-22 10:54:59 +02:00
Alexander Larsson
9123e24e7b Add destructor for demarshalled messages
This is required because we don't want to free messages that just
refer to the unparsed message (like SpiceMsgData).

Also, in the future we might need it for more complex demarshalling.
2010-06-22 10:53:24 +02:00
Yonit Halperin
ae1de849ac fix for not reseting client palette caches on migration 2010-06-21 15:18:46 +02:00
Yonit Halperin
537280f183 Lossy compression of RGBA images (on WAN connection)
The RGB channels are compressed using JPEG.
The alpha channel is compressed using LZ.
2010-06-21 15:18:26 +02:00
Yonit Halperin
25bb38f643 applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
Alexander Larsson
cfc1e95bda Make opengl optional, disabled by default
The OpenGL renderer isn't really useful right now, its not quite up
to date, its not really faster than software and it only supports a limited
subset of drivers. So, lets disable it for now.

Long term opengl rendering of the 2d part of spice is important if we want
to combine 2d and 3d rendering (say if spice adds opengl support in the
protocol). But until then this is isn't useful for normal use.
2010-06-21 14:50:18 +02:00
Alexander Larsson
ae4436215c Make generated marshallers build on win32 2010-06-18 21:10:25 +02:00
Alexander Larsson
0f2e037834 Add server/demarshaller.h 2010-06-18 20:27:32 +02:00
Alexander Larsson
972951dbb7 Make sound data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
4ce4364f84 Make ping data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
3c8cb83af5 Make cursor data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
7fa29ea67e Support @as_ptr in demarshaller to avoid copying data unnecessary 2010-06-18 20:27:32 +02:00
Alexander Larsson
0b82006733 Make pointer types in messages be 64bit in memory
Right now we always assume pointers are stored as SPICE_ADDRESS,
i.e. 64bit, independent on the size sent on the network.
This is required for 64bit architectures of course, but slightly overkill
on 32bit architectures, so needs fixing when all SPICE_ADDRESS elements
can be made internal.
2010-06-18 20:27:32 +02:00
Alexander Larsson
3a07edb4af Don't pack the message structures 2010-06-18 20:27:32 +02:00
Alexander Larsson
4c1094acce Make all message structs internal to spice
We move all message structs from spice-protocol to spice as
we want to be able to change these as needed internally. The
on-network format is no longer defined by these structures anyway,
but rather by the spice protocol description.
2010-06-18 20:27:32 +02:00
Alexander Larsson
185a320c9b Allow multiple --include args 2010-06-18 20:27:32 +02:00
Alexander Larsson
c553fafe4b Use generated demarshallers in server 2010-06-18 20:27:32 +02:00
Alexander Larsson
ec10a1662f Generate demarshallers on server side 2010-06-18 20:27:32 +02:00
Alexander Larsson
4e44b7cf95 Make tunnel_service_add members be of cstring array size 2010-06-18 20:27:32 +02:00
Alexander Larsson
ee91ed475d Switch client to use generated marshallers 2010-06-18 20:27:32 +02:00
Alexander Larsson
1302667662 Generate and link marshallers into client 2010-06-18 20:27:32 +02:00
Alexander Larsson
d9772344e6 Re-enable cache freeing
I don't know why this was disabled but it seems like a bad idea
2010-06-18 20:27:32 +02:00
Alexander Larsson
04e0c6e5b2 Convert reds.c to use SpiceMarshaller 2010-06-18 20:27:31 +02:00
Alexander Larsson
8418da7ab2 Convert snd_worker.c to use SpiceMarshaller and generated marshallers 2010-06-18 20:27:31 +02:00
Alexander Larsson
cfc86f3340 Convert red_worker.c to use SpiceMarshaller for marshalling 2010-06-18 20:27:31 +02:00
Alexander Larsson
e2728082d0 Generate marshallers in server 2010-06-18 20:27:27 +02:00
Alexander Larsson
c36efa5950 Use @ptr32 for 32bit offsets in spice.proto 2010-06-18 16:32:11 +02:00
Alexander Larsson
635ad37ee9 Add @nomarshal in a few places where we're marshalling manually 2010-06-18 16:32:11 +02:00
Alexander Larsson
a7284761be spice.proto: add @outvar markup
With this we can reference pointer member with no naming conflicts
2010-06-18 16:32:11 +02:00
Alexander Larsson
936b3f01f9 Add support for generating message and structure marshallers 2010-06-18 16:32:11 +02:00
Alexander Larsson
0cca1ed2af Add SpiceMarshaller for easy marshalling 2010-06-18 16:32:11 +02:00
Alexander Larsson
1a0b3fbdbb Generate demarshalling code on win32 too 2010-06-18 16:32:11 +02:00
Alexander Larsson
4154d70289 Client: Use the autogenerated demarshallers
When a message has been read from the network we now pass it into
the generated demarshaller for the channel. The demarshaller converts
the network data to in-memory structures that is passed on to the
spice internals.

Additionally it also:
* Converts endianness
* Validates sizes of message and any pointers in it
* Localizes offsets (converts them to pointers)
* Checks for zero offsets in messages where they are not supported

Some of this was previously done using custom code in the client, this
is now removed.
2010-06-18 16:32:11 +02:00
Alexander Larsson
17bbef4df3 Generate demarshallers in client 2010-06-18 16:32:11 +02:00
Alexander Larsson
b228d18d5c Add python code to automake system 2010-06-18 16:32:11 +02:00
Alexander Larsson
0366e7395c Initial import of spice protocol description and demarshall generator
The "spice.proto" file describes in detail the networking prototcol
that spice uses and spice_codegen.py can parse this and generate
demarshallers for such network messages.
2010-06-18 16:32:10 +02:00
Alexander Larsson
aa6b7b5beb Use the correctly spelled enum values from the new generated enums 2010-06-18 16:32:10 +02:00
Alexander Larsson
1ba1ce52ed Use the new enums for keyboard modifier flags 2010-06-18 16:32:10 +02:00
Alexander Larsson
ef8a8dae07 There are multiple line attribute flags enums, use only one 2010-06-17 11:21:03 +02:00
Alexander Larsson
1d1792c217 Add spice_strnlen 2010-06-17 11:21:03 +02:00
Yonit Halperin
3d7c1eaa18 server: optimize red_pipe_replace_rendered_drawables_with_images (lossy bitmaps support related) 2010-06-09 11:43:31 +02:00
Yonit Halperin
8b02360033 init/destroy lossy surface region 2010-06-09 11:41:02 +02:00
Yonit Halperin
ba32024ad1 enabling jpeg on low bandwidth connection 2010-06-09 11:41:02 +02:00
Yonit Halperin
1a752e3884 not using jpeg when sending a surface to the client (the whole surface)
When a surface is sent to the client using red_send_surface_image, operations were already
performed on it. Thus it may combine, especially if it is a primary surface, both "picture-like" areas
and areas that are more "artificial". In order to avoid noticeable artifacts, such surface will be sent lossless.
2010-06-09 11:41:02 +02:00
Yonit Halperin
0c199b0886 send qxl commands to client: support for resending lossy components when jpeg compression is enabled 2010-06-09 11:41:02 +02:00
Yonit Halperin
c970f41f8e infrastructure routines for resending to the client part of surfaces that have been sent lossy.
The code also handles cases in which the server doesn't hold anymore these surfaces parts, i.e., when
it holds a more updated version of them. This scenario is handled by replacing commands that were rendered, with images.
2010-06-09 11:41:02 +02:00
Yonit Halperin
5d01cae430 introducing lossy and lz compression in red_send_image 2010-06-09 11:41:02 +02:00