[Spice-devel] [spice-gtk opus support 4/5 (take 2)] Add support for the Opus codec.

Christophe Fergeau cfergeau at redhat.com
Fri Nov 8 08:05:22 PST 2013


Hey, this one is pretty straightforward, just one comment below.

Christophe

On Thu, Oct 31, 2013 at 12:13:49PM -0500, Jeremy White wrote:
> diff --git a/gtk/channel-record.c b/gtk/channel-record.c
> index 67d4a26..5333041 100644
> --- a/gtk/channel-record.c
> +++ b/gtk/channel-record.c
> @@ -90,6 +90,9 @@ static void spice_record_channel_reset_capabilities(SpiceChannel *channel)
>      if (!g_getenv("SPICE_DISABLE_CELT"))
>          if (snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_CELT_0_5_1))
>              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))
> +            spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_RECORD_CAP_OPUS);
>      spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_RECORD_CAP_VOLUME);
>  }
>  
> @@ -305,7 +308,11 @@ static void channel_up(SpiceChannel *channel)
>      SpiceRecordChannelPrivate *rc;
>  
>      rc = SPICE_RECORD_CHANNEL(channel)->priv;
> -    if (!g_getenv("SPICE_DISABLE_CELT") &&
> +    if (!g_getenv("SPICE_DISABLE_OPUS") &&
> +        snd_codec_is_capable(SPICE_AUDIO_DATA_MODE_OPUS) &&
> +        spice_channel_test_capability(channel, SPICE_RECORD_CAP_OPUS)) {
> +        rc->mode = SPICE_AUDIO_DATA_MODE_OPUS;

The remote size will choose to not to use Opus if the frequency is not
48000 or 24000 or ..., this needs to be reflected client side as well for
the record channel as we don't seem to be sending the compression mode in
the recording case (there is a message for that in the playback code).

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20131108/f36873d2/attachment-0001.pgp>


More information about the Spice-devel mailing list