Re: [spice-common sound rework 1/3 (take 4)] Add a snd_codec interface to abstract the use of audio codecs such as celt.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 05, 2013 at 04:24:47PM -0600, Jeremy White wrote:
> diff --git a/common/snd_codec.c b/common/snd_codec.c
> new file mode 100644
> index 0000000..2683143
> --- /dev/null
> +++ b/common/snd_codec.c
> @@ -0,0 +1,285 @@
> +/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
> +/*
> +   Copyright (C) 2013 Jeremy White
> +
> +   This library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   This library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with this library; if not, see <http://www.gnu.org/licenses/>.
> +*/
> +
> +/* snd_codec.c
> +     General purpose sound codec routines for use by Spice.
> +   These routines abstract the work of picking a codec and
> +   encoding and decoding the buffers.
> +     Note:  these routines have some peculiarities that come from
> +   wanting to provide full backwards compatibility with the original
> +   Spice celt 0.51 implementation.  It has some hard requirements
> +   (fixed sample size, fixed compressed buffer size).
> +
> +   See below for documentation of the public routines.
> +*/
> +
> +#include <stdio.h>
> +#include <string.h>
> +#include "config.h"
> +#include <spice/macros.h>
> +#include <spice/enums.h>

More of a note for me than anything else (so that I remember to fix before
pushing), but config.h must be included first in the file as it could
#define constants which could change the behaviour of the other #includes.

Christophe

Attachment: pgpJVWkBa43B8.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]