diff src/audacious/plugin.h @ 2436:f346d30bf5ab trunk

[svn] Change the input plugin API to use a struct for the currently-playing file.
author iabervon
date Sun, 28 Jan 2007 17:02:15 -0800
parents 3149d4b1a9a9
children 62d8f9c05832
line wrap: on
line diff
--- a/src/audacious/plugin.h	Sun Jan 28 12:15:08 2007 -0800
+++ b/src/audacious/plugin.h	Sun Jan 28 17:02:15 2007 -0800
@@ -80,6 +80,8 @@
 
 typedef struct _LowlevelPlugin LowlevelPlugin;
 
+typedef struct _InputPlayback InputPlayback;
+
 /* Sadly, this is the most we can generalize out of the disparate
    plugin structs usable with typecasts - descender */
 struct _Plugin {
@@ -145,6 +147,13 @@
     void (*query_format) (AFormat * fmt, gint * rate, gint * nch);
 };
 
+struct _InputPlayback {
+    gchar *filename;
+    InputPlugin *plugin;
+    void *data;
+    OutputPlugin *output;
+};
+
 struct _InputPlugin {
     gpointer handle;
     gchar *filename;
@@ -158,14 +167,14 @@
     gint (*is_our_file) (gchar * filename);
     GList *(*scan_dir) (gchar * dirname);
 
-    void (*play_file) (gchar * filename);
-    void (*stop) (void);
-    void (*pause) (gshort paused);
-    void (*seek) (gint time);
+    void (*play_file) (InputPlayback * playback);
+    void (*stop) (InputPlayback * playback);
+    void (*pause) (InputPlayback * playback, gshort paused);
+    void (*seek) (InputPlayback * playback, gint time);
 
     void (*set_eq) (gint on, gfloat preamp, gfloat * bands);
 
-    gint (*get_time) (void);
+    gint (*get_time) (InputPlayback * playback);
 
     void (*get_volume) (gint * l, gint * r);
     void (*set_volume) (gint l, gint r);