summaryrefslogtreecommitdiffstats
path: root/server/main_channel.h
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-04-10 21:11:20 +0300
committerAlon Levy <alevy@redhat.com>2011-08-23 17:57:13 +0300
commit5bcdf37997a2edfeb70999d16da3a49d15af122e (patch)
tree57deb8fbcbb5bba2de9ebcd73cf137496b866b7d /server/main_channel.h
parent614df171931ebc746652537215a5ce83bdf8a458 (diff)
downloadspice-5bcdf37997a2edfeb70999d16da3a49d15af122e.tar.gz
spice-5bcdf37997a2edfeb70999d16da3a49d15af122e.tar.xz
spice-5bcdf37997a2edfeb70999d16da3a49d15af122e.zip
server/main_channel: move latency and bitrate to channel client
They were globals before. This introduces api for other channels to query the low bandwidth status. The queries themselves are still done from the wrong context (channel and not channel client) but that's because the decoupling of channel and channel client will be done in the following patches. Note that snd_worker.c got two copied function declarations that belong to main_channel.h but can't be easily dragged into snd_worker.c since it still uses it's own RedChannel struct.
Diffstat (limited to 'server/main_channel.h')
-rw-r--r--server/main_channel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/main_channel.h b/server/main_channel.h
index ed17d53b..651334db 100644
--- a/server/main_channel.h
+++ b/server/main_channel.h
@@ -76,6 +76,9 @@ void main_channel_push_multi_media_time(MainChannel *main_chan, int time);
int main_channel_getsockname(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen);
int main_channel_getpeername(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen);
+int main_channel_client_is_low_bandwidth(MainChannelClient *mcc);
+uint64_t main_channel_client_get_bitrate_per_sec(MainChannelClient *mcc);
+
// TODO: Defines used to calculate receive buffer size, and also by reds.c
// other options: is to make a reds_main_consts.h, to duplicate defines.
#define REDS_AGENT_WINDOW_SIZE 10