~ubuntu-branches/ubuntu/lucid/psimedia/lucid-proposed

« back to all changes in this revision

Viewing changes to gstprovider/gstelements/speexdsp/speexdspplugin.c

  • Committer: Bazaar Package Importer
  • Author(s): Ivan Borzenkov
  • Date: 2009-07-18 16:51:30 UTC
  • Revision ID: james.westby@ubuntu.com-20090718165130-7aetrkp6zivus4lk
Tags: upstream-1.0.3
ImportĀ upstreamĀ versionĀ 1.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Farsight Voice+Video library
 
3
 *
 
4
 *  Copyright 2008 Collabora Ltd
 
5
 *  Copyright 2008 Nokia Corporation
 
6
 *   @author: Olivier Crete <olivier.crete@collabora.co.uk>
 
7
 *  Copyright 2009 Barracuda Networks, Inc
 
8
 *   @author: Justin Karneges <justin@affinix.com>
 
9
 *
 
10
 * This library is free software; you can redistribute it and/or
 
11
 * modify it under the terms of the GNU Lesser General Public
 
12
 * License as published by the Free Software Foundation; either
 
13
 * version 2.1 of the License, or (at your option) any later version.
 
14
 *
 
15
 * This library is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
18
 * Lesser General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU Lesser General Public
 
21
 * License along with this library; if not, write to the Free Software
 
22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 
23
 *
 
24
 */
 
25
 
 
26
#ifdef HAVE_CONFIG_H
 
27
#include "config.h"
 
28
#endif
 
29
 
 
30
#include <string.h>
 
31
#include <gst/audio/audio.h>
 
32
#include "speexdsp.h"
 
33
#include "speexechoprobe.h"
 
34
 
 
35
/* dsp/probe use these to discover each other */
 
36
GStaticMutex global_mutex = G_STATIC_MUTEX_INIT;
 
37
GstSpeexDSP * global_dsp = NULL;
 
38
GstSpeexEchoProbe * global_probe = NULL;
 
39
 
 
40
static gboolean
 
41
plugin_init (GstPlugin * plugin)
 
42
{
 
43
  if (!gst_element_register (plugin, "speexdsp", GST_RANK_NONE,
 
44
          GST_TYPE_SPEEX_DSP)) {
 
45
    return FALSE;
 
46
  }
 
47
  if (!gst_element_register (plugin, "speexechoprobe", GST_RANK_NONE,
 
48
          GST_TYPE_SPEEX_ECHO_PROBE)) {
 
49
    return FALSE;
 
50
  }
 
51
 
 
52
  return TRUE;
 
53
}
 
54
 
 
55
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
 
56
    GST_VERSION_MINOR,
 
57
    "speexdsp",
 
58
    "Voice preprocessing using libspeex",
 
59
    plugin_init, VERSION, "LGPL", "Farsight", "http://farsight.sf.net")