summaryrefslogtreecommitdiff
path: root/playlist.h
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-07-19 14:49:06 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-07-19 14:49:06 +0200
commitf87672ba62ec14a91f16a801e5fd019d1f4dcf59 (patch)
tree5cf48d14d9a2c1c3a2a98b5b400a62a3a4ebd732 /playlist.h
parente89e2345859798fa596e01bd9460a63c92785f49 (diff)
metadata WIP
Diffstat (limited to 'playlist.h')
-rw-r--r--playlist.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/playlist.h b/playlist.h
index cd67d191..52572835 100644
--- a/playlist.h
+++ b/playlist.h
@@ -1,15 +1,25 @@
#ifndef __PLAYLIST_H
#define __PLAYLIST_H
+#define META_FIELD_SIZE 256
+#define MAX_DISPLAY_NAME 512
+
+typedef struct metaInfo_s {
+ const char *key;
+ char value[META_FIELD_SIZE];
+ struct metaInfo_s *next;
+} metaInfo_t;
+
typedef struct playItem_s {
char *fname; // full pathname
- char *displayname; // all required metainfo columns packed in single string, separated with zeroes
+ char displayname[MAX_DISPLAY_NAME];
struct codec_s *codec; // codec to use with this file
int tracknum; // used for stuff like sid, nsf, cue (will be ignored by most codecs)
float timestart; // start time of cue track, or -1
float timeend; // end time of cue track, or -1
struct playItem_s *next; // next item in linked list
struct playItem_s *prev; // prev item in linked list
+ struct metaInfo_s *meta; // linked list storing metainfo
} playItem_t;
extern playItem_t *playlist_head; // head of linked list
@@ -30,6 +40,9 @@ int
ps_remove (playItem_t *i);
void
+ps_item_free (playItem_t *it);
+
+void
ps_free (void);
int
@@ -56,4 +69,13 @@ ps_nextsong (void);
void
ps_start_current (void);
+void
+ps_add_meta (playItem_t *it, const char *key, const char *value);
+
+void
+ps_format_item_display_name (playItem_t *it);
+
+const char *
+ps_find_meta (playItem_t *it, const char *key);
+
#endif // __PLAYLIST_H