gstladspa.h 2.12 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/* GStreamer
 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
 *
 * gstladspa.h: Header for LADSPA plugin
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */


#ifndef __GST_LADSPA_H__
#define __GST_LADSPA_H__


#include <gst/gst.h>
28
#include <gst/bytestream/bytestream.h>
29 30 31 32 33

#include "ladspa.h"


#ifdef __cplusplus
Johan Dahlin's avatar
Johan Dahlin committed
34 35
extern "C" {
#endif /* __cplusplus */
36

Johan Dahlin's avatar
Johan Dahlin committed
37 38 39 40 41 42 43 44
typedef struct _ladspa_control_info {
  gchar *name;
  gchar *param_name;
  gfloat lowerbound, upperbound;
  gfloat def;
  gboolean lower,upper,samplerate;
  gboolean toggled, logarithmic, integer, writable;
} ladspa_control_info;
45

Johan Dahlin's avatar
Johan Dahlin committed
46 47
typedef struct _GstLADSPA GstLADSPA;
typedef struct _GstLADSPAClass GstLADSPAClass;
48

Johan Dahlin's avatar
Johan Dahlin committed
49 50
struct _GstLADSPA {
  GstElement element;
51

Johan Dahlin's avatar
Johan Dahlin committed
52 53
  LADSPA_Descriptor *descriptor;
  LADSPA_Handle *handle;
54

Johan Dahlin's avatar
Johan Dahlin committed
55
  GstDParamManager *dpman;
56

Johan Dahlin's avatar
Johan Dahlin committed
57 58 59 60
  gfloat *controls;
  
  GstPad **sinkpads, 
         **srcpads;
61

62 63 64 65 66
  LADSPA_Data **data_in;
  LADSPA_Data **data_out;
  GstBuffer    **buffers_in;
  GstBuffer    **buffers_out;
  
Johan Dahlin's avatar
Johan Dahlin committed
67
  gboolean activated;
68

Johan Dahlin's avatar
Johan Dahlin committed
69
  gint samplerate, buffer_frames;
70
  GstClockTime timestamp;
Johan Dahlin's avatar
Johan Dahlin committed
71 72
  gboolean inplace_broken;
};
73

Johan Dahlin's avatar
Johan Dahlin committed
74 75
struct _GstLADSPAClass {
  GstElementClass parent_class;
76

Johan Dahlin's avatar
Johan Dahlin committed
77
  LADSPA_Descriptor *descriptor;
78

Johan Dahlin's avatar
Johan Dahlin committed
79 80 81 82
  gint numports,
       numsinkpads, 
       numsrcpads, 
       numcontrols;
83

Johan Dahlin's avatar
Johan Dahlin committed
84 85 86
  gint *sinkpad_portnums, 
       *srcpad_portnums, 
       *control_portnums;
87

Johan Dahlin's avatar
Johan Dahlin committed
88 89
  ladspa_control_info *control_info;
};
90 91 92 93


#ifdef __cplusplus
}
Johan Dahlin's avatar
Johan Dahlin committed
94
#endif /* __cplusplus */
95 96


Johan Dahlin's avatar
Johan Dahlin committed
97
#endif /* __GST_LADSPA_H__ */