diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2015-11-10 14:41:16 -0600 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2015-11-18 08:37:21 +0000 |
commit | ac2a854fbfe7b85892c2f6d6eaeaf27d559f9bd7 (patch) | |
tree | 1164cc0efcb5c687623c28fa7e22ab7bc9f44d72 /server/display-channel.h | |
parent | 5897952f46881a3324c9c7be9339065310011079 (diff) | |
download | spice-ac2a854fbfe7b85892c2f6d6eaeaf27d559f9bd7.tar.gz spice-ac2a854fbfe7b85892c2f6d6eaeaf27d559f9bd7.tar.xz spice-ac2a854fbfe7b85892c2f6d6eaeaf27d559f9bd7.zip |
worker: Move stream functions to stream.c
Acked-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'server/display-channel.h')
-rw-r--r-- | server/display-channel.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/server/display-channel.h b/server/display-channel.h index 40a3dc65..29df3132 100644 --- a/server/display-channel.h +++ b/server/display-channel.h @@ -57,8 +57,6 @@ #include "tree.h" #include "stream.h" -typedef struct DisplayChannel DisplayChannel; - #define PALETTE_CACHE_HASH_SHIFT 8 #define PALETTE_CACHE_HASH_SIZE (1 << PALETTE_CACHE_HASH_SHIFT) #define PALETTE_CACHE_HASH_MASK (PALETTE_CACHE_HASH_SIZE - 1) @@ -347,6 +345,21 @@ struct DisplayChannel { stat_info_t lz4_stat; #endif }; + +#define LINK_TO_DCC(ptr) SPICE_CONTAINEROF(ptr, DisplayChannelClient, \ + common.base.channel_link) +#define DCC_FOREACH_SAFE(link, next, dcc, channel) \ + SAFE_FOREACH(link, next, channel, &(channel)->clients, dcc, LINK_TO_DCC(link)) + + +#define FOREACH_DCC(display_channel, link, next, dcc) \ + DCC_FOREACH_SAFE(link, next, dcc, RED_CHANNEL(display_channel)) + +static inline int get_stream_id(DisplayChannel *display, Stream *stream) +{ + return (int)(stream - display->streams_buf); +} + typedef struct SurfaceDestroyItem { SpiceMsgSurfaceDestroy surface_destroy; PipeItem pipe_item; |