Mercurial > audlegacy
comparison audacious/playlist.h @ 355:1c701dfe5098 trunk
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
of times we probe a resource to a strict limit of two times. (Once to
detect the type, and the second time to get the stream information.)
Something this simple should have been done to begin with...
author | nenolod |
---|---|
date | Thu, 29 Dec 2005 22:10:26 -0800 |
parents | cb178e5ad177 |
children | 99928e1275a1 |
comparison
equal
deleted
inserted
replaced
354:e2775c9b8b13 | 355:1c701dfe5098 |
---|---|
19 */ | 19 */ |
20 #ifndef PLAYLIST_H | 20 #ifndef PLAYLIST_H |
21 #define PLAYLIST_H | 21 #define PLAYLIST_H |
22 | 22 |
23 #include <glib.h> | 23 #include <glib.h> |
24 | 24 #include "input.h" |
25 | 25 |
26 typedef enum { | 26 typedef enum { |
27 PLAYLIST_SORT_PATH, | 27 PLAYLIST_SORT_PATH, |
28 PLAYLIST_SORT_FILENAME, | 28 PLAYLIST_SORT_FILENAME, |
29 PLAYLIST_SORT_TITLE, | 29 PLAYLIST_SORT_TITLE, |
42 struct _PlaylistEntry { | 42 struct _PlaylistEntry { |
43 gchar *filename; | 43 gchar *filename; |
44 gchar *title; | 44 gchar *title; |
45 gint length; | 45 gint length; |
46 gboolean selected; | 46 gboolean selected; |
47 InputPlugin *decoder; | |
47 }; | 48 }; |
48 | 49 |
49 typedef struct _PlaylistEntry PlaylistEntry; | 50 typedef struct _PlaylistEntry PlaylistEntry; |
50 | 51 |
51 PlaylistEntry *playlist_entry_new(const gchar * filename, | 52 PlaylistEntry *playlist_entry_new(const gchar * filename, |
52 const gchar * title, const gint len); | 53 const gchar * title, const gint len, |
54 InputPlugin * dec); | |
53 void playlist_entry_free(PlaylistEntry * entry); | 55 void playlist_entry_free(PlaylistEntry * entry); |
54 | 56 |
55 void playlist_init(void); | 57 void playlist_init(void); |
56 void playlist_clear(void); | 58 void playlist_clear(void); |
57 void playlist_delete(gboolean crop); | 59 void playlist_delete(gboolean crop); |