Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 1 | /* |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 2 | * gstfluiddec - fluiddec plugin for gstreamer |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 3 | * |
| 4 | * Copyright 2007 Wouter Paesen <wouter@blue-gate.be> |
| 5 | * Copyright 2013 Wim Taymans <wim.taymans@gmail.be> |
| 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Library General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This library is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * Library General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Library General Public |
| 18 | * License along with this library; if not, write to the |
| 19 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 20 | * Boston, MA 02110-1301, USA. |
| 21 | */ |
| 22 | |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 23 | #ifndef __GST_FLUID_DEC_H__ |
| 24 | #define __GST_FLUID_DEC_H__ |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 25 | |
| 26 | #include <gst/gst.h> |
| 27 | #include <gst/base/gstadapter.h> |
| 28 | #include <fluidsynth.h> |
| 29 | |
| 30 | G_BEGIN_DECLS |
| 31 | |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 32 | #define GST_TYPE_FLUID_DEC \ |
| 33 | (gst_fluid_dec_get_type()) |
| 34 | #define GST_FLUID_DEC(obj) \ |
| 35 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLUID_DEC,GstFluidDec)) |
| 36 | #define GST_FLUID_DEC_CLASS(klass) \ |
| 37 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLUID_DEC,GstFluidDecClass)) |
| 38 | #define GST_IS_FLUID_DEC(obj) \ |
| 39 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLUID_DEC)) |
| 40 | #define GST_IS_FLUID_DEC_CLASS(klass) \ |
| 41 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLUID_DEC)) |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 42 | |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 43 | typedef struct _GstFluidDec GstFluidDec; |
| 44 | typedef struct _GstFluidDecClass GstFluidDecClass; |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 45 | |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 46 | struct _GstFluidDec |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 47 | { |
| 48 | GstElement element; |
| 49 | |
| 50 | GstPad *sinkpad, *srcpad; |
Wim Taymans | d09a720 | 2013-03-22 11:04:10 +0100 | [diff] [blame] | 51 | |
| 52 | /* properties */ |
| 53 | gchar *soundfont; |
| 54 | gboolean synth_chorus; |
| 55 | gboolean synth_reverb; |
| 56 | gdouble synth_gain; |
| 57 | gint synth_polyphony; |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 58 | |
| 59 | fluid_settings_t* settings; |
| 60 | fluid_synth_t* synth; |
Wim Taymans | d09a720 | 2013-03-22 11:04:10 +0100 | [diff] [blame] | 61 | int sf; |
| 62 | |
| 63 | GstSegment segment; |
Wim Taymans | f5230ab | 2013-03-22 13:48:03 +0100 | [diff] [blame] | 64 | gboolean discont; |
Wim Taymans | d09a720 | 2013-03-22 11:04:10 +0100 | [diff] [blame] | 65 | GstClockTime last_pts; |
| 66 | guint64 last_sample; |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 67 | }; |
| 68 | |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 69 | struct _GstFluidDecClass |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 70 | { |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 71 | GstElementClass parent_class; |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 72 | }; |
| 73 | |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 74 | GType gst_fluid_dec_get_type (void); |
Wim Taymans | 73824e0 | 2013-03-21 07:05:54 +0100 | [diff] [blame] | 75 | |
| 76 | G_END_DECLS |
| 77 | |
Wim Taymans | c2966fc | 2013-03-22 15:19:32 +0100 | [diff] [blame] | 78 | #endif /* __GST_FLUID_DEC_H__ */ |