Mercurial > audlegacy
annotate audacious/plugin.h @ 1609:fb2ac7c9e096 trunk
[svn] - comment out some gtk_window_set_transient_for() which hide mainwin unexpectedly.
author | yaz |
---|---|
date | Tue, 29 Aug 2006 23:15:43 -0700 |
parents | c4640c88942d |
children | c2a63f41d8c6 |
rev | line source |
---|---|
0 | 1 /* BMP - Cross-platform multimedia player |
2 * Copyright (C) 2003-2004 BMP development team. | |
3 * | |
4 * Based on XMMS: | |
5 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |
6 * | |
7 * Redistribution and use in source and binary forms, with or without | |
8 * modification, are permitted provided that the following conditions are | |
9 * met: 1. Redistributions of source code must retain the above copyright | |
10 * notice, this list of conditions and the following disclaimer. 2. | |
11 * Redistributions in binary form must reproduce the above copyright notice, | |
12 * this list of conditions and the following disclaimer in the documentation | |
13 * and/or other materials provided with the distribution. | |
14 * | |
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY | |
16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
18 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR | |
19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
22 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 * SUCH DAMAGE. | |
26 */ | |
27 | |
28 /* Please see the BMP Wiki for information about the plugin interface */ | |
29 | |
30 #ifndef BMP_PLUGIN_H | |
31 #define BMP_PLUGIN_H | |
32 | |
33 | |
34 #include <glib.h> | |
1248
6d9c45d157f9
[svn] - this is a hack until I find a better solution
nenolod
parents:
1231
diff
changeset
|
35 #include "audacious/titlestring.h" |
0 | 36 |
37 #define INPUT_PLUGIN(x) ((InputPlugin *)(x)) | |
38 #define OUTPUT_PLUGIN(x) ((OutputPlugin *)(x)) | |
39 #define EFFECT_PLUGIN(x) ((EffectPlugin *)(x)) | |
40 #define GENERAL_PLUGIN(x) ((GeneralPlugin *)(x)) | |
41 #define VIS_PLUGIN(x) ((VisPlugin *)(x)) | |
42 | |
1563 | 43 #define LOWLEVEL_PLUGIN(x) ((LowlevelPlugin *)(x)) |
44 | |
0 | 45 |
46 typedef enum { | |
47 FMT_U8, | |
48 FMT_S8, | |
49 FMT_U16_LE, | |
50 FMT_U16_BE, | |
51 FMT_U16_NE, | |
52 FMT_S16_LE, | |
53 FMT_S16_BE, | |
54 FMT_S16_NE | |
55 } AFormat; | |
56 | |
57 typedef enum { | |
58 INPUT_VIS_ANALYZER, | |
59 INPUT_VIS_SCOPE, | |
60 INPUT_VIS_VU, | |
61 INPUT_VIS_OFF | |
62 } InputVisType; | |
63 | |
64 | |
65 typedef struct _Plugin Plugin; | |
66 typedef struct _InputPlugin InputPlugin; | |
67 typedef struct _OutputPlugin OutputPlugin; | |
68 typedef struct _EffectPlugin EffectPlugin; | |
69 typedef struct _GeneralPlugin GeneralPlugin; | |
70 typedef struct _VisPlugin VisPlugin; | |
71 | |
1563 | 72 typedef struct _LowlevelPlugin LowlevelPlugin; |
73 | |
0 | 74 /* Sadly, this is the most we can generalize out of the disparate |
75 plugin structs usable with typecasts - descender */ | |
76 struct _Plugin { | |
77 gpointer handle; | |
78 gchar *filename; | |
79 }; | |
80 | |
1563 | 81 /* |
82 * LowlevelPlugin is used for lowlevel system services, such as PlaylistContainers, | |
83 * VFSContainers and the like. | |
84 * | |
85 * They are not GUI visible at this time. | |
86 */ | |
87 struct _LowlevelPlugin { | |
88 gpointer handle; | |
89 gchar *filename; | |
90 | |
91 gchar *description; | |
92 | |
93 void (*init) (void); | |
94 void (*cleanup) (void); | |
95 }; | |
96 | |
0 | 97 struct _OutputPlugin { |
98 gpointer handle; | |
99 gchar *filename; | |
100 | |
101 gchar *description; | |
102 | |
103 void (*init) (void); | |
309 | 104 void (*cleanup) (void); |
0 | 105 void (*about) (void); |
106 void (*configure) (void); | |
107 void (*get_volume) (gint * l, gint * r); | |
108 void (*set_volume) (gint l, gint r); | |
109 | |
110 gint (*open_audio) (AFormat fmt, gint rate, gint nch); | |
111 void (*write_audio) (gpointer ptr, gint length); | |
112 void (*close_audio) (void); | |
113 | |
114 void (*flush) (gint time); | |
115 void (*pause) (gshort paused); | |
116 gint (*buffer_free) (void); | |
117 gint (*buffer_playing) (void); | |
118 gint (*output_time) (void); | |
119 gint (*written_time) (void); | |
515
802a8ed87f67
[svn] Add support for tell_audio(), an output plugin accessor which will give us the information the input plugin passed to
nenolod
parents:
309
diff
changeset
|
120 |
516 | 121 void (*tell_audio) (AFormat * fmt, gint * rate, gint * nch); |
0 | 122 }; |
123 | |
124 struct _EffectPlugin { | |
125 gpointer handle; | |
126 gchar *filename; | |
127 | |
128 gchar *description; | |
129 | |
130 void (*init) (void); | |
131 void (*cleanup) (void); | |
132 void (*about) (void); | |
133 void (*configure) (void); | |
134 | |
135 gint (*mod_samples) (gpointer * data, gint length, AFormat fmt, gint srate, gint nch); | |
136 void (*query_format) (AFormat * fmt, gint * rate, gint * nch); | |
137 }; | |
138 | |
139 struct _InputPlugin { | |
140 gpointer handle; | |
141 gchar *filename; | |
142 | |
143 gchar *description; | |
144 | |
145 void (*init) (void); | |
146 void (*about) (void); | |
147 void (*configure) (void); | |
148 | |
149 gint (*is_our_file) (gchar * filename); | |
150 GList *(*scan_dir) (gchar * dirname); | |
151 | |
152 void (*play_file) (gchar * filename); | |
153 void (*stop) (void); | |
154 void (*pause) (gshort paused); | |
155 void (*seek) (gint time); | |
156 | |
157 void (*set_eq) (gint on, gfloat preamp, gfloat * bands); | |
158 | |
159 gint (*get_time) (void); | |
160 | |
161 void (*get_volume) (gint * l, gint * r); | |
162 void (*set_volume) (gint l, gint r); | |
163 | |
164 void (*cleanup) (void); | |
165 | |
166 InputVisType (*get_vis_type) (void); | |
167 void (*add_vis_pcm) (gint time, AFormat fmt, gint nch, gint length, gpointer ptr); | |
168 | |
169 void (*set_info) (gchar * title, gint length, gint rate, gint freq, gint nch); | |
170 void (*set_info_text) (gchar * text); | |
171 void (*get_song_info) (gchar * filename, gchar ** title, gint * length); | |
172 void (*file_info_box) (gchar * filename); | |
173 | |
174 OutputPlugin *output; | |
1231 | 175 |
176 TitleInput *(*get_song_tuple) (gchar * filename); | |
177 void (*set_song_tuple) (TitleInput * tuple); | |
1273
3b990c26fc46
[svn] - Support for the buffer indicator in playpaus.png that was apparently
nhjm449
parents:
1248
diff
changeset
|
178 void (*set_status_buffering) (gboolean status); |
0 | 179 }; |
180 | |
181 struct _GeneralPlugin { | |
182 gpointer handle; | |
183 gchar *filename; | |
184 | |
185 gint xmms_session; | |
186 gchar *description; | |
187 | |
188 void (*init) (void); | |
189 void (*about) (void); | |
190 void (*configure) (void); | |
191 void (*cleanup) (void); | |
192 }; | |
193 | |
194 struct _VisPlugin { | |
195 gpointer handle; | |
196 gchar *filename; | |
197 | |
198 gint xmms_session; | |
199 gchar *description; | |
200 | |
201 gint num_pcm_chs_wanted; | |
202 gint num_freq_chs_wanted; | |
203 | |
204 void (*init) (void); | |
205 void (*cleanup) (void); | |
206 void (*about) (void); | |
207 void (*configure) (void); | |
208 void (*disable_plugin) (struct _VisPlugin *); | |
209 void (*playback_start) (void); | |
210 void (*playback_stop) (void); | |
211 void (*render_pcm) (gint16 pcm_data[2][512]); | |
212 void (*render_freq) (gint16 freq_data[2][256]); | |
213 }; | |
214 | |
215 | |
216 G_BEGIN_DECLS | |
217 | |
218 /* So that input plugins can get the title formatting information */ | |
219 G_CONST_RETURN gchar * xmms_get_gentitle_format(void); | |
220 | |
221 /* So that output plugins can communicate with effect plugins */ | |
222 EffectPlugin *get_current_effect_plugin(void); | |
223 gboolean effects_enabled(void); | |
224 gboolean plugin_set_errortext(const gchar * text); | |
225 | |
226 G_END_DECLS | |
227 | |
228 #endif |