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

« back to all changes in this revision

Viewing changes to plugin/gstfftwunspectrum.h

  • 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 FFTW-based spectrum-to-signal converter
 
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
 
 
15
#ifndef __GST_FFTWUNSPECTRUM_H__
 
16
#define __GST_FFTWUNSPECTRUM_H__
 
17
 
 
18
#include <gst/gst.h>
 
19
#include <fftw3.h>
 
20
 
 
21
G_BEGIN_DECLS
 
22
 
 
23
/* #defines don't like whitespacey bits */
 
24
#define GST_TYPE_FFTWUNSPECTRUM \
 
25
  (gst_fftwunspectrum_get_type())
 
26
#define GST_FFTWUNSPECTRUM(obj) \
 
27
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFTWUNSPECTRUM,GstFFTWUnSpectrum))
 
28
#define GST_FFTWUNSPECTRUM_CLASS(klass) \
 
29
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFTWUNSPECTRUM,GstFFTWUnSpectrumClass))
 
30
 
 
31
typedef struct _GstFFTWUnSpectrum      GstFFTWUnSpectrum;
 
32
typedef struct _GstFFTWUnSpectrumClass GstFFTWUnSpectrumClass;
 
33
 
 
34
struct _GstFFTWUnSpectrum
 
35
{
 
36
  GstElement element;
 
37
 
 
38
  GstPad *sinkpad, *srcpad;
 
39
 
 
40
  /* Stream data */
 
41
  gint rate, size, step;
 
42
 
 
43
  /* This is used to store samples for which there is overlapping 
 
44
   * spectrum data (when size > step) */
 
45
  gfloat *extra_samples;
 
46
 
 
47
  /* State data for fftw */
 
48
  float      *fftw_in;
 
49
  float      *fftw_out;
 
50
  fftwf_plan  fftw_plan;
 
51
 
 
52
  /* Property */
 
53
  gboolean hi_q;
 
54
};
 
55
 
 
56
struct _GstFFTWUnSpectrumClass 
 
57
{
 
58
  GstElementClass parent_class;
 
59
};
 
60
 
 
61
GType gst_fftwunspectrum_get_type (void);
 
62
 
 
63
G_END_DECLS
 
64
 
 
65
#endif /* __GST_FFTWUNSPECTRUM_H__ */