Start to merge in cue parsing from cuetools. Also moves forward CDTEXT
from a different direction.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cdtext.h,v 1.1 2004/07/08 01:27:58 rocky Exp $
|
||||
$Id: cdtext.h,v 1.2 2004/07/09 01:05:31 rocky Exp $
|
||||
|
||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -28,49 +28,29 @@
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
|
||||
#define CDIO_CDTEXT_MAX_PACK_DATA 255
|
||||
#define CDIO_CDTEXT_MAX_TEXT_DATA 12
|
||||
typedef struct cdtext cdtext_t;
|
||||
|
||||
#define CDIO_CDTEXT_TITLE 0x80
|
||||
#define CDIO_CDTEXT_PERFORMER 0x81
|
||||
#define CDIO_CDTEXT_SONGWRITER 0x82
|
||||
#define CDIO_CDTEXT_COMPOSER 0x83
|
||||
#define CDIO_CDTEXT_ARRANGER 0x84
|
||||
#define CDIO_CDTEXT_MESSAGE 0x85
|
||||
#define CDIO_CDTEXT_DISCID 0x86
|
||||
#define CDIO_CDTEXT_GENRE 0x87
|
||||
/*! Initialize and allocate a new cdtext structure and return a
|
||||
pointer to that. When the structure is no longer needed, release the
|
||||
resources using cdtext_delete.
|
||||
*/
|
||||
cdtext_t *cdtext_init (void);
|
||||
|
||||
PRAGMA_BEGIN_PACKED
|
||||
/*! Free memory assocated with cdtext*/
|
||||
void cdtext_delete (cdtext_t *cdtext);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
/*!
|
||||
returns 0 if field is a CD-TEXT keyword, returns non-zero otherwise.
|
||||
*/
|
||||
int cdtext_is_keyword (char *key);
|
||||
|
||||
struct CDText_data
|
||||
{
|
||||
uint8_t type;
|
||||
track_t i_track;
|
||||
uint8_t seq;
|
||||
uint8_t characterPosition:4; /* character position */
|
||||
uint8_t block:3; /* block number 0..7 */
|
||||
uint8_t bDBC:1; /* double byte character */
|
||||
char text[12];
|
||||
uint8_t crc[2];
|
||||
} GNUC_PACKED;
|
||||
|
||||
PRAGMA_END_PACKED
|
||||
|
||||
typedef struct CDText_data CDText_data_t;
|
||||
|
||||
/**
|
||||
* Query the CDTEXT information
|
||||
*
|
||||
* @param cd The CD object to extract CDTEXT data from
|
||||
*
|
||||
* @return An allocated structure containing CDTEXT information found.
|
||||
* NULL is returned if there was a problem.
|
||||
/*!
|
||||
sets cdtext's keyword entry to field
|
||||
*/
|
||||
CDText_data_t *cdio_cdtext_query(const CdIo *cd);
|
||||
void cdtext_set (char *key, char *value, cdtext_t *cdtext);
|
||||
|
||||
char *cdtext_get (char *key, cdtext_t *cdtext);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user