libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
optical.h
Go to the documentation of this file.
1/*
2 * This file is part of the Aaru Data Preservation Suite.
3 * Copyright (c) 2019-2025 Natalia Portillo.
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 * */
18
19#ifndef LIBAARUFORMAT_OPTICAL_H
20#define LIBAARUFORMAT_OPTICAL_H
21
22#pragma pack(push, 1)
23
57
61 typedef struct TracksHeader
62{
63 uint32_t identifier;
64 uint16_t entries;
65 uint64_t crc64;
66} TracksHeader;
67
71 typedef struct TrackEntry
72{
73 uint8_t sequence;
74 uint8_t type;
75 int64_t start;
76 int64_t end;
77 int64_t pregap;
78 uint8_t session;
79 uint8_t isrc[13];
80 uint8_t flags;
81} TrackEntry;
82
83#pragma pack(pop)
84
85#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