sub_cc.c: minor cleanup
[mplayer/greg.git] / stream / cdd.h
blob705fe47d2c964dc3a869afa7bd71a8e3c19ffe81
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_CDD_H
20 #define MPLAYER_CDD_H
22 #include <sys/types.h>
24 typedef struct cd_track {
25 char *name;
26 unsigned int track_nb;
27 unsigned int min;
28 unsigned int sec;
29 unsigned int msec;
30 unsigned long frame_begin;
31 unsigned long frame_length;
32 struct cd_track *prev;
33 struct cd_track *next;
34 } cd_track_t;
36 typedef struct {
37 char *artist;
38 char *album;
39 char *genre;
40 unsigned int nb_tracks;
41 unsigned int min;
42 unsigned int sec;
43 unsigned msec;
44 cd_track_t *first;
45 cd_track_t *last;
46 cd_track_t *current;
47 } cd_info_t;
49 cd_info_t* cd_info_new(void);
50 void cd_info_free(cd_info_t *cd_info);
51 cd_track_t* cd_info_add_track(cd_info_t *cd_info, char *track_name, unsigned int track_nb, unsigned int min, unsigned int sec, unsigned int msec, unsigned long frame_begin, unsigned long frame_length);
52 cd_track_t* cd_info_get_track(cd_info_t *cd_info, unsigned int track_nb);
54 void cd_info_debug(cd_info_t *cd_info);
56 int cdd_identify(const char *dev);
57 int cddb_resolve(const char *dev, char **xmcd_file);
58 cd_info_t* cddb_parse_xmcd(char *xmcd_file);
60 #endif /* MPLAYER_CDD_H */