Skip to content
Snippets Groups Projects
Commit 6e9d8cfc authored by Victor Toso's avatar Victor Toso
Browse files

Remove celt support

Follow up of spice-protocol's deprecation of celt mode.
See: spice/spice-protocol!15



Signed-off-by: default avatarVictor Toso <victortoso@redhat.com>
Acked-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 5ccd464d
No related branches found
No related tags found
No related merge requests found
......@@ -123,8 +123,7 @@ endforeach
#
# Non-mandatory/optional dependencies
#
optional_deps = {'celt051' : '>= 0.5.1.1',
'opus' : '>= 0.9.14'}
optional_deps = {'opus' : '>= 0.9.14'}
foreach dep, version : optional_deps
d = dependency(dep, required : get_option(dep), version : version)
if d.found()
......
......@@ -65,10 +65,6 @@ option('sasl',
type : 'feature',
description : 'Use cyrus SASL authentication')
option('celt051',
type : 'feature',
description: 'Enable celt051 audio codec')
option('opus',
type : 'feature',
description: 'Enable Opus audio codec')
......
......@@ -89,9 +89,6 @@ static void channel_set_handlers(SpiceChannelClass *klass);
static void spice_playback_channel_set_capabilities(SpiceChannel *channel)
{
if (!g_getenv("SPICE_DISABLE_CELT"))
if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1, SND_CODEC_ANY_FREQUENCY))
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_PLAYBACK_CAP_CELT_0_5_1);
if (!g_getenv("SPICE_DISABLE_OPUS"))
if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_OPUS, SND_CODEC_ANY_FREQUENCY))
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_PLAYBACK_CAP_OPUS);
......@@ -347,7 +344,6 @@ static void playback_handle_mode(SpiceChannel *channel, SpiceMsgIn *in)
c->mode = mode->mode;
switch (c->mode) {
case SPICE_AUDIO_DATA_MODE_RAW:
case SPICE_AUDIO_DATA_MODE_CELT_0_5_1:
case SPICE_AUDIO_DATA_MODE_OPUS:
break;
default:
......
......@@ -85,9 +85,6 @@ static void channel_set_handlers(SpiceChannelClass *klass);
static void spice_record_channel_set_capabilities(SpiceChannel *channel)
{
if (!g_getenv("SPICE_DISABLE_CELT"))
if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1, SND_CODEC_ANY_FREQUENCY))
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_RECORD_CAP_CELT_0_5_1);
if (!g_getenv("SPICE_DISABLE_OPUS"))
if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_OPUS, SND_CODEC_ANY_FREQUENCY))
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_RECORD_CAP_OPUS);
......@@ -273,10 +270,6 @@ static int spice_record_desired_mode(SpiceChannel *channel, int frequency)
snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_OPUS, frequency) &&
spice_channel_test_capability(channel, SPICE_RECORD_CAP_OPUS)) {
return SPICE_AUDIO_DATA_MODE_OPUS;
} else if (!g_getenv("SPICE_DISABLE_CELT") &&
snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1, frequency) &&
spice_channel_test_capability(channel, SPICE_RECORD_CAP_CELT_0_5_1)) {
return SPICE_AUDIO_DATA_MODE_CELT_0_5_1;
} else {
return SPICE_AUDIO_DATA_MODE_RAW;
}
......
......@@ -2672,12 +2672,14 @@ static void spice_session_set_shared_dir(SpiceSession *session, const gchar *dir
G_GNUC_INTERNAL
const gchar* spice_audio_data_mode_to_string(gint mode)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static const char *str[] = {
[ SPICE_AUDIO_DATA_MODE_INVALID ] = "invalid",
[ SPICE_AUDIO_DATA_MODE_RAW ] = "raw",
[ SPICE_AUDIO_DATA_MODE_CELT_0_5_1 ] = "celt",
[ SPICE_AUDIO_DATA_MODE_OPUS ] = "opus",
};
G_GNUC_END_IGNORE_DEPRECATIONS
return (mode >= 0 && mode < G_N_ELEMENTS(str)) ? str[mode] : "unknown audio codec";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment