[Spice-devel] how to get surface screen-shot in spice-server

Frediano Ziglio fziglio at redhat.com
Mon Oct 26 09:59:58 UTC 2020


> Hi, spice gurus:
> I am a spice developer in my company which devle with desktop cloud
> computing.
> In spice-0.12.4 we can get surface screen-shot in red_worker.c by adding this
> line in red_process_commands():
> surface_flush(worker, surface_id, &rect);
> Function surface_flush flush undraw image to surface, then we get the
> screen-shot by reading surface address.

> But in spice-0.14.3 we can not get proper screen-shot, by adding this line in
> red_process_display():
> display_channel_current_flush(worker->display_channel, surface_id);
> We get screen-shot that flicker with white bars, I do not know why.

> Much appreciation for any reply!

> regards
> Frank

Hi, 
  you should use display_channel_draw.

Frediano



More information about the Spice-devel mailing list