Loading...
Searching...
No Matches
optical.h
Go to the documentation of this file.
/*
* This file is part of the Aaru Data Preservation Suite.
* Copyright (c) 2019-2026 Natalia Portillo.
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
* */
#ifndef LIBAARUFORMAT_OPTICAL_H
#define LIBAARUFORMAT_OPTICAL_H
#pragma pack(push, 1)
typedef struct TracksHeader
{
uint32_t identifier;
uint16_t entries;
uint64_t crc64;
} TracksHeader;
typedef struct TrackEntry
{
uint8_t sequence;
uint8_t type;
int64_t start;
int64_t end;
int64_t pregap;
uint8_t session;
uint8_t isrc[13];
uint8_t flags;
} TrackEntry;
#pragma pack(pop)
#endif // LIBAARUFORMAT_OPTICAL_H
TrackEntry
Single optical disc track descriptor (sequence, type, LBAs, session, ISRC, flags).
Definition optical.h:72
TrackEntry::session
uint8_t session
Session number (1-based). 1 for single-session discs.
Definition optical.h:78
TrackEntry::flags
uint8_t flags
Control / attribute bitfield (see file documentation for suggested bit mapping).
Definition optical.h:80
TrackEntry::end
int64_t end
Inclusive ending LBA of the track.
Definition optical.h:76
TrackEntry::pregap
int64_t pregap
Pre-gap length in sectors preceding track start (0 if none).
Definition optical.h:77
TrackEntry::sequence
uint8_t sequence
Track number (1..99 typical for CD audio/data). 0 may indicate placeholder/non-standard.
Definition optical.h:73
TrackEntry::start
int64_t start
Inclusive starting LBA of the track.
Definition optical.h:75
TrackEntry::type
uint8_t type
Track type (value from TrackType).
Definition optical.h:74
TrackEntry::isrc
uint8_t isrc[13]
ISRC raw 13-byte code (no null terminator). All zeros if not present.
Definition optical.h:79
TracksHeader
Header for an optical tracks block listing track entries.
Definition optical.h:62
TracksHeader::identifier
uint32_t identifier
Block identifier (must be BlockType::TracksBlock).
Definition optical.h:63
TracksHeader::entries
uint16_t entries
Number of TrackEntry records following this header.
Definition optical.h:64
TracksHeader::crc64
uint64_t crc64
CRC64-ECMA of the TrackEntry array (header excluded, legacy byte-swap for early versions).
Definition optical.h:65