diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-11-02 22:11:58 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-11-27 14:27:41 +0100 |
commit | c541d7e29dc0053e6434d053a50454bb8a7121e9 (patch) | |
tree | df8298e56cab514b1bbe73c378aca39b91f5e595 /server/reds.c | |
parent | ab12cf414c87e0cc3b43bdc47f57bef837986f3b (diff) |
Remove guest side video time-stamping
The multimedia time is defined by the server side monotonic time [1],
but the drawing time-stamp is done in guest side, so it requires
synchronization between host and guest. This is expensive, when no audio
is playing, there is a ~30x/sec wakeup to update the qxl device mmtime,
and it requires marking dirty the rom region.
Instead, the video timestamping can be done more efficiently on server
side, without visible drawbacks.
[1] a better timestamp could be the audio time, since audio players are
usually sync with audio time)
Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=912763
Diffstat (limited to 'server/reds.c')
-rw-r--r-- | server/reds.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/server/reds.c b/server/reds.c index 7ecea13c..f868cd81 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2830,7 +2830,6 @@ uint32_t reds_get_mm_time(void) void reds_enable_mm_timer(void) { - core->timer_start(reds->mm_timer, MM_TIMER_GRANULARITY_MS); reds->mm_timer_enabled = TRUE; reds->mm_time_latency = MM_TIME_DELTA; reds_send_mm_time(); @@ -2838,16 +2837,9 @@ void reds_enable_mm_timer(void) void reds_disable_mm_timer(void) { - core->timer_cancel(reds->mm_timer); reds->mm_timer_enabled = FALSE; } -static void mm_timer_proc(void *opaque) -{ - red_dispatcher_set_mm_time(reds_get_mm_time()); - core->timer_start(reds->mm_timer, MM_TIMER_GRANULARITY_MS); -} - static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) { VDIPortState *state = &reds->agent_state; @@ -3271,11 +3263,6 @@ static int do_spice_init(SpiceCoreInterface *core_interface) } #endif - if (!(reds->mm_timer = core->timer_add(mm_timer_proc, NULL))) { - spice_error("mm timer create failed"); - } - reds_enable_mm_timer(); - if (reds_init_net() < 0) { goto err; } |