Andy Wingo | d8e18eb | 2002-03-20 21:45:03 +0000 | [diff] [blame] | 1 | /* GStreamer |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 2 | * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Library General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Library General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Library General Public |
| 15 | * License along with this library; if not, write to the |
Tim-Philipp Müller | 230cf41 | 2012-11-04 00:07:18 +0000 | [diff] [blame] | 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 17 | * Boston, MA 02110-1301, USA. |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | |
| 21 | #ifndef __GST_MIKMOD_H__ |
| 22 | #define __GST_MIKMOD_H__ |
| 23 | |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 24 | #include <mikmod.h> |
| 25 | #include <gst/gst.h> |
| 26 | |
| 27 | #ifdef __cplusplus |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 28 | extern "C" { |
| 29 | #endif /* __cplusplus */ |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 30 | |
| 31 | |
| 32 | #define GST_TYPE_MIKMOD \ |
| 33 | (gst_mikmod_get_type()) |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 34 | |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 35 | #define GST_MIKMOD(obj) \ |
| 36 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIKMOD,GstMikMod)) |
| 37 | #define GST_MIKMOD_CLASS(klass) \ |
Stefan Kost | bdb14e6 | 2006-04-08 19:06:25 +0000 | [diff] [blame] | 38 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MIKMOD,GstMikModClass)) |
| 39 | #define GST_MIKMOD_GET_CLASS(obj) \ |
| 40 | (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_MIKMOD,GstMikModClass)) |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 41 | #define GST_IS_MIKMOD(obj) \ |
| 42 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MIKMOD)) |
Stefan Kost | bdb14e6 | 2006-04-08 19:06:25 +0000 | [diff] [blame] | 43 | #define GST_IS_MIKMOD_CLASS(klass) \ |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 44 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MIKMOD)) |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 45 | |
| 46 | struct _GstMikMod { |
| 47 | GstElement element; |
| 48 | GstPad *sinkpad, *srcpad; |
| 49 | GstBuffer *Buffer; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 50 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 51 | gchar *songname; |
| 52 | gchar *modtype; |
| 53 | gint musicvolume; |
| 54 | gint pansep; |
| 55 | gint reverb; |
| 56 | gint sndfxvolume; |
| 57 | gint volume; |
| 58 | gint mixfreq; |
| 59 | gint mode; |
| 60 | gboolean interp; |
| 61 | gboolean reverse; |
| 62 | gboolean surround; |
| 63 | gboolean _16bit; |
| 64 | gboolean hqmixer; |
| 65 | gboolean soft_music; |
| 66 | gboolean soft_sndfx; |
| 67 | gboolean stereo; |
Benjamin Otte | 3faf623b | 2004-03-09 21:09:11 +0000 | [diff] [blame] | 68 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 69 | gboolean initialized; |
| 70 | }; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 71 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 72 | struct _GstMikModClass { |
| 73 | GstElementClass parent_class; |
| 74 | }; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 75 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 76 | typedef struct _GstMikMod GstMikMod; |
| 77 | typedef struct _GstMikModClass GstMikModClass; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 78 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 79 | extern MODULE *module; |
| 80 | extern MREADER *reader; |
| 81 | extern GstPad *srcpad; |
| 82 | extern GstClockTime timestamp; |
| 83 | extern int need_sync; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 84 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 85 | GType gst_mikmod_get_type(void); |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 86 | |
Andy Wingo | d625815 | 2002-03-19 04:10:05 +0000 | [diff] [blame] | 87 | /* symbols for mikmod_reader.h */ |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 88 | struct _GST_READER |
| 89 | { |
| 90 | MREADER core; |
| 91 | GstMikMod *mik; |
| 92 | guint64 offset; |
| 93 | gshort eof; |
| 94 | }; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 95 | |
| 96 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 97 | typedef struct _GST_READER GST_READER; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 98 | |
| 99 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 100 | MREADER *GST_READER_new( GstMikMod *mik ); |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 101 | |
Andy Wingo | d625815 | 2002-03-19 04:10:05 +0000 | [diff] [blame] | 102 | /* symbols for drv_gst.c */ |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 103 | extern MDRIVER drv_gst; |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 104 | |
| 105 | #ifdef __cplusplus |
| 106 | } |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 107 | #endif /* __cplusplus */ |
Thomas Vander Stichele | 6dfbea5 | 2001-12-23 16:13:33 +0000 | [diff] [blame] | 108 | |
Johan Dahlin | 5acffea | 2004-03-15 16:32:54 +0000 | [diff] [blame] | 109 | #endif /* __GST_MIKMOD_H__ */ |