gstmikmod.h 2.52 KB
Newer Older
Andy Wingo's avatar
Andy Wingo committed
1
/* GStreamer
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15
 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
 *
 * 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
Tim-Philipp Müller's avatar
Tim-Philipp Müller committed
16 17
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
18 19 20 21 22 23 24 25 26 27
 */


#ifndef __GST_MIKMOD_H__
#define __GST_MIKMOD_H__

#include <mikmod.h>
#include <gst/gst.h>

#ifdef __cplusplus
Johan Dahlin's avatar
Johan Dahlin committed
28 29
extern "C" {
#endif /* __cplusplus */
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
30 31 32 33


#define GST_TYPE_MIKMOD \
  (gst_mikmod_get_type())
Johan Dahlin's avatar
Johan Dahlin committed
34
  
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
35 36 37
#define GST_MIKMOD(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIKMOD,GstMikMod))
#define GST_MIKMOD_CLASS(klass) \
Stefan Kost's avatar
Stefan Kost committed
38 39 40
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MIKMOD,GstMikModClass))
#define GST_MIKMOD_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_MIKMOD,GstMikModClass))
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
41 42
#define GST_IS_MIKMOD(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MIKMOD))
Stefan Kost's avatar
Stefan Kost committed
43
#define GST_IS_MIKMOD_CLASS(klass) \
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
44
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MIKMOD))
Johan Dahlin's avatar
Johan Dahlin committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
  
struct _GstMikMod {
  GstElement element;
  GstPad *sinkpad, *srcpad;
  GstBuffer *Buffer;

  gchar *songname;
  gchar *modtype;
  gint musicvolume;
  gint pansep;
  gint reverb;
  gint sndfxvolume;
  gint volume;
  gint mixfreq;
  gint mode;
  gboolean interp;
  gboolean reverse;
  gboolean surround;
  gboolean _16bit;
  gboolean hqmixer;
  gboolean soft_music;
  gboolean soft_sndfx;
  gboolean stereo;

  gboolean initialized;
};

struct _GstMikModClass {
  GstElementClass parent_class;
};

typedef struct _GstMikMod GstMikMod;
typedef struct _GstMikModClass GstMikModClass;

extern MODULE *module;
extern MREADER *reader;
extern GstPad *srcpad;
extern GstClockTime timestamp;
extern int need_sync;

GType gst_mikmod_get_type(void);
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
86

87
/* symbols for mikmod_reader.h */
Johan Dahlin's avatar
Johan Dahlin committed
88 89 90 91 92 93 94
struct _GST_READER
{
  MREADER core;
  GstMikMod *mik;
  guint64 offset;
  gshort  eof;
};
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
95 96


Johan Dahlin's avatar
Johan Dahlin committed
97
typedef struct _GST_READER GST_READER;
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
98 99


Johan Dahlin's avatar
Johan Dahlin committed
100
MREADER *GST_READER_new( GstMikMod *mik );
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
101

102
/* symbols for drv_gst.c */
Johan Dahlin's avatar
Johan Dahlin committed
103
extern MDRIVER drv_gst;
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
104 105 106

#ifdef __cplusplus
}
Johan Dahlin's avatar
Johan Dahlin committed
107
#endif /* __cplusplus */
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
108

Johan Dahlin's avatar
Johan Dahlin committed
109
#endif /* __GST_MIKMOD_H__ */