[Spice-devel] Spice Client API

Marc-André Lureau mlureau at redhat.com
Thu Nov 7 02:41:30 PST 2013


Hi

----- Original Message -----
> Hi Everyone,
> 
> I'm looking for some pointers on the spice client API. There are some tasks
> we would like to automate in our system where we need to see/hear directly
> into QEMU VMs. Right now this is hacked together using wavcapture on the
> monitor and spice-client running inside of a VNC session, which is not at
> all clean. But I'm having difficulty finding enough information to get to a
> basic level of a command-line program that will dump a single screen frame
> and exit.
> 
> I have looked through code on cgit, spice/spice, spice/spice-gtk,
> spice/spice-xpi, etc.
> 

Have you looked at:
http://cgit.freedesktop.org/spice/spice-gtk/tree/gtk/spicy-screenshot.c

Or: http://cgit.freedesktop.org/spice/spice-gtk/tree/gtk/spicy-stats.c

Bascially you need to setup a SpiceSession with connection details, connect to the "channel-new" signal handler, and call spice_session_connect(session).

In channel_new_cb, you can keep reference on the various channels, and decide which you want to connect to.

Then each channel has various methods or property to interact with it.

Hope that helps


More information about the Spice-devel mailing list