chansrv: use rdpsnd record if supported, else try AUDIO_INPUT(MS-RDPEAI)
This commit is contained in:
parent
c5798df0bd
commit
8aedd31762
@ -241,6 +241,8 @@ static struct xr_wave_format_ex *g_wave_inp_formats[] =
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int g_rdpsnd_can_rec = 0;
|
||||||
|
|
||||||
static int g_client_input_format_index = 0;
|
static int g_client_input_format_index = 0;
|
||||||
static int g_server_input_format_index = 0;
|
static int g_server_input_format_index = 0;
|
||||||
|
|
||||||
@ -1561,6 +1563,7 @@ sound_process_input_formats(struct stream *s, int size)
|
|||||||
|
|
||||||
LOG(10, ("sound_process_input_formats: size=%d", size));
|
LOG(10, ("sound_process_input_formats: size=%d", size));
|
||||||
|
|
||||||
|
g_rdpsnd_can_rec = 1;
|
||||||
in_uint8s(s, 8); /* skip 8 bytes */
|
in_uint8s(s, 8); /* skip 8 bytes */
|
||||||
in_uint16_le(s, num_formats);
|
in_uint16_le(s, num_formats);
|
||||||
in_uint8s(s, 2); /* skip version */
|
in_uint8s(s, 2); /* skip version */
|
||||||
@ -1773,13 +1776,25 @@ sound_sndsrvr_source_data_in(struct trans *trans)
|
|||||||
}
|
}
|
||||||
else if (cmd == PA_CMD_START_REC)
|
else if (cmd == PA_CMD_START_REC)
|
||||||
{
|
{
|
||||||
//sound_input_start_recording();
|
if (g_rdpsnd_can_rec)
|
||||||
audin_start();
|
{
|
||||||
|
sound_input_start_recording();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
audin_start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (cmd == PA_CMD_STOP_REC)
|
else if (cmd == PA_CMD_STOP_REC)
|
||||||
{
|
{
|
||||||
//sound_input_stop_recording();
|
if (g_rdpsnd_can_rec)
|
||||||
audin_stop();
|
{
|
||||||
|
sound_input_stop_recording();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
audin_stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xstream_free(s);
|
xstream_free(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user