4
/***************************************************************************
5
wm_cdtext.h - description
7
begin : Mon Feb 12 2001
8
copyright : (C) 2001 by Alex Kern
9
email : alex.kern@gmx.de
10
***************************************************************************/
12
/***************************************************************************
14
* This program is free software; you can redistribute it and/or modify *
15
* it under the terms of the GNU General Public License as published by *
16
* the Free Software Foundation; either version 2 of the License, or *
17
* (at your option) any later version. *
19
***************************************************************************/
22
* cdtext base structure and defines
24
extern struct cdtext_info wm_cdtext_info;
26
#define MAX_LENGHT_OF_CDTEXT_STRING 162 /* max 160 bytes + 2 * 0x00 by UNICODES */
27
#define DATAFIELD_LENGHT_IN_PACK 12
28
#define MAX_LANGUAGE_BLOCKS 8
30
struct cdtext_pack_data_header {
31
unsigned char header_field_id1_typ_of_pack;
32
unsigned char header_field_id2_tracknumber;
33
unsigned char header_field_id3_sequence;
34
unsigned char header_field_id4_block_no;
35
unsigned char text_data_field[DATAFIELD_LENGHT_IN_PACK];
36
unsigned char crc_byte1;
37
unsigned char crc_byte2;
40
typedef unsigned char cdtext_string[MAX_LENGHT_OF_CDTEXT_STRING];
42
/* meke it more generic
43
it can be up to 8 blocks with different encoding */
45
struct cdtext_info_block {
47
unsigned char block_code;
48
unsigned char block_unicode; /* 0 - single chars, 1 - doublebytes */
49
unsigned char block_encoding; /* orange book -? */
50
cdtext_string* block_encoding_text;
52
/* variable part of cdtext */
54
cdtext_string* performer;
55
cdtext_string* songwriter;
56
cdtext_string* composer;
57
cdtext_string* arranger;
58
cdtext_string* message;
59
cdtext_string* UPC_EAN_ISRC_code;
61
/* fix part of cdtext */
62
unsigned char binary_disc_identification_info[DATAFIELD_LENGHT_IN_PACK];
63
unsigned char binary_genreidentification_info[DATAFIELD_LENGHT_IN_PACK];
64
unsigned char binary_size_information[DATAFIELD_LENGHT_IN_PACK];
68
/* somethimes i get hunderts of bytes, without anyone valid pack
69
my CDU-561 for example */
70
int count_of_entries; /* one more becose album need one too */
71
int count_of_valid_packs;
72
int count_of_invalid_packs;
75
struct cdtext_info_block *blocks[MAX_LANGUAGE_BLOCKS];
78
#ifndef IGNORE_FEATURE_LIST
80
struct feature_list_header {
81
unsigned char lenght_msb;
82
unsigned char lenght_1sb;
83
unsigned char lenght_2sb;
84
unsigned char lenght_lsb;
85
unsigned char reserved1;
86
unsigned char reserved2;
87
unsigned char profile_msb;
88
unsigned char profile_lsb;
91
struct feature_descriptor_cdread {
92
unsigned char feature_code_msb;
93
unsigned char feature_code_lsb;
94
unsigned char settings;
95
unsigned char add_lenght;
96
unsigned char add_settings;
97
unsigned char reserved1;
98
unsigned char reserved2;
99
unsigned char reserved3;
102
#endif /* IGNORE_FEATURE_LIST */
104
int wm_get_cdtext(struct wm_drive*);
105
void wm_free_cdtext(void);
107
#endif /* WM_CDTEXT_H */