blob: 1f72183d0d81d3e1bd5d073ff0bfa444ba9a5a5e [file] [log] [blame]
Andy Wingod8e18eb2002-03-20 21:45:03 +00001/* GStreamer
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +00002 * 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üller230cf412012-11-04 00:07:18 +000016 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000018 */
19
20
21#ifndef __GST_MIKMOD_H__
22#define __GST_MIKMOD_H__
23
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000024#include <mikmod.h>
25#include <gst/gst.h>
26
27#ifdef __cplusplus
Johan Dahlin5acffea2004-03-15 16:32:54 +000028extern "C" {
29#endif /* __cplusplus */
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000030
31
32#define GST_TYPE_MIKMOD \
33 (gst_mikmod_get_type())
Johan Dahlin5acffea2004-03-15 16:32:54 +000034
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000035#define GST_MIKMOD(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIKMOD,GstMikMod))
37#define GST_MIKMOD_CLASS(klass) \
Stefan Kostbdb14e62006-04-08 19:06:25 +000038 (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 Stichele6dfbea52001-12-23 16:13:33 +000041#define GST_IS_MIKMOD(obj) \
42 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MIKMOD))
Stefan Kostbdb14e62006-04-08 19:06:25 +000043#define GST_IS_MIKMOD_CLASS(klass) \
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000044 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MIKMOD))
Johan Dahlin5acffea2004-03-15 16:32:54 +000045
46struct _GstMikMod {
47 GstElement element;
48 GstPad *sinkpad, *srcpad;
49 GstBuffer *Buffer;
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000050
Johan Dahlin5acffea2004-03-15 16:32:54 +000051 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 Otte3faf623b2004-03-09 21:09:11 +000068
Johan Dahlin5acffea2004-03-15 16:32:54 +000069 gboolean initialized;
70};
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000071
Johan Dahlin5acffea2004-03-15 16:32:54 +000072struct _GstMikModClass {
73 GstElementClass parent_class;
74};
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000075
Johan Dahlin5acffea2004-03-15 16:32:54 +000076typedef struct _GstMikMod GstMikMod;
77typedef struct _GstMikModClass GstMikModClass;
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000078
Johan Dahlin5acffea2004-03-15 16:32:54 +000079extern MODULE *module;
80extern MREADER *reader;
81extern GstPad *srcpad;
82extern GstClockTime timestamp;
83extern int need_sync;
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000084
Johan Dahlin5acffea2004-03-15 16:32:54 +000085GType gst_mikmod_get_type(void);
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000086
Andy Wingod6258152002-03-19 04:10:05 +000087/* symbols for mikmod_reader.h */
Johan Dahlin5acffea2004-03-15 16:32:54 +000088struct _GST_READER
89{
90 MREADER core;
91 GstMikMod *mik;
92 guint64 offset;
93 gshort eof;
94};
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000095
96
Johan Dahlin5acffea2004-03-15 16:32:54 +000097typedef struct _GST_READER GST_READER;
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +000098
99
Johan Dahlin5acffea2004-03-15 16:32:54 +0000100MREADER *GST_READER_new( GstMikMod *mik );
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +0000101
Andy Wingod6258152002-03-19 04:10:05 +0000102/* symbols for drv_gst.c */
Johan Dahlin5acffea2004-03-15 16:32:54 +0000103extern MDRIVER drv_gst;
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +0000104
105#ifdef __cplusplus
106}
Johan Dahlin5acffea2004-03-15 16:32:54 +0000107#endif /* __cplusplus */
Thomas Vander Stichele6dfbea52001-12-23 16:13:33 +0000108
Johan Dahlin5acffea2004-03-15 16:32:54 +0000109#endif /* __GST_MIKMOD_H__ */