burn_session_set_cdtext

Function burn_session_set_cdtext 

Source
pub unsafe extern "C" fn burn_session_set_cdtext(
    s: *mut burn_session,
    block: c_int,
    pack_type: c_int,
    pack_type_name: *mut c_char,
    payload: *mut c_uchar,
    length: c_int,
    flag: c_int,
) -> c_int
Expand description

Attach text or binary data as CD-TEXT attributes to a session. They can be used to generate CD-TEXT packs by burn_cdtext_from_session() or to write CD-TEXT packs into the lead-in of a CD SAO session. The latter happens only if no array of CD-TEXT packs is attached to the write options by burn_write_opts_set_leadin_text(). For details of the CD-TEXT format and of the payload content, see file doc/cdtext.txt .

@param s Session where to attach CD-TEXT attribute

@param block Number of the language block in which the attribute shall appear. Possible values: 0 to 7.

@param pack_type Pack type number. 0x80 to 0x8e. Used if pack_type_name is NULL or empty text. Else submit 0 and a name. Pack type 0x8f is generated automatically and may not be set by applications.

@param pack_type_name The pack type by name. Defined names are: 0x80 = "TITLE" 0x81 = "PERFORMER" 0x82 = "SONGWRITER" 0x83 = "COMPOSER" 0x84 = "ARRANGER" 0x85 = "MESSAGE" 0x86 = "DISCID" 0x87 = "GENRE" 0x88 = "TOC" 0x89 = "TOC2" 0x8d = "CLOSED" 0x8e = "UPC_ISRC" Names are recognized uppercase and lowercase.

@param payload Text or binary bytes. The data will be copied to session-internal memory. Pack types 0x80 to 0x85 contain 0-terminated cleartext encoded according to the block’s Character Code. If double byte characters are used, then two 0-bytes terminate the cleartext. Pack type 0x86 is 0-terminated ASCII cleartext. Pack type 0x87 consists of two byte big-endian Genre code (see below BURN_CDTEXT_GENRE_LIST), and 0-terminated ASCII cleartext of genre description. Pack type 0x88 mirrors the session table-of-content. Pack type 0x89 is not understood yet. Pack types 0x8a to 0x8c are reserved. Pack type 0x8d contains ISO-8859-1 cleartext which is not to be shown by commercial audio CD players. Pack type 0x8e is ASCII cleartext with UPC/EAN code.

@param length Number of bytes in payload. Including terminating 0-bytes.

@param flag Bitfield for control purposes. bit0= payload contains double byte characters (with character code 0x80 MS-JIS japanese Kanji)

@return > 0 indicates success , <= 0 is failure

@since 1.2.0