annotate src/audacious/plugin.h @ 2883:4117f05f7054 trunk

branch merge
author William Pitcock <nenolod@atheme.org>
date Sun, 24 Jun 2007 05:31:48 -0500
parents b2fb6a4e02b8
children 9976e065e2f5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 /* Audacious
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2 * Copyright (C) 2005-2007 Audacious team.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 * BMP - Cross-platform multimedia player
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5 * Copyright (C) 2003-2004 BMP development team.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 * Based on XMMS:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 * Redistribution and use in source and binary forms, with or without
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 * modification, are permitted provided that the following conditions are
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 * met:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 * 1. Redistributions of source code must retain the above copyright
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15 * notice, this list of conditions and the following disclaimer.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 * notice, this list of conditions and the following disclaimer in
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19 * the documentation and/or other materials provided with the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20 * distribution.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32 * SUCH DAMAGE.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 #ifndef BMP_PLUGIN_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
36 #define BMP_PLUGIN_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 #include <glib.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 #include "audacious/vfs.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40 #include "audacious/titlestring.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
41
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2796
diff changeset
42 #define PLUGIN(x) ((Plugin *)(x))
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
43 #define INPUT_PLUGIN(x) ((InputPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
44 #define OUTPUT_PLUGIN(x) ((OutputPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
45 #define EFFECT_PLUGIN(x) ((EffectPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
46 #define GENERAL_PLUGIN(x) ((GeneralPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
47 #define VIS_PLUGIN(x) ((VisPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
48
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
49 #define LOWLEVEL_PLUGIN(x) ((LowlevelPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
51 #define __AUDACIOUS_NEWVFS__
2794
2685fc11cd9a [svn] - begin work on the host side of plugin API v2.
nenolod
parents: 2763
diff changeset
52 #define __AUDACIOUS_PLUGIN_API__ 2
2685fc11cd9a [svn] - begin work on the host side of plugin API v2.
nenolod
parents: 2763
diff changeset
53 #define __AUDACIOUS_INPUT_PLUGIN_API__ 3
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
54
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
55 typedef enum {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
56 FMT_U8,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
57 FMT_S8,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
58 FMT_U16_LE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
59 FMT_U16_BE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
60 FMT_U16_NE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61 FMT_S16_LE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62 FMT_S16_BE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63 FMT_S16_NE
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
64 } AFormat;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 typedef enum {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67 INPUT_VIS_ANALYZER,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
68 INPUT_VIS_SCOPE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69 INPUT_VIS_VU,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
70 INPUT_VIS_OFF
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
71 } InputVisType;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
72
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
73
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
74 typedef struct _Plugin Plugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
75 typedef struct _InputPlugin InputPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
76 typedef struct _OutputPlugin OutputPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
77 typedef struct _EffectPlugin EffectPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
78 typedef struct _GeneralPlugin GeneralPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
79 typedef struct _VisPlugin VisPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
80
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
81 typedef struct _LowlevelPlugin LowlevelPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
82
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
83 typedef struct _InputPlayback InputPlayback;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
84
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
85 /*
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
86 * The v2 Module header.
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
87 *
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
88 * _list fields contain a null-terminated list of "plugins" to register.
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
89 * A single library can provide multiple plugins.
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
90 * --nenolod
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
91 */
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
92 typedef struct {
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
93 gint magic;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
94 gint api_version;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
95 gchar *name;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
96 GCallback init;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
97 GCallback fini;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
98 Plugin *priv_assoc;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
99 InputPlugin **ip_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
100 OutputPlugin **op_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
101 EffectPlugin **ep_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
102 GeneralPlugin **gp_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
103 VisPlugin **vp_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
104 } PluginHeader;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
105
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
106 #define PLUGIN_MAGIC 0x8EAC8DE2
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
107
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
108 #define DECLARE_PLUGIN(name, init, fini, ip_list, op_list, ep_list, gp_list, vp_list) \
2802
c799098c396f [svn] - guard v2 module header with G_BEGIN_DECLS and G_END_DECLS
nenolod
parents: 2797
diff changeset
109 G_BEGIN_DECLS \
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
110 static PluginHeader _pluginInfo = { PLUGIN_MAGIC, __AUDACIOUS_PLUGIN_API__, \
2841
b2fb6a4e02b8 add a cast to DECLARE_PLUGIN() to suppress warnings.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2802
diff changeset
111 (gchar *)#name, init, fini, NULL, ip_list, op_list, ep_list, gp_list, \
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
112 vp_list }; \
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
113 PluginHeader *get_plugin_info(void) { \
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
114 return &_pluginInfo; \
2802
c799098c396f [svn] - guard v2 module header with G_BEGIN_DECLS and G_END_DECLS
nenolod
parents: 2797
diff changeset
115 } \
c799098c396f [svn] - guard v2 module header with G_BEGIN_DECLS and G_END_DECLS
nenolod
parents: 2797
diff changeset
116 G_END_DECLS
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
117
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
118 /* Sadly, this is the most we can generalize out of the disparate
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
119 plugin structs usable with typecasts - descender */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
120 struct _Plugin {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
121 gpointer handle;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
122 gchar *filename;
2794
2685fc11cd9a [svn] - begin work on the host side of plugin API v2.
nenolod
parents: 2763
diff changeset
123 gchar *description;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
124 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
125
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
126 /*
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
127 * LowlevelPlugin is used for lowlevel system services, such as PlaylistContainers,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
128 * VFSContainers and the like.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
129 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
130 * They are not GUI visible at this time.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
131 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
132 struct _LowlevelPlugin {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
133 gpointer handle;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
134 gchar *filename;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
135
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
136 gchar *description;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
137
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
138 void (*init) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
139 void (*cleanup) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
140 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
141
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
142 struct _OutputPlugin {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
143 gpointer handle;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
144 gchar *filename;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
145
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
146 gchar *description;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
147
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
148 void (*init) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
149 void (*cleanup) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
150 void (*about) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
151 void (*configure) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
152 void (*get_volume) (gint * l, gint * r);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
153 void (*set_volume) (gint l, gint r);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
154
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
155 gint (*open_audio) (AFormat fmt, gint rate, gint nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
156 void (*write_audio) (gpointer ptr, gint length);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
157 void (*close_audio) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
158
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
159 void (*flush) (gint time);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
160 void (*pause) (gshort paused);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
161 gint (*buffer_free) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
162 gint (*buffer_playing) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
163 gint (*output_time) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
164 gint (*written_time) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
165
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
166 void (*tell_audio) (AFormat * fmt, gint * rate, gint * nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
167 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
168
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
169 struct _EffectPlugin {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
170 gpointer handle;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
171 gchar *filename;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
172
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
173 gchar *description;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
174
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
175 void (*init) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
176 void (*cleanup) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
177 void (*about) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
178 void (*configure) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
179
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
180 gint (*mod_samples) (gpointer * data, gint length, AFormat fmt, gint srate, gint nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
181 void (*query_format) (AFormat * fmt, gint * rate, gint * nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
182 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
183
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
184 struct _InputPlayback {
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
185 gchar *filename;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
186 InputPlugin *plugin;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
187 void *data;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
188 OutputPlugin *output;
2438
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
189
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
190 int playing;
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
191 gboolean error;
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
192 gboolean eof;
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
193 };
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
194
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
195 struct _InputPlugin {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
196 gpointer handle;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
197 gchar *filename;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
198
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
199 gchar *description;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
200
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
201 void (*init) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
202 void (*about) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
203 void (*configure) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
204
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
205 gint (*is_our_file) (gchar * filename);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
206 GList *(*scan_dir) (gchar * dirname);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
207
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
208 void (*play_file) (InputPlayback * playback);
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
209 void (*stop) (InputPlayback * playback);
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
210 void (*pause) (InputPlayback * playback, gshort paused);
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
211 void (*seek) (InputPlayback * playback, gint time);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
212
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
213 void (*set_eq) (gint on, gfloat preamp, gfloat * bands);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
214
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
215 gint (*get_time) (InputPlayback * playback);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
216
2437
62d8f9c05832 [svn] More input plugin API work
iabervon
parents: 2436
diff changeset
217 gint (*get_volume) (gint * l, gint * r);
62d8f9c05832 [svn] More input plugin API work
iabervon
parents: 2436
diff changeset
218 gint (*set_volume) (gint l, gint r);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
219
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
220 void (*cleanup) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
221
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
222 InputVisType (*get_vis_type) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
223 void (*add_vis_pcm) (gint time, AFormat fmt, gint nch, gint length, gpointer ptr);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
224
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
225 void (*set_info) (gchar * title, gint length, gint rate, gint freq, gint nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
226 void (*set_info_text) (gchar * text);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
227 void (*get_song_info) (gchar * filename, gchar ** title, gint * length);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
228 void (*file_info_box) (gchar * filename);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
229
2437
62d8f9c05832 [svn] More input plugin API work
iabervon
parents: 2436
diff changeset
230 OutputPlugin *output; /* deprecated */
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
231
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
232 /* Added in Audacious 1.1.0 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
233 TitleInput *(*get_song_tuple) (gchar * filename);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
234 void (*set_song_tuple) (TitleInput * tuple);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
235 void (*set_status_buffering) (gboolean status);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
236
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
237 /* Added in Audacious 1.3.0 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
238 gint (*is_our_file_from_vfs) (gchar *filename, VFSFile *fd);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
239 gchar **vfs_extensions;
2620
6393862824e5 [svn] - add millisecond seek function to InputPlugin API. with this function, cuesheet and encoder plugins can achieve higher accuracy.
yaz
parents: 2473
diff changeset
240
6393862824e5 [svn] - add millisecond seek function to InputPlugin API. with this function, cuesheet and encoder plugins can achieve higher accuracy.
yaz
parents: 2473
diff changeset
241 /* Added in Audacious 1.4.0 */
6393862824e5 [svn] - add millisecond seek function to InputPlugin API. with this function, cuesheet and encoder plugins can achieve higher accuracy.
yaz
parents: 2473
diff changeset
242 void (*mseek) (InputPlayback * playback, gulong millisecond);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
243 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
244
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
245 struct _GeneralPlugin {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
246 gpointer handle;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
247 gchar *filename;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
248
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
249 gchar *description;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
250
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
251 void (*init) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
252 void (*about) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
253 void (*configure) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
254 void (*cleanup) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
255 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
256
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
257 struct _VisPlugin {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
258 gpointer handle;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
259 gchar *filename;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
260
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
261 gchar *description;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
262
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
263 gint num_pcm_chs_wanted;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
264 gint num_freq_chs_wanted;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
265
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
266 void (*init) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
267 void (*cleanup) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
268 void (*about) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
269 void (*configure) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
270 void (*disable_plugin) (struct _VisPlugin *);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
271 void (*playback_start) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
272 void (*playback_stop) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
273 void (*render_pcm) (gint16 pcm_data[2][512]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
274 void (*render_freq) (gint16 freq_data[2][256]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
275 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
276
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
277
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
278 G_BEGIN_DECLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
279
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
280 /* So that input plugins can get the title formatting information */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
281 G_CONST_RETURN gchar * xmms_get_gentitle_format(void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
282
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
283 /* So that output plugins can communicate with effect plugins */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
284 EffectPlugin *get_current_effect_plugin(void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
285 gboolean effects_enabled(void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
286 gboolean plugin_set_errortext(const gchar * text);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
287
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
288 G_END_DECLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
289
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
290 #endif