diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2010-06-09 11:40:25 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:43 +0100 |
commit | 19bca5b373d9b8fa983f723a8daea54178b0a3ed (patch) | |
tree | 755ac3ff617194a24a8240b9d6190c9ced005d05 /common/canvas_base.h | |
parent | 41171d081d821278e002b3699517bf3a177046ff (diff) | |
download | spice-common-19bca5b373d9b8fa983f723a8daea54178b0a3ed.tar.gz spice-common-19bca5b373d9b8fa983f723a8daea54178b0a3ed.tar.xz spice-common-19bca5b373d9b8fa983f723a8daea54178b0a3ed.zip |
JPEG support: introducing jpeg encoding for spice bitmaps
Diffstat (limited to 'common/canvas_base.h')
-rw-r--r-- | common/canvas_base.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/canvas_base.h b/common/canvas_base.h index f78b0b8..4eaafbb 100644 --- a/common/canvas_base.h +++ b/common/canvas_base.h @@ -31,6 +31,7 @@ typedef struct _SpiceImageCache SpiceImageCache; typedef struct _SpiceImageSurfaces SpiceImageSurfaces; typedef struct _SpicePaletteCache SpicePaletteCache; typedef struct _SpiceGlzDecoder SpiceGlzDecoder; +typedef struct _SpiceJpegDecoder SpiceJpegDecoder; typedef struct _SpiceVirtMapping SpiceVirtMapping; typedef struct _SpiceCanvas SpiceCanvas; @@ -79,6 +80,23 @@ struct _SpiceGlzDecoder { SpiceGlzDecoderOps *ops; }; + +typedef struct SpiceJpegDecoderOps { + void (*begin_decode)(SpiceJpegDecoder *decoder, + uint8_t* data, + int data_size, + int* out_width, + int* out_height); + void (*decode)(SpiceJpegDecoder *decoder, + uint8_t* dest, + int stride, + int format); +} SpiceJpegDecoderOps; + +struct _SpiceJpegDecoder { + SpiceJpegDecoderOps *ops; +}; + typedef struct { void *(*get_virt)(SpiceVirtMapping *mapping, unsigned long addr, uint32_t add_size); void (*validate_virt)(SpiceVirtMapping *mapping, unsigned long virt, |