[Spice-devel] RFC on sound codec refactoring

Jeremy White jwhite at codeweavers.com
Fri Oct 4 19:37:49 CEST 2013


Attached (sorry :-/) are two patches that express my current plan for
supporting Opus (and other codecs as well).

Essentially, I abstract out the celt functionality into a spice-common
shared library; snd_codec.c.  I then implement the server and client
using that logic.

The patches attached seem to Work For Me [1].  The goal was to use the
new abstraction without changing functionality.  They do have the side
effect of making celt optional, which will make the Debian guys happy.

I know of two flaws, currently.

First, the computation of the frame size is unsatisfying.  Opus is going
to require a different frequency, hence a different frame size.  I've
started abstracting it, but I want to dig more into Opus before I
finalize an approach.

Second, the current client does not record correctly in celt mode.  I
get a stuttered recording when I use that.  The gtk code works fine.  In
my testing, this is true both with and without this patch set.  But it's
still an unsatisfying result :-/.

I would appreciate comments and feedback, particularly if there is
anything that seems obviously wrong to others.

If this approach seems viable, I'll work on adding Opus support, and
then also revise the gtk implementation to use the new code.

Cheers,

Jeremy

[1]  I tested using qemu + fedora18, recording a sample and playing it
back; both with compression and without.  I have not yet tested a
windows vm; that's on my todo list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-snd_codec-interface-to-abstract-the-use-of-aud.patch
Type: text/x-patch
Size: 13412 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20131004/cd17cf24/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Revise-the-spice-server-to-use-the-new-snd_codec-fun.patch
Type: text/x-patch
Size: 30504 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20131004/cd17cf24/attachment-0003.bin>


More information about the Spice-devel mailing list