Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
plugin.h
Go to the documentation of this file.
1 /*
2  * plugin.h
3  * Copyright 2005-2012 William Pitcock, Yoshiki Yazawa, Eugene Zagidullin, and
4  * John Lindgren
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright notice,
10  * this list of conditions, and the following disclaimer.
11  *
12  * 2. Redistributions in binary form must reproduce the above copyright notice,
13  * this list of conditions, and the following disclaimer in the documentation
14  * provided with the distribution.
15  *
16  * This software is provided "as is" and without any warranty, express or
17  * implied. In no event shall the authors be liable for any damages arising from
18  * the use of this software.
19  */
20 
21 #ifndef AUDACIOUS_PLUGIN_H
22 #define AUDACIOUS_PLUGIN_H
23 
24 #include <audacious/api.h>
25 #include <audacious/types.h>
26 #include <libaudcore/audio.h>
27 #include <libaudcore/index.h>
28 #include <libaudcore/tuple.h>
29 #include <libaudcore/vfs.h>
30 
31 /* "Magic" bytes identifying an Audacious plugin header. */
32 #define _AUD_PLUGIN_MAGIC 0x8EAC8DE2
33 
34 /* API version. Plugins are marked with this number at compile time.
35  *
36  * _AUD_PLUGIN_VERSION is the current version; _AUD_PLUGIN_VERSION_MIN is
37  * the oldest one we are backward compatible with. Plugins marked older than
38  * _AUD_PLUGIN_VERSION_MIN or newer than _AUD_PLUGIN_VERSION are not loaded.
39  *
40  * Before releases that add new pointers to the end of the API tables, increment
41  * _AUD_PLUGIN_VERSION but leave _AUD_PLUGIN_VERSION_MIN the same.
42  *
43  * Before releases that break backward compatibility (e.g. remove pointers from
44  * the API tables), increment _AUD_PLUGIN_VERSION *and* set
45  * _AUD_PLUGIN_VERSION_MIN to the same value. */
46 
47 #define _AUD_PLUGIN_VERSION_MIN 40 /* 3.3-devel */
48 #define _AUD_PLUGIN_VERSION 43 /* 3.4-devel */
49 
50 /* A NOTE ON THREADS
51  *
52  * How thread-safe a plugin must be depends on the type of plugin. Note that
53  * some parts of the Audacious API are *not* thread-safe and therefore cannot be
54  * used in some parts of some plugins; for example, input plugins cannot use
55  * GUI-related calls or access the playlist except in about() and configure().
56  *
57  * Thread-safe plugins: transport, playlist, input, effect, and output. These
58  * must be mostly thread-safe. init() and cleanup() may be called from
59  * secondary threads; however, no other functions provided by the plugin will be
60  * called at the same time. about() and configure() will be called only from
61  * the main thread. All other functions provided by the plugin may be called
62  * from any thread and from multiple threads simultaneously.
63  *
64  * Exceptions:
65  * - Because many existing input plugins are not coded to handle simultaneous
66  * calls to play(), play() will only be called from one thread at a time. New
67  * plugins should not rely on this exception, though.
68  * - Some combinations of calls, especially for output and effect plugins, make
69  * no sense; for example, flush() in an output plugin will only be called
70  * after open_audio() and before close_audio().
71  *
72  * Single-thread plugins: visualization, general, and interface. Functions
73  * provided by these plugins will only be called from the main thread. */
74 
75 /* CROSS-PLUGIN MESSAGES
76  *
77  * Since 3.2, Audacious implements a basic messaging system between plugins.
78  * Messages are sent using aud_plugin_send_message() and received through the
79  * take_message() method specified in the header of the receiving plugin.
80  * Plugins that do not need to receive messages can set take_message() to NULL.
81  *
82  * Each message includes a code indicating the type of message, a pointer to
83  * some data, and a value indicating the size of that data. What the message
84  * data contains is entirely up to the two plugins involved. For this reason, it
85  * is crucial that both plugins agree on the meaning of the message codes used.
86  *
87  * Once the message is sent, an integer error code is returned. If the receiving
88  * plugin does not provide the take_message() method, ENOSYS is returned. If
89  * take_message() does not recognize the message code, it should ignore the
90  * message and return EINVAL. An error code of zero represents success. Other
91  * error codes may be used with more specific meanings.
92  *
93  * For the time being, aud_plugin_send_message() should only be called from the
94  * program's main thread. */
95 
96 #define PLUGIN_COMMON_FIELDS \
97  int magic; /* checked against _AUD_PLUGIN_MAGIC */ \
98  int version; /* checked against _AUD_PLUGIN_VERSION */ \
99  int type; /* PLUGIN_TYPE_XXX */ \
100  int size; /* size in bytes of the struct */ \
101  const char * name; \
102  const char * domain; /* for gettext */ \
103  const char * about_text; \
104  const PluginPreferences * prefs; \
105  bool_t (* init) (void); \
106  void (* cleanup) (void); \
107  int (* take_message) (const char * code, const void * data, int size); \
108  void (* about) (void); /* use about_text instead if possible */ \
109  void (* configure) (void); /* use prefs instead if possible */ \
110  void * reserved1; \
111  void * reserved2; \
112  void * reserved3; \
113  void * reserved4;
114 
115 struct _Plugin
116 {
118 };
119 
121 {
123 
124  /* supported URI schemes (without "://")
125  * (array terminated with null pointer) */
126  const char * const * schemes;
127 
128  /* file operation implementations
129  * (struct of function pointers, may contain null pointers) */
131 };
132 
134 {
136 
137  /* supported file extensions (without periods)
138  * (array terminated with null pointer) */
139  const char * const * extensions;
140 
141  /* path: URI of playlist file (in)
142  * file: VFS handle of playlist file (in, read-only file, not seekable)
143  * title: title of playlist (out, string-pooled)
144  * filenames: container to fill with URIs read from playlist file
145  * (in-out, list of (char *), string-pooled)
146  * tuples: container to fill with metadata read from playlist
147  * (in-out, list of (Tuple *), may contain null pointers) */
148  bool_t (* load) (const char * path, VFSFile * file, char * * title,
149  Index * filenames, Index * tuples);
150 
151  /* path: URI of playlist file (in)
152  * file: VFS handle of playlist file (in, write-only file, not seekable)
153  * title: title of playlist (in)
154  * filenames: container filled with URIs to be written to playlist
155  * (in, list of (char *))
156  * tuples: container filled with metadata to be written to playlist
157  * (in, list of (Tuple *), may contain null pointers) */
158  bool_t (* save) (const char * path, VFSFile * file, const char * title,
159  Index * filenames, Index * tuples);
160 };
161 
163 {
165 
166  /* During probing, plugins with higher priority (10 to 0) are tried first. */
168 
169  /* Returns current volume for left and right channels (0 to 100). */
170  void (* get_volume) (int * l, int * r);
171 
172  /* Changes volume for left and right channels (0 to 100). */
173  void (* set_volume) (int l, int r);
174 
175  /* Begins playback of a PCM stream. <format> is one of the FMT_*
176  * enumeration values defined in libaudcore/audio.h. Returns nonzero on
177  * success. */
178  bool_t (* open_audio) (int format, int rate, int chans);
179 
180  /* Ends playback. Any buffered audio data is discarded. */
181  void (* close_audio) (void);
182 
183  /* Returns how many bytes of data may be passed to a following write_audio()
184  * call. NULL if the plugin supports only blocking writes (not recommended). */
185  int (* buffer_free) (void);
186 
187  /* Waits until buffer_free() will return a size greater than zero.
188  * output_time(), pause(), and flush() may be called meanwhile; if flush()
189  * is called, period_wait() should return immediately. NULL if the plugin
190  * supports only blocking writes (not recommended). */
191  void (* period_wait) (void);
192 
193  /* Buffers <size> bytes of data, in the format given to open_audio(). */
194  void (* write_audio) (void * data, int size);
195 
196  /* Waits until all buffered data has been heard by the user. */
197  void (* drain) (void);
198 
199  /* Returns time count (in milliseconds) of how much data has been heard by
200  * the user. */
201  int (* output_time) (void);
202 
203  /* Pauses the stream if <p> is nonzero; otherwise unpauses it.
204  * write_audio() will not be called while the stream is paused. */
205  void (* pause) (bool_t p);
206 
207  /* Discards any buffered audio data and sets the time counter (in
208  * milliseconds) of data written. */
209  void (* flush) (int time);
210 
211  /* Whether close_audio() and open_audio() must always be called between
212  * songs, even if the audio format is the same. Note that this defeats
213  * gapless playback. */
215 };
216 
218 {
220 
221  /* All processing is done in floating point. If the effect plugin wants to
222  * change the channel count or sample rate, it can change the parameters
223  * passed to start(). They cannot be changed in the middle of a song. */
224  void (* start) (int * channels, int * rate);
225 
226  /* process() has two options: modify the samples in place and leave the data
227  * pointer unchanged or copy them into a buffer of its own. If it sets the
228  * pointer to dynamically allocated memory, it is the plugin's job to free
229  * that memory. process() may return different lengths of audio than it is
230  * passed, even a zero length. */
231  void (* process) (float * * data, int * samples);
232 
233  /* Optional. A seek is taking place; any buffers should be discarded. */
234  void (* flush) (void);
235 
236  /* Exactly like process() except that any buffers should be drained (i.e.
237  * the data processed and returned). finish() will be called a second time
238  * at the end of the last song in the playlist. */
239  void (* finish) (float * * data, int * samples);
240 
241  /* Required only for plugins that change the time domain (e.g. a time
242  * stretch) or use read-ahead buffering. translate_delay() must do two
243  * things: first, translate <delay> (which is in milliseconds) from the
244  * output time domain back to the input time domain; second, increase
245  * <delay> by the size of the read-ahead buffer. It should return the
246  * adjusted delay. */
247  int (* adjust_delay) (int delay);
248 
249  /* Effects with lowest order (0 to 9) are applied first. */
250  int order;
251 
252  /* If the effect does not change the number of channels or the sampling
253  * rate, it can be enabled and disabled more smoothly. */
255 };
256 
257 struct OutputAPI
258 {
259  /* Prepares the output system for playback in the specified format. Returns
260  * TRUE on success. If the call fails, no other output functions may be
261  * called. */
262  bool_t (* open_audio) (int format, int rate, int channels);
263 
264  /* Informs the output system of replay gain values for the current song so
265  * that volume levels can be adjusted accordingly, if the user so desires.
266  * This may be called at any time during playback should the values change. */
267  void (* set_replaygain_info) (const ReplayGainInfo * info);
268 
269  /* Passes audio data to the output system for playback. The data must be in
270  * the format passed to open_audio, and the length (in bytes) must be an
271  * integral number of frames. This function blocks until all the data has
272  * been written (though it may not yet be heard by the user). */
273  void (* write_audio) (void * data, int length);
274 
275  /* Interrupts a call to write_audio() so that it returns immediately.
276  * Buffered audio data is discarded. Until set_written_time() or
277  * open_audio() is called, further calls to write_audio() will have no
278  * effect and will return immediately. */
279  void (* abort_write) (void);
280 
281  /* Pauses or unpauses playback. If playback is paused during a call to
282  * write_audio(), the call will block until playback is unpaused again or
283  * abort_write() is called. */
284  void (* pause) (bool_t pause);
285 
286  /* Returns the time counter. Note that this represents the amount of audio
287  * data passed to the output system, not the amount actually heard by the
288  * user. */
289  int (* written_time) (void);
290 
291  /* Sets the time counter to a new value. Does not perform a flush; the name
292  * is kept only for compatibility. */
293  void (* flush) (int time);
294 };
295 
296 typedef const struct _InputPlayback InputPlayback;
297 
299 {
300  /* Pointer to the output API functions. */
301  const struct OutputAPI * output;
302 
303  /* Allows the plugin to associate data with a playback instance. */
304  void (* set_data) (InputPlayback * p, void * data);
305 
306  /* Returns the pointer passed to set_data. */
307  void * (* get_data) (InputPlayback * p);
308 
309  /* Signifies that the plugin has started playback is ready to accept mseek,
310  * pause, and stop calls. */
311  void (* set_pb_ready) (InputPlayback * p);
312 
313  /* Updates attributes of the stream. "bitrate" is in bits per second.
314  * "samplerate" is in hertz. */
315  void (* set_params) (InputPlayback * p, int bitrate, int samplerate,
316  int channels);
317 
318  /* Updates metadata for the stream. Caller gives up ownership of one
319  * reference to the tuple. */
320  void (* set_tuple) (InputPlayback * playback, Tuple * tuple);
321 
322  /* If replay gain settings are stored in the tuple associated with the
323  * current song, this function can be called (after opening audio) to apply
324  * those settings. If the settings are changed in a call to set_tuple, this
325  * function must be called again to apply the updated settings. */
326  void (* set_gain_from_playlist) (InputPlayback * playback);
327 };
328 
330 {
332 
333  /* Nonzero if the files handled by the plugin may contain more than one
334  * song. When reading the tuple for such a file, the plugin should set the
335  * FIELD_SUBSONG_NUM field to the number of songs in the file. For all
336  * other files, the field should be left unset.
337  *
338  * Example:
339  * 1. User adds a file named "somefile.xxx" to the playlist. Having
340  * determined that this plugin can handle the file, Audacious opens the file
341  * and calls probe_for_tuple(). probe_for_tuple() sees that there are 3
342  * songs in the file and sets FIELD_SUBSONG_NUM to 3.
343  * 2. For each song in the file, Audacious opens the file and calls
344  * probe_for_tuple() -- this time, however, a question mark and song number
345  * are appended to the file name passed: "somefile.sid?2" refers to the
346  * second song in the file "somefile.sid".
347  * 3. When one of the songs is played, Audacious opens the file and calls
348  * play() with a file name modified in this way.
349  */
351 
352  /* Pointer to an array (terminated with NULL) of file extensions associated
353  * with file types the plugin can handle. */
354  const char * const * extensions;
355  /* Pointer to an array (terminated with NULL) of MIME types the plugin can
356  * handle. */
357  const char * const * mimes;
358  /* Pointer to an array (terminated with NULL) of custom URI schemes the
359  * plugin can handle. */
360  const char * const * schemes;
361 
362  /* How quickly the plugin should be tried in searching for a plugin to
363  * handle a file which could not be identified from its extension. Plugins
364  * with priority 0 are tried first, 10 last. */
365  int priority;
366 
367  /* Must return nonzero if the plugin can handle this file. If the file
368  * could not be opened, "file" will be NULL. (This is normal in the case of
369  * special URI schemes like cdda:// that do not represent actual files.) */
370  bool_t (* is_our_file_from_vfs) (const char * filename, VFSFile * file);
371 
372  /* Must return a tuple containing metadata for this file, or NULL if no
373  * metadata could be read. If the file could not be opened, "file" will be
374  * NULL. Audacious takes over one reference to the tuple returned. */
375  Tuple * (* probe_for_tuple) (const char * filename, VFSFile * file);
376 
377  /* Optional. Must write metadata from a tuple to this file. Must return
378  * nonzero on success or zero on failure. "file" will never be NULL. */
379  /* Bug: This function does not support special URI schemes like cdda://,
380  * since no file name is passed. */
381  bool_t (* update_song_tuple) (const Tuple * tuple, VFSFile * file);
382 
383  /* Optional, and not recommended. Must show a window with information about
384  * this file. If this function is provided, update_song_tuple should not be. */
385  /* Bug: Implementing this function duplicates user interface code and code
386  * to open the file in each and every plugin. */
387  void (* file_info_box) (const char * filename);
388 
389  /* Optional. Must try to read an "album art" image embedded in this file.
390  * Must return nonzero on success or zero on failure. If the file could not
391  * be opened, "file" will be NULL. On success, must fill "data" with a
392  * pointer to a block of data allocated with g_malloc and "size" with the
393  * size in bytes of that block. The data may be in any format supported by
394  * GTK. Audacious will free the data when it is no longer needed. */
395  bool_t (* get_song_image) (const char * filename, VFSFile * file,
396  void * * data, int64_t * size);
397 
398  /* Must try to play this file. "playback" is a structure containing output-
399  * related functions which the plugin may make use of. It also contains a
400  * "data" pointer which the plugin may use to refer private data associated
401  * with the playback state. This pointer can then be used from pause,
402  * mseek, and stop. If the file could not be opened, "file" will be NULL.
403  * "start_time" is the position in milliseconds at which to start from, or
404  * -1 to start from the beginning of the file. "stop_time" is the position
405  * in milliseconds at which to end playback, or -1 to play to the end of the
406  * file. "paused" specifies whether playback should immediately be paused.
407  * Must return nonzero if some of the file was successfully played or zero
408  * on failure. */
409  bool_t (* play) (InputPlayback * playback, const char * filename,
410  VFSFile * file, int start_time, int stop_time, bool_t pause);
411 
412  /* Must pause or unpause a file currently being played. This function will
413  * be called from a different thread than play, but it will not be called
414  * before the plugin calls set_pb_ready or after stop is called. */
415  void (* pause) (InputPlayback * playback, bool_t paused);
416 
417  /* Optional. Must seek to the given position in milliseconds within a file
418  * currently being played. This function will be called from a different
419  * thread than play, but it will not be called before the plugin calls
420  * set_pb_ready or after stop is called. */
421  void (* mseek) (InputPlayback * playback, int time);
422 
423  /* Must signal a currently playing song to stop and cause play to return.
424  * This function will be called from a different thread than play. It will
425  * only be called once. It should not join the thread from which play is
426  * called. */
427  void (* stop) (InputPlayback * playback);
428 
429  /* Advanced, for plugins that do not use Audacious's output system. Use at
430  * your own risk. */
431  int (* get_time) (InputPlayback * playback);
432  int (* get_volume) (int * l, int * r);
433  int (* set_volume) (int l, int r);
434 };
435 
437 {
439 
441 
442  /* GtkWidget * (* get_widget) (void); */
443  void * (* get_widget) (void);
444 };
445 
447 {
449 
450  /* reset internal state and clear display */
451  void (* clear) (void);
452 
453  /* 512 frames of a single-channel PCM signal */
454  void (* render_mono_pcm) (const float * pcm);
455 
456  /* 512 frames of an interleaved multi-channel PCM signal */
457  void (* render_multi_pcm) (const float * pcm, int channels);
458 
459  /* intensity of frequencies 1/512, 2/512, ..., 256/512 of sample rate */
460  void (* render_freq) (const float * freq);
461 
462  /* GtkWidget * (* get_widget) (void); */
463  void * (* get_widget) (void);
464 };
465 
467 {
469 
470  /* is_shown() may return nonzero even if the interface is not actually
471  * visible; for example, if it is obscured by other windows or minimized.
472  * is_focused() only returns nonzero if the interface is actually visible;
473  * in X11, this should be determined by whether the interface has the
474  * toplevel focus. show() should show and raise the interface, so that both
475  * is_shown() and is_focused() will return nonzero. */
476  void (* show) (bool_t show);
477  bool_t (* is_shown) (void);
478  bool_t (* is_focused) (void);
479 
480  void (* show_error) (const char * markup);
481  void (* show_filebrowser) (bool_t play_button);
482  void (* show_jump_to_track) (void);
483 
484  void (* run_gtk_plugin) (void /* GtkWidget */ * widget, const char * name);
485  void (* stop_gtk_plugin) (void /* GtkWidget */ * widget);
486 
487  void (* install_toolbar) (void /* GtkWidget */ * button);
488  void (* uninstall_toolbar) (void /* GtkWidget */ * button);
489 };
490 
491 #undef PLUGIN_COMMON_FIELDS
492 
493 #define AUD_PLUGIN(stype, itype, ...) \
494 AudAPITable * _aud_api_table = NULL; \
495 stype _aud_plugin_self = { \
496  .magic = _AUD_PLUGIN_MAGIC, \
497  .version = _AUD_PLUGIN_VERSION, \
498  .type = itype, \
499  .size = sizeof (stype), \
500  __VA_ARGS__}; \
501 stype * get_plugin_info (AudAPITable * table) { \
502  _aud_api_table = table; \
503  return & _aud_plugin_self; \
504 }
505 
506 #define AUD_TRANSPORT_PLUGIN(...) AUD_PLUGIN (TransportPlugin, PLUGIN_TYPE_TRANSPORT, __VA_ARGS__)
507 #define AUD_PLAYLIST_PLUGIN(...) AUD_PLUGIN (PlaylistPlugin, PLUGIN_TYPE_PLAYLIST, __VA_ARGS__)
508 #define AUD_INPUT_PLUGIN(...) AUD_PLUGIN (InputPlugin, PLUGIN_TYPE_INPUT, __VA_ARGS__)
509 #define AUD_EFFECT_PLUGIN(...) AUD_PLUGIN (EffectPlugin, PLUGIN_TYPE_EFFECT, __VA_ARGS__)
510 #define AUD_OUTPUT_PLUGIN(...) AUD_PLUGIN (OutputPlugin, PLUGIN_TYPE_OUTPUT, __VA_ARGS__)
511 #define AUD_VIS_PLUGIN(...) AUD_PLUGIN (VisPlugin, PLUGIN_TYPE_VIS, __VA_ARGS__)
512 #define AUD_GENERAL_PLUGIN(...) AUD_PLUGIN (GeneralPlugin, PLUGIN_TYPE_GENERAL, __VA_ARGS__)
513 #define AUD_IFACE_PLUGIN(...) AUD_PLUGIN (IfacePlugin, PLUGIN_TYPE_IFACE, __VA_ARGS__)
514 
515 #define PLUGIN_HAS_FUNC(p, func) \
516  ((p)->size > (char *) & (p)->func - (char *) (p) && (p)->func)
517 
518 #endif /* AUDACIOUS_PLUGIN_H */
void(* pause)(bool_t p)
Definition: plugin.h:205
int(* set_volume)(int l, int r)
Definition: plugin.h:433
static int channels
Definition: equalizer.c:54
bool_t(* is_focused)(void)
Definition: plugin.h:478
void(* run_gtk_plugin)(void *widget, const char *name)
Definition: plugin.h:484
void(* pause)(bool_t pause)
Definition: plugin.h:284
void(* write_audio)(void *data, int length)
Definition: plugin.h:273
int(* output_time)(void)
Definition: plugin.h:201
void(* set_pb_ready)(InputPlayback *p)
Definition: plugin.h:311
const char filename
Definition: misc-api.h:85
int(* adjust_delay)(int delay)
Definition: plugin.h:247
const char *const * extensions
Definition: plugin.h:354
bool_t preserves_format
Definition: plugin.h:254
PLUGIN_COMMON_FIELDS void(* start)(int *channels, int *rate)
Definition: plugin.h:224
const char *const * schemes
Definition: plugin.h:360
static bool_t paused
Definition: playback.c:57
void(* uninstall_toolbar)(void *button)
Definition: plugin.h:488
Main API header for accessing Audacious VFS functionality.
bool_t(* is_our_file_from_vfs)(const char *filename, VFSFile *file)
Definition: plugin.h:370
void(* abort_write)(void)
Definition: plugin.h:279
int(* get_time)(InputPlayback *playback)
Definition: plugin.h:431
const char PluginHandle decoder const char PluginHandle decoder const char PluginHandle decoder void const PreferencesWidget int
Definition: misc-api.h:103
PLUGIN_COMMON_FIELDS void(* show)(bool_t show)
Definition: plugin.h:476
bool_t(* update_song_tuple)(const Tuple *tuple, VFSFile *file)
Definition: plugin.h:381
void(* render_multi_pcm)(const float *pcm, int channels)
Definition: plugin.h:457
int format
Definition: audio.c:132
PLUGIN_COMMON_FIELDS bool_t have_subtune
Definition: plugin.h:350
bool_t force_reopen
Definition: plugin.h:214
#define PLUGIN_COMMON_FIELDS
Definition: plugin.h:96
void(* set_volume)(int l, int r)
Definition: plugin.h:173
void(* render_mono_pcm)(const float *pcm)
Definition: plugin.h:454
void(* set_replaygain_info)(const ReplayGainInfo *info)
Definition: plugin.h:267
void(* finish)(float **data, int *samples)
Definition: plugin.h:239
PLUGIN_COMMON_FIELDS const char *const * schemes
Definition: plugin.h:126
Index Index bool_t
Definition: playlist-api.h:122
void(* stop)(InputPlayback *playback)
Definition: plugin.h:427
const char *const * mimes
Definition: plugin.h:357
void(* close_audio)(void)
Definition: plugin.h:181
const char * name
Definition: plugin-init.c:38
PLUGIN_COMMON_FIELDS int probe_priority
Definition: plugin.h:167
PLUGIN_COMMON_FIELDS const char *const * extensions
Definition: plugin.h:139
void(* flush)(int time)
Definition: plugin.h:293
void(* set_tuple)(InputPlayback *playback, Tuple *tuple)
Definition: plugin.h:320
void(* show_error)(const char *markup)
Definition: plugin.h:480
int(* buffer_free)(void)
Definition: plugin.h:185
void(* process)(float **data, int *samples)
Definition: plugin.h:231
void(* stop_gtk_plugin)(void *widget)
Definition: plugin.h:485
void(* mseek)(InputPlayback *playback, int time)
Definition: plugin.h:421
const VFSConstructor * vtable
Definition: plugin.h:130
int(* written_time)(void)
Definition: plugin.h:289
bool_t(* open_audio)(int format, int rate, int channels)
Definition: plugin.h:262
void(* set_data)(InputPlayback *p, void *data)
Definition: plugin.h:304
int(* get_volume)(int *l, int *r)
Definition: plugin.h:432
void(* drain)(void)
Definition: plugin.h:197
bool_t(* is_shown)(void)
Definition: plugin.h:477
void(* pause)(InputPlayback *playback, bool_t paused)
Definition: plugin.h:415
bool_t(* load)(const char *path, VFSFile *file, char **title, Index *filenames, Index *tuples)
Definition: plugin.h:148
void(* flush)(int time)
Definition: plugin.h:209
bool_t(* get_song_image)(const char *filename, VFSFile *file, void **data, int64_t *size)
Definition: plugin.h:395
void(* set_gain_from_playlist)(InputPlayback *playback)
Definition: plugin.h:326
PLUGIN_COMMON_FIELDS void(* clear)(void)
Definition: plugin.h:451
void(* write_audio)(void *data, int size)
Definition: plugin.h:194
bool_t(* open_audio)(int format, int rate, int chans)
Definition: plugin.h:178
void(* period_wait)(void)
Definition: plugin.h:191
void(* render_freq)(const float *freq)
Definition: plugin.h:460
static int rate
Definition: equalizer.c:54
int priority
Definition: plugin.h:365
void(* get_volume)(int *l, int *r)
Definition: plugin.h:170
PLUGIN_COMMON_FIELDS bool_t enabled_by_default
Definition: plugin.h:440
bool_t(* save)(const char *path, VFSFile *file, const char *title, Index *filenames, Index *tuples)
Definition: plugin.h:158
Index Index tuples
Definition: playlist-api.h:122
void(* file_info_box)(const char *filename)
Definition: plugin.h:387
Basic Tuple handling API.
bool_t(* play)(InputPlayback *playback, const char *filename, VFSFile *file, int start_time, int stop_time, bool_t pause)
Definition: plugin.h:409
char ** filenames
Definition: main.c:56
void(* show_jump_to_track)(void)
Definition: plugin.h:482
void(* flush)(void)
Definition: plugin.h:234
void(* show_filebrowser)(bool_t play_button)
Definition: plugin.h:481
struct OutputAPI * output
Definition: plugin.h:301
void(* set_params)(InputPlayback *p, int bitrate, int samplerate, int channels)
Definition: plugin.h:315
void(* install_toolbar)(void *button)
Definition: plugin.h:487