Mercurial > audlegacy-plugins
annotate src/cue/cuesheet.h @ 3132:f8686c591e49
neon: More gracefully handle the NEON_READER_ERROR condition.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Thu, 07 May 2009 00:30:11 -0500 |
parents | 3134a0987162 |
children |
rev | line source |
---|---|
2951
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
1 #ifndef _CUE_H_ |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
2 #define _CUE_H_ |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
3 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
4 #include "config.h" |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
5 |
2952
63bf9d97ce65
- now cuesheet plugin calculates duration of subtune correctly even if pregap information is not available.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2951
diff
changeset
|
6 /* #define AUD_DEBUG 1 */ |
2951
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
7 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
8 #include <string.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
9 #include <stdlib.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
10 #include <stdio.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
11 #include <ctype.h> |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2952
diff
changeset
|
12 #include <audlegacy/plugin.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2952
diff
changeset
|
13 #include <audlegacy/output.h> |
2951
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
14 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
15 #define MAX_CUE_LINE_LENGTH 1000 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
16 #define MAX_CUE_TRACKS 1000 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
17 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
18 extern GMutex *cue_mutex; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
19 extern GCond *cue_cond; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
20 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
21 typedef enum { |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
22 STOP = 0, |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
23 RUN, |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
24 EXIT |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
25 } watchdog_state_t; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
26 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
27 extern watchdog_state_t watchdog_state; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
28 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
29 extern gint last_cue_track; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
30 extern gint cur_cue_track; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
31 extern gulong target_time; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
32 extern GMutex *cue_target_time_mutex; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
33 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
34 typedef struct cue_tracks { |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
35 gchar *title; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
36 gchar *performer; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
37 gint index; |
2952
63bf9d97ce65
- now cuesheet plugin calculates duration of subtune correctly even if pregap information is not available.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2951
diff
changeset
|
38 gint index00; |
2951
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
39 gint duration; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
40 } cue_tracks_t; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
41 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
42 extern cue_tracks_t cue_tracks[]; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
43 extern gint finetune_seek; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
44 extern InputPlayback *real_ip; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
45 extern InputPlayback *caller_ip; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
46 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
47 /* prototypes */ |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
48 void cache_cue_file(gchar *f); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
49 void free_cue_info(void); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
50 void fix_cue_argument(char *line); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
51 int is_our_file(gchar *filename); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
52 void play(InputPlayback *data); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
53 void play_cue_uri(InputPlayback *data, gchar *uri); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
54 void mseek(InputPlayback *data, gulong time); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
55 void seek(InputPlayback *data, gint time); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
56 void stop(InputPlayback *data); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
57 void cue_pause(InputPlayback *data, short); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
58 Tuple *get_song_tuple(gchar *uri); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
59 void cue_init(void); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
60 gint get_time(InputPlayback *playback); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
61 void cue_cleanup(void); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
62 gpointer watchdog_func(gpointer data); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
63 Tuple *probe_for_tuple(gchar *songFilename, VFSFile *fd); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
64 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
65 #endif |