~ubuntu-branches/debian/stretch/moodbar/stretch

« back to all changes in this revision

Viewing changes to plugin/spectrum.c

  • Committer: Bazaar Package Importer
  • Author(s): Bryan Donlan
  • Date: 2007-04-01 14:24:46 UTC
  • Revision ID: james.westby@ubuntu.com-20070401142446-df9567yncfzdkbf1
Tags: upstream-0.1.2
ImportĀ upstreamĀ versionĀ 0.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GStreamer moodbar plugin globals
 
2
 * Copyright (C) 2006 Joseph Rabinoff <bobqwatson@yahoo.com>
 
3
 */
 
4
 
 
5
/***************************************************************************
 
6
 *                                                                         *
 
7
 *   This program is free software; you can redistribute it and/or modify  *
 
8
 *   it under the terms of the GNU General Public License as published by  *
 
9
 *   the Free Software Foundation; either version 2 of the License, or     *
 
10
 *   (at your option) any later version.                                   *
 
11
 *                                                                         *
 
12
 ***************************************************************************/
 
13
 
 
14
#ifdef HAVE_CONFIG_H
 
15
#  include <config.h>
 
16
#endif
 
17
 
 
18
#include <gst/gst.h>
 
19
 
 
20
#include "gstfftwspectrum.h"
 
21
#include "gstfftwunspectrum.h"
 
22
#include "gstspectrumeq.h"
 
23
#include "gstmoodbar.h"
 
24
#include "spectrum.h"
 
25
 
 
26
 
 
27
/***************************************************************/
 
28
/* Plugin managing                                             */
 
29
/***************************************************************/
 
30
 
 
31
GST_DEBUG_CATEGORY_EXTERN (gst_fftwspectrum_debug);
 
32
GST_DEBUG_CATEGORY_EXTERN (gst_fftwunspectrum_debug);
 
33
GST_DEBUG_CATEGORY_EXTERN (gst_spectrumeq_debug);
 
34
GST_DEBUG_CATEGORY_EXTERN (gst_moodbar_debug);
 
35
 
 
36
 
 
37
/* entry point to initialize the plug-in
 
38
 * initialize the plug-in itself
 
39
 * register the element factories and pad templates
 
40
 * register the features
 
41
 *
 
42
 * exchange the string 'plugin' with your elemnt name
 
43
 */
 
44
static gboolean
 
45
plugin_init (GstPlugin * plugin)
 
46
{
 
47
  if (!gst_element_register (plugin, "fftwspectrum",
 
48
                             GST_RANK_NONE, GST_TYPE_FFTWSPECTRUM))
 
49
    return FALSE;
 
50
 
 
51
  if (!gst_element_register (plugin, "fftwunspectrum",
 
52
                             GST_RANK_NONE, GST_TYPE_FFTWUNSPECTRUM))
 
53
    return FALSE;
 
54
  if (!gst_element_register (plugin, "spectrumeq",
 
55
                             GST_RANK_NONE, GST_TYPE_SPECTRUMEQ))
 
56
    return FALSE;
 
57
  if (!gst_element_register (plugin, "moodbar",
 
58
                             GST_RANK_NONE, GST_TYPE_MOODBAR))
 
59
    return FALSE;
 
60
 
 
61
  GST_DEBUG_CATEGORY_INIT (gst_fftwspectrum_debug, "fftwspectrum",
 
62
      0, "FFTW Sample-to-Spectrum Converter Plugin");
 
63
  GST_DEBUG_CATEGORY_INIT (gst_fftwunspectrum_debug, "fftwunspectrum",
 
64
      0, "FFTW Spectrum-to-Sample Converter Plugin");
 
65
  GST_DEBUG_CATEGORY_INIT (gst_spectrumeq_debug, "spectrumeq",
 
66
      0, "Spectrum-space Equalizer");
 
67
  GST_DEBUG_CATEGORY_INIT (gst_moodbar_debug, "moodbar",
 
68
      0, "Moodbar analyzer");
 
69
 
 
70
  return TRUE;
 
71
}
 
72
 
 
73
/* this is the structure that gstreamer looks for to register plugins
 
74
 */
 
75
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
 
76
    GST_VERSION_MINOR,
 
77
    "moodbar",
 
78
    "Frequency analyzer and converter plugin",
 
79
    plugin_init, VERSION, "GPL", "Moodbar", 
 
80
    "http://amarok.kde.org/wiki/Moodbar")