2004-07-09 01:05:31 +00:00
|
|
|
|
/*
|
2004-10-28 03:50:32 +00:00
|
|
|
|
$Id: cdtext_private.h,v 1.6 2004/10/28 03:50:32 rocky Exp $
|
2004-07-09 01:05:31 +00:00
|
|
|
|
|
|
|
|
|
|
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
|
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __CDIO_CDTEXT_PRIVATE_H__
|
|
|
|
|
|
#define __CDIO_CDTEXT_PRIVATE_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <cdio/cdio.h>
|
2004-07-17 09:34:30 +00:00
|
|
|
|
#include <cdio/cdtext.h>
|
2004-07-09 01:05:31 +00:00
|
|
|
|
|
|
|
|
|
|
#define CDIO_CDTEXT_MAX_PACK_DATA 255
|
|
|
|
|
|
#define CDIO_CDTEXT_MAX_TEXT_DATA 12
|
|
|
|
|
|
|
2004-10-28 03:50:32 +00:00
|
|
|
|
/* From table J.2 - Pack Type Indicator Definitions from
|
|
|
|
|
|
Working Draft NCITS XXX T10/1364-D Revision 10G. November 12, 2001.
|
|
|
|
|
|
*/
|
|
|
|
|
|
/* Title of Alubm name (ID=0) or Track Titles (ID != 0) */
|
|
|
|
|
|
#define CDIO_CDTEXT_TITLE 0x80
|
|
|
|
|
|
|
|
|
|
|
|
/* Name(s) of the performer(s) in ASCII */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#define CDIO_CDTEXT_PERFORMER 0x81
|
2004-10-28 03:50:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Name(s) of the songwriter(s) in ASCII */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#define CDIO_CDTEXT_SONGWRITER 0x82
|
2004-10-28 03:50:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Name(s) of the Composers in ASCII */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#define CDIO_CDTEXT_COMPOSER 0x83
|
2004-10-28 03:50:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Name(s) of the Arrangers in ASCII */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#define CDIO_CDTEXT_ARRANGER 0x84
|
2004-10-28 03:50:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Message(s) from content provider and/or artist in ASCII */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#define CDIO_CDTEXT_MESSAGE 0x85
|
2004-10-28 03:50:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Disc Identificatin information */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#define CDIO_CDTEXT_DISCID 0x86
|
2004-10-28 03:50:32 +00:00
|
|
|
|
|
|
|
|
|
|
/* Genre Identification and Genre Information */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#define CDIO_CDTEXT_GENRE 0x87
|
|
|
|
|
|
|
2004-10-28 03:50:32 +00:00
|
|
|
|
/* Table of Content Information */
|
|
|
|
|
|
#define CDIO_CDTEXT_TOC 0x88
|
|
|
|
|
|
|
|
|
|
|
|
/* Second Table of Content Information */
|
|
|
|
|
|
#define CDIO_CDTEXT_TOC2 0x89
|
|
|
|
|
|
|
|
|
|
|
|
/* 0x8A, 0x8B, 0x8C are reserved
|
|
|
|
|
|
0x8D Reserved for content provider only.
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* UPC/EAN code of the album and ISRC code of each track */
|
|
|
|
|
|
#define CDIO_CDTEXT_UPC 0x8E
|
|
|
|
|
|
|
|
|
|
|
|
/* Size information of the Block */
|
|
|
|
|
|
#define CDIO_CDTEXT_BLOCKSIZE 0x8F
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-07-09 01:05:31 +00:00
|
|
|
|
PRAGMA_BEGIN_PACKED
|
|
|
|
|
|
|
|
|
|
|
|
struct CDText_data
|
|
|
|
|
|
{
|
|
|
|
|
|
uint8_t type;
|
|
|
|
|
|
track_t i_track;
|
|
|
|
|
|
uint8_t seq;
|
2004-08-30 00:26:59 +00:00
|
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
|
|
|
|
uint8_t bDBC: 1; /* double byte character */
|
|
|
|
|
|
uint8_t block: 3; /* block number 0..7 */
|
2004-07-09 01:05:31 +00:00
|
|
|
|
uint8_t characterPosition:4; /* character position */
|
2004-08-30 00:26:59 +00:00
|
|
|
|
#else
|
|
|
|
|
|
uint8_t characterPosition:4; /* character position */
|
|
|
|
|
|
uint8_t block :3; /* block number 0..7 */
|
|
|
|
|
|
uint8_t bDBC :1; /* double byte character */
|
|
|
|
|
|
#endif
|
|
|
|
|
|
char text[CDIO_CDTEXT_MAX_TEXT_DATA];
|
2004-07-09 01:05:31 +00:00
|
|
|
|
uint8_t crc[2];
|
|
|
|
|
|
} GNUC_PACKED;
|
|
|
|
|
|
|
|
|
|
|
|
PRAGMA_END_PACKED
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct CDText_data CDText_data_t;
|
|
|
|
|
|
|
2004-07-17 08:59:44 +00:00
|
|
|
|
typedef void (*set_cdtext_field_fn_t) (void *user_data, track_t i_track,
|
|
|
|
|
|
track_t i_first_track,
|
|
|
|
|
|
cdtext_field_t field,
|
|
|
|
|
|
const char *buffer);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
Internal routine to parse all CD-TEXT data retrieved.
|
|
|
|
|
|
*/
|
|
|
|
|
|
bool cdtext_data_init(void *user_data, track_t i_first_track,
|
2004-09-03 23:20:11 +00:00
|
|
|
|
unsigned char *wdata,
|
2004-07-17 08:59:44 +00:00
|
|
|
|
set_cdtext_field_fn_t set_cdtext_field_fn);
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-07-09 01:05:31 +00:00
|
|
|
|
#endif /* __CDIO_CDTEXT_PRIVATE_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
* Local variables:
|
|
|
|
|
|
* c-file-style: "gnu"
|
|
|
|
|
|
* tab-width: 8
|
|
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
|
|
* End:
|
|
|
|
|
|
*/
|