Simplify libass version check.
[mplayer/glamo.git] / stream / cdd.h
blobc6d6e9d92be1b4678d2ad7da31e1b8f0e51b32d3
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 "config.h"
23 #ifndef CONFIG_LIBCDIO
24 #include <cdda_interface.h>
25 #include <cdda_paranoia.h>
26 #else
27 #include <cdio/cdda.h>
28 #include <cdio/paranoia.h>
29 #endif
30 #include <sys/types.h>
32 typedef struct {
33 char cddb_hello[1024];
34 unsigned long disc_id;
35 unsigned int tracks;
36 char *cache_dir;
37 char *freedb_server;
38 int freedb_proto_level;
39 int anonymous;
40 char category[100];
41 char *xmcd_file;
42 size_t xmcd_file_size;
43 void *user_data;
44 } cddb_data_t;
46 typedef struct {
47 unsigned int min, sec, frame;
48 } cd_toc_t;
50 typedef struct cd_track {
51 char *name;
52 unsigned int track_nb;
53 unsigned int min;
54 unsigned int sec;
55 unsigned int msec;
56 unsigned long frame_begin;
57 unsigned long frame_length;
58 struct cd_track *prev;
59 struct cd_track *next;
60 } cd_track_t;
62 typedef struct {
63 char *artist;
64 char *album;
65 char *genre;
66 unsigned int nb_tracks;
67 unsigned int min;
68 unsigned int sec;
69 unsigned msec;
70 cd_track_t *first;
71 cd_track_t *last;
72 cd_track_t *current;
73 } cd_info_t;
75 typedef struct {
76 #ifndef CONFIG_LIBCDIO
77 cdrom_drive* cd;
78 cdrom_paranoia* cdp;
79 #else
80 cdrom_drive_t* cd;
81 cdrom_paranoia_t* cdp;
82 #endif
83 int sector;
84 int start_sector;
85 int end_sector;
86 cd_info_t *cd_info;
87 } cdda_priv;
89 cd_info_t* cd_info_new(void);
90 void cd_info_free(cd_info_t *cd_info);
91 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);
92 cd_track_t* cd_info_get_track(cd_info_t *cd_info, unsigned int track_nb);
94 void cd_info_debug(cd_info_t *cd_info);
96 #endif /* MPLAYER_CDD_H */