libcdio  2.1.0
About: GNU libcdio is a library for CD-ROM and CD image access.
  Fossies Dox: libcdio-2.1.0.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

cdtext_private.h File Reference
#include <cdio/types.h>
Include dependency graph for cdtext_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cdtext_pack_s
 
struct  cdtext_blocksize_s
 
struct  cdtext_track_s
 
struct  cdtext_block_s
 
struct  cdtext_s
 

Macros

#define CDIO_CD_MAX_TRACKS   99 /* Largest CD track number */
 
#define CDTEXT_GET_LEN16(p)   (p[0]<<8) + p[1]
 

Typedefs

typedef enum cdtext_charcode_enum_s cdtext_charcode_enum_t
 
typedef struct cdtext_pack_s cdtext_pack_t
 
typedef struct cdtext_blocksize_s cdtext_blocksize_t
 

Enumerations

enum  cdtext_format_enum_t {
  CDTEXT_LEN_BINARY_MAX = 9216, CDTEXT_LEN_TEXTDATA = 12, CDTEXT_LEN_PACK = 18, CDTEXT_LEN_BLOCKSIZE = 36,
  CDTEXT_NUM_BLOCKS_MAX = 8, CDTEXT_NUM_TRACKS_MAX = 99 +1, CDTEXT_NUM_BLOCKPACKS_MAX = 255
}
 
enum  cdtext_packtype_enum_t {
  CDTEXT_PACK_TITLE = 0x80, CDTEXT_PACK_PERFORMER = 0x81, CDTEXT_PACK_SONGWRITER = 0x82, CDTEXT_PACK_COMPOSER = 0x83,
  CDTEXT_PACK_ARRANGER = 0x84, CDTEXT_PACK_MESSAGE = 0x85, CDTEXT_PACK_DISCID = 0x86, CDTEXT_PACK_GENRE = 0x87,
  CDTEXT_PACK_TOC = 0x88, CDTEXT_PACK_TOC2 = 0x89, CDTEXT_PACK_UPC = 0x8E, CDTEXT_PACK_BLOCKSIZE = 0x8F
}
 
enum  cdtext_charcode_enum_s { CDTEXT_CHARCODE_ISO_8859_1 = 0x00, CDTEXT_CHARCODE_ASCII = 0x01, CDTEXT_CHARCODE_SHIFT_JIS = 0x80 }
 

Functions

int cdtext_read_pack (cdtext_pack_t *pack, const uint8_t *data)
 
cdtext_field_t cdtext_is_field (const char *field)
 

Macro Definition Documentation

◆ CDIO_CD_MAX_TRACKS

#define CDIO_CD_MAX_TRACKS   99 /* Largest CD track number */

Definition at line 25 of file cdtext_private.h.

◆ CDTEXT_GET_LEN16

#define CDTEXT_GET_LEN16 (   p)    (p[0]<<8) + p[1]

Definition at line 28 of file cdtext_private.h.

Typedef Documentation

◆ cdtext_blocksize_t

Definition at line 106 of file cdtext_private.h.

◆ cdtext_charcode_enum_t

CD-Text character encodings

◆ cdtext_pack_t

typedef struct cdtext_pack_s cdtext_pack_t

Definition at line 105 of file cdtext_private.h.

Enumeration Type Documentation

◆ cdtext_charcode_enum_s

CD-Text character encodings

Enumerator
CDTEXT_CHARCODE_ISO_8859_1 

ISO-8859-1 (8 bit), Latin-1

CDTEXT_CHARCODE_ASCII 

ASCII (7 bit)

CDTEXT_CHARCODE_SHIFT_JIS 

Shift_JIS (double byte), JIS X 0208 Appendix 1

Definition at line 62 of file cdtext_private.h.

◆ cdtext_format_enum_t

Enumerator
CDTEXT_LEN_BINARY_MAX 
CDTEXT_LEN_TEXTDATA 
CDTEXT_LEN_PACK 
CDTEXT_LEN_BLOCKSIZE 
CDTEXT_NUM_BLOCKS_MAX 
CDTEXT_NUM_TRACKS_MAX 
CDTEXT_NUM_BLOCKPACKS_MAX 

Definition at line 31 of file cdtext_private.h.

◆ cdtext_packtype_enum_t

From table J.2 - Pack Type Indicator Definitions from Working Draft NCITS XXX T10/1364-D Revision 10G. November 12, 2001.

Enumerator
CDTEXT_PACK_TITLE 
CDTEXT_PACK_PERFORMER 
CDTEXT_PACK_SONGWRITER 
CDTEXT_PACK_COMPOSER 
CDTEXT_PACK_ARRANGER 
CDTEXT_PACK_MESSAGE 
CDTEXT_PACK_DISCID 
CDTEXT_PACK_GENRE 
CDTEXT_PACK_TOC 
CDTEXT_PACK_TOC2 
CDTEXT_PACK_UPC 
CDTEXT_PACK_BLOCKSIZE 

Definition at line 45 of file cdtext_private.h.

Function Documentation

◆ cdtext_is_field()

cdtext_field_t cdtext_is_field ( const char *  key)

returns enum of field if key is a CD-Text keyword, returns CDTEXT_FIELD_INVALID otherwise.

Returns associated cdtext_field_t if field is a CD-TEXT keyword.

Internal function.

Parameters
keykey to test
Returns
CDTEXT_INVALID if the given keyword is invalid

Definition at line 520 of file cdtext.c.

References cdtext_field, CDTEXT_FIELD_INVALID, i, and MAX_CDTEXT_FIELDS.

Referenced by parse_cuefile(), and parse_tocfile().

◆ cdtext_read_pack()

int cdtext_read_pack ( cdtext_pack_t p_pack,
const uint8_t *  p_data 
)

Fills cdtext_pack_t with information read from p_data

Parameters
p_packout
p_datain

Definition at line 865 of file cdtext.c.

References cdtext_pack_s::block, cdtext_pack_s::char_pos, cdtext_pack_s::crc, cdtext_pack_s::db_chars, cdtext_pack_s::i_track, cdtext_pack_s::seq, cdtext_pack_s::text, and cdtext_pack_s::type.

Referenced by cdtext_data_init().