summaryrefslogtreecommitdiffstats
path: root/src/spice-channel-priv.h
diff options
context:
space:
mode:
authorVictor Toso <victortoso@redhat.com>2015-09-29 07:53:45 +0200
committerVictor Toso <victortoso@redhat.com>2015-10-30 15:47:44 +0100
commit36c7db9a38cc5335727c2abbe7968112eb6667e0 (patch)
treefa82ab9cf7bc672db11356f12bb774c0b8e5ef8b /src/spice-channel-priv.h
parentaa6f1cd7a233d2a17948d0817d4b6a3bb63a93a4 (diff)
downloadspice-gtk-36c7db9a38cc5335727c2abbe7968112eb6667e0.tar.gz
spice-gtk-36c7db9a38cc5335727c2abbe7968112eb6667e0.tar.xz
spice-gtk-36c7db9a38cc5335727c2abbe7968112eb6667e0.zip
channel-usbredir: drop isoc packets on low bandwidth
When channel wants to send much more data then the wire can handle, the queue grows fast. This patch does not limit the queue growth but introduces an internal API to check if queue size is too big. This internal API is used in usbredir_buffered_output_size_callback which is called before any isoc pacaket is queued in usbredir. The usbredir implements the logic to: - only drop isoc packets - while dropping packtes does still give us video frames from and above 10fps streams An easy way to test locally is sharing and webcam and with tc: tc qdisc add dev lo root netem delay 100ms tc qdisc change dev lo root netem delay 1000ms tc qdisc del dev lo root netem Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1264156
Diffstat (limited to 'src/spice-channel-priv.h')
-rw-r--r--src/spice-channel-priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/spice-channel-priv.h b/src/spice-channel-priv.h
index 436a521..4b2d1e6 100644
--- a/src/spice-channel-priv.h
+++ b/src/spice-channel-priv.h
@@ -111,6 +111,7 @@ struct _SpiceChannelPrivate {
gboolean xmit_queue_blocked;
STATIC_MUTEX xmit_queue_lock;
guint xmit_queue_wakeup_id;
+ guint64 xmit_queue_size;
char name[16];
enum spice_channel_state state;
@@ -171,6 +172,7 @@ void spice_channel_wakeup(SpiceChannel *channel, gboolean cancel);
SpiceSession* spice_channel_get_session(SpiceChannel *channel);
enum spice_channel_state spice_channel_get_state(SpiceChannel *channel);
+guint64 spice_channel_get_queue_size (SpiceChannel *channel);
/* coroutine context */
typedef void (*handler_msg_in)(SpiceChannel *channel, SpiceMsgIn *msg, gpointer data);