![]() |
![]() |
![]() |
Spice-GTK Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#include <channel-record.h> SpiceRecordChannel; SpiceRecordChannelClass; void spice_record_send_data (SpiceRecordChannel *channel
,gpointer data
,gsize bytes
,uint32_t time
);
SpiceRecordChannel class handles an audio recording stream. The audio stream should start when "record-start" is emitted and should be stopped when "record-stop" is received.
The audio is sent to the guest by calling spice_record_send_data()
with the recorded PCM data.
Note: You may be interested to let the SpiceAudio class play and record audio channels for your application.
typedef struct { SpiceChannelClass parent_class; /* signals */ void (*record_start)(SpiceRecordChannel *channel, gint format, gint channels, gint freq); void (*record_data)(SpiceRecordChannel *channel, gpointer *data, gint size); void (*record_stop)(SpiceRecordChannel *channel); } SpiceRecordChannelClass;
void spice_record_send_data (SpiceRecordChannel *channel
,gpointer data
,gsize bytes
,uint32_t time
);
Send recorded PCM data to the guest.
|
PCM data |
|
size of data
|
|
stream timestamp |
"record-start"
signalvoid user_function (SpiceRecordChannel *channel, gint format, gint channels, gint rate, gpointer user_data) : Run First
Notify when the recording should start, and provide audio format characteristics.
|
the SpiceRecordChannel that emitted the signal |
|
a SPICE_AUDIO_FMT |
|
number of channels |
|
audio rate |
|
user data set when the signal handler was connected. |
"record-stop"
signalvoid user_function (SpiceRecordChannel *channel, gpointer user_data) : Run First
Notify when the recording should stop.
|
the SpiceRecordChannel that emitted the signal |
|
user data set when the signal handler was connected. |