mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
[lib] Split structures in separate headers.
This commit is contained in:
@@ -98,7 +98,15 @@ add_library(aaruformat SHARED include/aaruformat/consts.h include/aaruformat/enu
|
|||||||
src/close.c include/aaruformat/errors.h src/read.c include/aaruformat/crc64.h src/cst.c src/ecc_cd.c src/helpers.c
|
src/close.c include/aaruformat/errors.h src/read.c include/aaruformat/crc64.h src/cst.c src/ecc_cd.c src/helpers.c
|
||||||
src/simd.c include/aaruformat/simd.h src/crc64/crc64.c src/crc64/crc64_clmul.c src/crc64/crc64_vmull.c
|
src/simd.c include/aaruformat/simd.h src/crc64/crc64.c src/crc64/crc64_clmul.c src/crc64/crc64_vmull.c
|
||||||
src/crc64/arm_vmull.c src/crc64/arm_vmull.h src/spamsum.c include/aaruformat/spamsum.h include/aaruformat/flac.h
|
src/crc64/arm_vmull.c src/crc64/arm_vmull.h src/spamsum.c include/aaruformat/spamsum.h include/aaruformat/flac.h
|
||||||
src/flac.c src/lzma.c src/lru.c include/aaruformat/lru.h include/aaruformat/endian.h src/verify.c)
|
src/flac.c src/lzma.c src/lru.c include/aaruformat/lru.h include/aaruformat/endian.h src/verify.c
|
||||||
|
include/aaruformat/structs/header.h
|
||||||
|
include/aaruformat/structs/ddt.h
|
||||||
|
include/aaruformat/structs/index.h
|
||||||
|
include/aaruformat/structs/data.h
|
||||||
|
include/aaruformat/structs/metadata.h
|
||||||
|
include/aaruformat/structs/dump.h
|
||||||
|
include/aaruformat/structs/checksum.h
|
||||||
|
include/aaruformat/structs/optical.h)
|
||||||
|
|
||||||
include_directories(include include/aaruformat)
|
include_directories(include include/aaruformat)
|
||||||
|
|
||||||
|
|||||||
@@ -117,4 +117,17 @@ typedef struct DumpExtent
|
|||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
typedef struct Crc64Context {
|
||||||
|
uint64_t finalSeed;
|
||||||
|
uint64_t table[256];
|
||||||
|
uint64_t hashInt;
|
||||||
|
} Crc64Context;
|
||||||
|
|
||||||
|
typedef struct CdEccContext {
|
||||||
|
bool initedEdc;
|
||||||
|
uint8_t *eccBTable;
|
||||||
|
uint8_t *eccFTable;
|
||||||
|
uint32_t *edcTable;
|
||||||
|
} CdEccContext;
|
||||||
|
|
||||||
#endif // LIBAARUFORMAT_CONTEXT_H
|
#endif // LIBAARUFORMAT_CONTEXT_H
|
||||||
|
|||||||
@@ -24,332 +24,19 @@
|
|||||||
#ifndef LIBAARUFORMAT_STRUCTS_H
|
#ifndef LIBAARUFORMAT_STRUCTS_H
|
||||||
#define LIBAARUFORMAT_STRUCTS_H
|
#define LIBAARUFORMAT_STRUCTS_H
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
|
||||||
|
|
||||||
#include <aaru.h>
|
#include <aaru.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
|
#include "structs/checksum.h"
|
||||||
/**Header, at start of file */
|
#include "structs/data.h"
|
||||||
typedef struct AaruHeader
|
#include "structs/ddt.h"
|
||||||
{
|
#include "structs/dump.h"
|
||||||
/**Header identifier, <see cref="AARU_MAGIC" /> */
|
#include "structs/header.h"
|
||||||
uint64_t identifier;
|
#include "structs/index.h"
|
||||||
/**UTF-16LE name of the application that created the image */
|
#include "structs/metadata.h"
|
||||||
uint8_t application[64];
|
#include "structs/optical.h"
|
||||||
/**Image format major version. A new major version means a possibly incompatible change of format */
|
|
||||||
uint8_t imageMajorVersion;
|
|
||||||
/**Image format minor version. A new minor version indicates a compatible change of format */
|
|
||||||
uint8_t imageMinorVersion;
|
|
||||||
/**Major version of the application that created the image */
|
|
||||||
uint8_t applicationMajorVersion;
|
|
||||||
/**Minor version of the application that created the image */
|
|
||||||
uint8_t applicationMinorVersion;
|
|
||||||
/**Type of media contained on image */
|
|
||||||
uint32_t mediaType;
|
|
||||||
/**Offset to index */
|
|
||||||
uint64_t indexOffset;
|
|
||||||
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image creation time */
|
|
||||||
int64_t creationTime;
|
|
||||||
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image last written time */
|
|
||||||
int64_t lastWrittenTime;
|
|
||||||
} AaruHeader;
|
|
||||||
|
|
||||||
#define HEADER_APP_NAME_LEN 64
|
|
||||||
#define GUID_SIZE 16
|
|
||||||
|
|
||||||
/**Header, at start of file */
|
|
||||||
typedef struct AaruHeaderV2 {
|
|
||||||
/**Header identifier, see AARU_MAGIC */
|
|
||||||
uint64_t identifier;
|
|
||||||
/**UTF-16LE name of the application that created the image */
|
|
||||||
uint8_t application[HEADER_APP_NAME_LEN];
|
|
||||||
/**Image format major version. A new major version means a possibly incompatible change of format */
|
|
||||||
uint8_t imageMajorVersion;
|
|
||||||
/**Image format minor version. A new minor version indicates a compatible change of format */
|
|
||||||
uint8_t imageMinorVersion;
|
|
||||||
/**Major version of the application that created the image */
|
|
||||||
uint8_t applicationMajorVersion;
|
|
||||||
/**Minor version of the application that created the image */
|
|
||||||
uint8_t applicationMinorVersion;
|
|
||||||
/**Type of media contained on image */
|
|
||||||
uint32_t mediaType;
|
|
||||||
/**Offset to index */
|
|
||||||
uint64_t indexOffset;
|
|
||||||
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image creation time */
|
|
||||||
int64_t creationTime;
|
|
||||||
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image last written time */
|
|
||||||
int64_t lastWrittenTime;
|
|
||||||
/**Unique identifier that allows children images to recognize and find this image.*/
|
|
||||||
uint8_t guid[GUID_SIZE];
|
|
||||||
/**Block alignment shift. All blocks in the image are aligned at 2 << blockAlignmentShift bytes */
|
|
||||||
uint8_t blockAlignmentShift;
|
|
||||||
/**Data shift. All data blocks in the image contain 2 << dataShift items at most */
|
|
||||||
uint8_t dataShift;
|
|
||||||
/**Table shift. All deduplication tables in the image use this shift to calculate the position of an item */
|
|
||||||
uint8_t tableShift;
|
|
||||||
/**Features used in this image that if unsupported are still compatible for reading and writing implementations */
|
|
||||||
uint64_t featureCompatible;
|
|
||||||
/**Features used in this image that if unsupported are still compatible for reading implementations but not for writing */
|
|
||||||
uint64_t featureCompatibleRo;
|
|
||||||
/**Featured used in this image that if unsupported prevent reading or writing the image*/
|
|
||||||
uint64_t featureIncompatible;
|
|
||||||
} AaruHeaderV2;
|
|
||||||
|
|
||||||
/**Header for a deduplication table. Table follows it */
|
|
||||||
typedef struct DdtHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.DeDuplicationTable" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
/**Type of data pointed by this DDT */
|
|
||||||
uint32_t type;
|
|
||||||
/**Compression algorithm used to compress the DDT */
|
|
||||||
uint16_t compression;
|
|
||||||
/**Each entry is ((uint8_t offset in file) << shift) + (sector offset in block) */
|
|
||||||
uint8_t shift;
|
|
||||||
/**How many entries are in the table */
|
|
||||||
uint64_t entries;
|
|
||||||
/**Compressed length for the DDT */
|
|
||||||
uint64_t cmpLength;
|
|
||||||
/**Uncompressed length for the DDT */
|
|
||||||
uint64_t length;
|
|
||||||
/**CRC64-ECMA of the compressed DDT */
|
|
||||||
uint64_t cmpCrc64;
|
|
||||||
/**CRC64-ECMA of the uncompressed DDT */
|
|
||||||
uint64_t crc64;
|
|
||||||
} DdtHeader;
|
|
||||||
|
|
||||||
/**Header for the index, followed by entries */
|
|
||||||
typedef struct IndexHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.Index" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
/**How many entries follow this header */
|
|
||||||
uint16_t entries;
|
|
||||||
/**CRC64-ECMA of the index */
|
|
||||||
uint64_t crc64;
|
|
||||||
} IndexHeader;
|
|
||||||
|
|
||||||
/**Index entry */
|
|
||||||
typedef struct IndexEntry
|
|
||||||
{
|
|
||||||
/**Type of item pointed by this entry */
|
|
||||||
uint32_t blockType;
|
|
||||||
/**Type of data contained by the block pointed by this entry */
|
|
||||||
uint16_t dataType;
|
|
||||||
/**Offset in file where item is stored */
|
|
||||||
uint64_t offset;
|
|
||||||
} IndexEntry;
|
|
||||||
|
|
||||||
/**Block header, precedes block data */
|
|
||||||
typedef struct BlockHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.DataBlock" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
/**Type of data contained by this block */
|
|
||||||
uint32_t type;
|
|
||||||
/**Compression algorithm used to compress the block */
|
|
||||||
uint16_t compression;
|
|
||||||
/**Size in uint8_ts of each sector contained in this block */
|
|
||||||
uint32_t sectorSize;
|
|
||||||
/**Compressed length for the block */
|
|
||||||
uint32_t cmpLength;
|
|
||||||
/**Uncompressed length for the block */
|
|
||||||
uint32_t length;
|
|
||||||
/**CRC64-ECMA of the compressed block */
|
|
||||||
uint64_t cmpCrc64;
|
|
||||||
/**CRC64-ECMA of the uncompressed block */
|
|
||||||
uint64_t crc64;
|
|
||||||
} BlockHeader;
|
|
||||||
|
|
||||||
/**Geometry block, contains physical geometry information */
|
|
||||||
typedef struct GeometryBlockHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.GeometryBlock" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
uint32_t cylinders;
|
|
||||||
uint32_t heads;
|
|
||||||
uint32_t sectorsPerTrack;
|
|
||||||
} GeometryBlockHeader;
|
|
||||||
|
|
||||||
/**Metadata block, contains metadata */
|
|
||||||
typedef struct MetadataBlockHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.MetadataBlock" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
/**Size in uint8_ts of this whole metadata block */
|
|
||||||
uint32_t blockSize;
|
|
||||||
/**Sequence of media set this media beint64_ts to */
|
|
||||||
int32_t mediaSequence;
|
|
||||||
/**Total number of media on the media set this media beint64_ts to */
|
|
||||||
int32_t lastMediaSequence;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t creatorOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t creatorLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t commentsOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t commentsLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t mediaTitleOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t mediaTitleLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t mediaManufacturerOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t mediaManufacturerLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t mediaModelOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t mediaModelLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t mediaSerialNumberOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t mediaSerialNumberLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t mediaBarcodeOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t mediaBarcodeLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t mediaPartNumberOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t mediaPartNumberLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t driveManufacturerOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t driveManufacturerLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t driveModelOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t driveModelLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t driveSerialNumberOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t driveSerialNumberLength;
|
|
||||||
/**Offset to start of creator string from start of this block */
|
|
||||||
uint32_t driveFirmwareRevisionOffset;
|
|
||||||
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
|
||||||
uint32_t driveFirmwareRevisionLength;
|
|
||||||
} MetadataBlockHeader;
|
|
||||||
|
|
||||||
/**Contains list of optical disc tracks */
|
|
||||||
typedef struct TracksHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.TracksBlock" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
/**How many entries follow this header */
|
|
||||||
uint16_t entries;
|
|
||||||
/**CRC64-ECMA of the block */
|
|
||||||
uint64_t crc64;
|
|
||||||
} TracksHeader;
|
|
||||||
|
|
||||||
/**Optical disc track */
|
|
||||||
typedef struct TrackEntry
|
|
||||||
{
|
|
||||||
/**Track sequence */
|
|
||||||
uint8_t sequence;
|
|
||||||
/**Track type */
|
|
||||||
uint8_t type;
|
|
||||||
/**Track starting LBA */
|
|
||||||
int64_t start;
|
|
||||||
/**Track last LBA */
|
|
||||||
int64_t end;
|
|
||||||
/**Track pregap in sectors */
|
|
||||||
int64_t pregap;
|
|
||||||
/**Track session */
|
|
||||||
uint8_t session;
|
|
||||||
/**Track's ISRC in ASCII */
|
|
||||||
uint8_t isrc[13];
|
|
||||||
/**Track flags */
|
|
||||||
uint8_t flags;
|
|
||||||
} TrackEntry;
|
|
||||||
|
|
||||||
/**Geometry block, contains physical geometry information */
|
|
||||||
typedef struct CicmMetadataBlock
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.CicmBlock" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
uint32_t length;
|
|
||||||
} CicmMetadataBlock;
|
|
||||||
|
|
||||||
/**Dump hardware block, contains a list of hardware used to dump the media on this image */
|
|
||||||
typedef struct DumpHardwareHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.DumpHardwareBlock" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
/**How many entries follow this header */
|
|
||||||
uint16_t entries;
|
|
||||||
/**Size of the whole block, not including this header, in uint8_ts */
|
|
||||||
uint32_t length;
|
|
||||||
/**CRC64-ECMA of the block */
|
|
||||||
uint64_t crc64;
|
|
||||||
} DumpHardwareHeader;
|
|
||||||
|
|
||||||
/**Dump hardware entry, contains length of strings that follow, in the same order as the length, this structure */
|
|
||||||
typedef struct DumpHardwareEntry
|
|
||||||
{
|
|
||||||
/**Length of UTF-8 manufacturer string */
|
|
||||||
uint32_t manufacturerLength;
|
|
||||||
/**Length of UTF-8 model string */
|
|
||||||
uint32_t modelLength;
|
|
||||||
/**Length of UTF-8 revision string */
|
|
||||||
uint32_t revisionLength;
|
|
||||||
/**Length of UTF-8 firmware version string */
|
|
||||||
uint32_t firmwareLength;
|
|
||||||
/**Length of UTF-8 serial string */
|
|
||||||
uint32_t serialLength;
|
|
||||||
/**Length of UTF-8 software name string */
|
|
||||||
uint32_t softwareNameLength;
|
|
||||||
/**Length of UTF-8 software version string */
|
|
||||||
uint32_t softwareVersionLength;
|
|
||||||
/**Length of UTF-8 software operating system string */
|
|
||||||
uint32_t softwareOperatingSystemLength;
|
|
||||||
/**How many extents are after the strings */
|
|
||||||
uint32_t extents;
|
|
||||||
} DumpHardwareEntry;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checksum block, contains a checksum of all user data sectors (except for optical discs that is 2352 uint8_ts raw
|
|
||||||
* sector if available
|
|
||||||
* */
|
|
||||||
typedef struct ChecksumHeader
|
|
||||||
{
|
|
||||||
/**Identifier, <see cref="BlockType.ChecksumBlock" /> */
|
|
||||||
uint32_t identifier;
|
|
||||||
/**Length in uint8_ts of the block */
|
|
||||||
uint32_t length;
|
|
||||||
/**How many checksums follow */
|
|
||||||
uint8_t entries;
|
|
||||||
} ChecksumHeader;
|
|
||||||
|
|
||||||
/**Checksum entry, followed by checksum data itself */
|
|
||||||
typedef struct ChecksumEntry
|
|
||||||
{
|
|
||||||
/**Checksum algorithm */
|
|
||||||
uint8_t type;
|
|
||||||
/**Length in uint8_ts of checksum that follows this structure */
|
|
||||||
uint32_t length;
|
|
||||||
} ChecksumEntry;
|
|
||||||
|
|
||||||
typedef struct Crc64Context
|
|
||||||
{
|
|
||||||
uint64_t finalSeed;
|
|
||||||
uint64_t table[256];
|
|
||||||
uint64_t hashInt;
|
|
||||||
} Crc64Context;
|
|
||||||
|
|
||||||
typedef struct CdEccContext
|
|
||||||
{
|
|
||||||
bool initedEdc;
|
|
||||||
uint8_t *eccBTable;
|
|
||||||
uint8_t *eccFTable;
|
|
||||||
uint32_t *edcTable;
|
|
||||||
} CdEccContext;
|
|
||||||
|
|
||||||
#pragma pack(pop)
|
|
||||||
|
|
||||||
#endif // LIBAARUFORMAT_STRUCTS_H
|
#endif // LIBAARUFORMAT_STRUCTS_H
|
||||||
|
|
||||||
|
|||||||
47
include/aaruformat/structs/checksum.h
Normal file
47
include/aaruformat/structs/checksum.h
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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_CHECKSUM_H
|
||||||
|
#define LIBAARUFORMAT_CHECKSUM_H
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checksum block, contains a checksum of all user data sectors (except for optical discs that is 2352 uint8_ts raw
|
||||||
|
* sector if available
|
||||||
|
* */
|
||||||
|
typedef struct ChecksumHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.ChecksumBlock" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
/**Length in uint8_ts of the block */
|
||||||
|
uint32_t length;
|
||||||
|
/**How many checksums follow */
|
||||||
|
uint8_t entries;
|
||||||
|
} ChecksumHeader;
|
||||||
|
|
||||||
|
/**Checksum entry, followed by checksum data itself */
|
||||||
|
typedef struct ChecksumEntry {
|
||||||
|
/**Checksum algorithm */
|
||||||
|
uint8_t type;
|
||||||
|
/**Length in uint8_ts of checksum that follows this structure */
|
||||||
|
uint32_t length;
|
||||||
|
} ChecksumEntry;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_CHECKSUM_H
|
||||||
55
include/aaruformat/structs/data.h
Normal file
55
include/aaruformat/structs/data.h
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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_DATA_H
|
||||||
|
#define LIBAARUFORMAT_DATA_H
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
/**Block header, precedes block data */
|
||||||
|
typedef struct BlockHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.DataBlock" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
/**Type of data contained by this block */
|
||||||
|
uint32_t type;
|
||||||
|
/**Compression algorithm used to compress the block */
|
||||||
|
uint16_t compression;
|
||||||
|
/**Size in uint8_ts of each sector contained in this block */
|
||||||
|
uint32_t sectorSize;
|
||||||
|
/**Compressed length for the block */
|
||||||
|
uint32_t cmpLength;
|
||||||
|
/**Uncompressed length for the block */
|
||||||
|
uint32_t length;
|
||||||
|
/**CRC64-ECMA of the compressed block */
|
||||||
|
uint64_t cmpCrc64;
|
||||||
|
/**CRC64-ECMA of the uncompressed block */
|
||||||
|
uint64_t crc64;
|
||||||
|
} BlockHeader;
|
||||||
|
|
||||||
|
/**Geometry block, contains physical geometry information */
|
||||||
|
typedef struct GeometryBlockHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.GeometryBlock" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
uint32_t cylinders;
|
||||||
|
uint32_t heads;
|
||||||
|
uint32_t sectorsPerTrack;
|
||||||
|
} GeometryBlockHeader;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_DATA_H
|
||||||
48
include/aaruformat/structs/ddt.h
Normal file
48
include/aaruformat/structs/ddt.h
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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_DDT_H
|
||||||
|
#define LIBAARUFORMAT_DDT_H
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
/**Header for a deduplication table. Table follows it */
|
||||||
|
typedef struct DdtHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.DeDuplicationTable" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
/**Type of data pointed by this DDT */
|
||||||
|
uint32_t type;
|
||||||
|
/**Compression algorithm used to compress the DDT */
|
||||||
|
uint16_t compression;
|
||||||
|
/**Each entry is ((uint8_t offset in file) << shift) + (sector offset in block) */
|
||||||
|
uint8_t shift;
|
||||||
|
/**How many entries are in the table */
|
||||||
|
uint64_t entries;
|
||||||
|
/**Compressed length for the DDT */
|
||||||
|
uint64_t cmpLength;
|
||||||
|
/**Uncompressed length for the DDT */
|
||||||
|
uint64_t length;
|
||||||
|
/**CRC64-ECMA of the compressed DDT */
|
||||||
|
uint64_t cmpCrc64;
|
||||||
|
/**CRC64-ECMA of the uncompressed DDT */
|
||||||
|
uint64_t crc64;
|
||||||
|
} DdtHeader;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_DDT_H
|
||||||
60
include/aaruformat/structs/dump.h
Normal file
60
include/aaruformat/structs/dump.h
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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_DUMP_H
|
||||||
|
#define LIBAARUFORMAT_DUMP_H
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
/**Dump hardware block, contains a list of hardware used to dump the media on this image */
|
||||||
|
typedef struct DumpHardwareHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.DumpHardwareBlock" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
/**How many entries follow this header */
|
||||||
|
uint16_t entries;
|
||||||
|
/**Size of the whole block, not including this header, in uint8_ts */
|
||||||
|
uint32_t length;
|
||||||
|
/**CRC64-ECMA of the block */
|
||||||
|
uint64_t crc64;
|
||||||
|
} DumpHardwareHeader;
|
||||||
|
|
||||||
|
/**Dump hardware entry, contains length of strings that follow, in the same order as the length, this structure */
|
||||||
|
typedef struct DumpHardwareEntry {
|
||||||
|
/**Length of UTF-8 manufacturer string */
|
||||||
|
uint32_t manufacturerLength;
|
||||||
|
/**Length of UTF-8 model string */
|
||||||
|
uint32_t modelLength;
|
||||||
|
/**Length of UTF-8 revision string */
|
||||||
|
uint32_t revisionLength;
|
||||||
|
/**Length of UTF-8 firmware version string */
|
||||||
|
uint32_t firmwareLength;
|
||||||
|
/**Length of UTF-8 serial string */
|
||||||
|
uint32_t serialLength;
|
||||||
|
/**Length of UTF-8 software name string */
|
||||||
|
uint32_t softwareNameLength;
|
||||||
|
/**Length of UTF-8 software version string */
|
||||||
|
uint32_t softwareVersionLength;
|
||||||
|
/**Length of UTF-8 software operating system string */
|
||||||
|
uint32_t softwareOperatingSystemLength;
|
||||||
|
/**How many extents are after the strings */
|
||||||
|
uint32_t extents;
|
||||||
|
} DumpHardwareEntry;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_DUMP_H
|
||||||
91
include/aaruformat/structs/header.h
Normal file
91
include/aaruformat/structs/header.h
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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_HEADER_H
|
||||||
|
#define LIBAARUFORMAT_HEADER_H
|
||||||
|
|
||||||
|
#define AARU_HEADER_APP_NAME_LEN 64
|
||||||
|
#define GUID_SIZE 16
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
/**Header, at start of file */
|
||||||
|
typedef struct AaruHeader {
|
||||||
|
/**Header identifier, <see cref="AARU_MAGIC" /> */
|
||||||
|
uint64_t identifier;
|
||||||
|
/**UTF-16LE name of the application that created the image */
|
||||||
|
uint8_t application[AARU_HEADER_APP_NAME_LEN];
|
||||||
|
/**Image format major version. A new major version means a possibly incompatible change of format */
|
||||||
|
uint8_t imageMajorVersion;
|
||||||
|
/**Image format minor version. A new minor version indicates a compatible change of format */
|
||||||
|
uint8_t imageMinorVersion;
|
||||||
|
/**Major version of the application that created the image */
|
||||||
|
uint8_t applicationMajorVersion;
|
||||||
|
/**Minor version of the application that created the image */
|
||||||
|
uint8_t applicationMinorVersion;
|
||||||
|
/**Type of media contained on image */
|
||||||
|
uint32_t mediaType;
|
||||||
|
/**Offset to index */
|
||||||
|
uint64_t indexOffset;
|
||||||
|
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image creation time */
|
||||||
|
int64_t creationTime;
|
||||||
|
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image last written time */
|
||||||
|
int64_t lastWrittenTime;
|
||||||
|
} AaruHeader;
|
||||||
|
|
||||||
|
/**Header, at start of file */
|
||||||
|
typedef struct AaruHeaderV2 {
|
||||||
|
/**Header identifier, see AARU_MAGIC */
|
||||||
|
uint64_t identifier;
|
||||||
|
/**UTF-16LE name of the application that created the image */
|
||||||
|
uint8_t application[AARU_HEADER_APP_NAME_LEN];
|
||||||
|
/**Image format major version. A new major version means a possibly incompatible change of format */
|
||||||
|
uint8_t imageMajorVersion;
|
||||||
|
/**Image format minor version. A new minor version indicates a compatible change of format */
|
||||||
|
uint8_t imageMinorVersion;
|
||||||
|
/**Major version of the application that created the image */
|
||||||
|
uint8_t applicationMajorVersion;
|
||||||
|
/**Minor version of the application that created the image */
|
||||||
|
uint8_t applicationMinorVersion;
|
||||||
|
/**Type of media contained on image */
|
||||||
|
uint32_t mediaType;
|
||||||
|
/**Offset to index */
|
||||||
|
uint64_t indexOffset;
|
||||||
|
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image creation time */
|
||||||
|
int64_t creationTime;
|
||||||
|
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image last written time */
|
||||||
|
int64_t lastWrittenTime;
|
||||||
|
/**Unique identifier that allows children images to recognize and find this image.*/
|
||||||
|
uint8_t guid[GUID_SIZE];
|
||||||
|
/**Block alignment shift. All blocks in the image are aligned at 2 << blockAlignmentShift bytes */
|
||||||
|
uint8_t blockAlignmentShift;
|
||||||
|
/**Data shift. All data blocks in the image contain 2 << dataShift items at most */
|
||||||
|
uint8_t dataShift;
|
||||||
|
/**Table shift. All deduplication tables in the image use this shift to calculate the position of an item */
|
||||||
|
uint8_t tableShift;
|
||||||
|
/**Features used in this image that if unsupported are still compatible for reading and writing implementations */
|
||||||
|
uint64_t featureCompatible;
|
||||||
|
/**Features used in this image that if unsupported are still compatible for reading implementations but not for writing */
|
||||||
|
uint64_t featureCompatibleRo;
|
||||||
|
/**Featured used in this image that if unsupported prevent reading or writing the image*/
|
||||||
|
uint64_t featureIncompatible;
|
||||||
|
} AaruHeaderV2;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_HEADER_H
|
||||||
46
include/aaruformat/structs/index.h
Normal file
46
include/aaruformat/structs/index.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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_INDEX_H
|
||||||
|
#define LIBAARUFORMAT_INDEX_H
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
/**Header for the index, followed by entries */
|
||||||
|
typedef struct IndexHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.Index" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
/**How many entries follow this header */
|
||||||
|
uint16_t entries;
|
||||||
|
/**CRC64-ECMA of the index */
|
||||||
|
uint64_t crc64;
|
||||||
|
} IndexHeader;
|
||||||
|
|
||||||
|
/**Index entry */
|
||||||
|
typedef struct IndexEntry {
|
||||||
|
/**Type of item pointed by this entry */
|
||||||
|
uint32_t blockType;
|
||||||
|
/**Type of data contained by the block pointed by this entry */
|
||||||
|
uint16_t dataType;
|
||||||
|
/**Offset in file where item is stored */
|
||||||
|
uint64_t offset;
|
||||||
|
} IndexEntry;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_INDEX_H
|
||||||
93
include/aaruformat/structs/metadata.h
Normal file
93
include/aaruformat/structs/metadata.h
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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_METADATA_H
|
||||||
|
#define LIBAARUFORMAT_METADATA_H
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
/**Metadata block, contains metadata */
|
||||||
|
typedef struct MetadataBlockHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.MetadataBlock" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
/**Size in uint8_ts of this whole metadata block */
|
||||||
|
uint32_t blockSize;
|
||||||
|
/**Sequence of media set this media beint64_ts to */
|
||||||
|
int32_t mediaSequence;
|
||||||
|
/**Total number of media on the media set this media beint64_ts to */
|
||||||
|
int32_t lastMediaSequence;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t creatorOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t creatorLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t commentsOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t commentsLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t mediaTitleOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t mediaTitleLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t mediaManufacturerOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t mediaManufacturerLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t mediaModelOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t mediaModelLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t mediaSerialNumberOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t mediaSerialNumberLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t mediaBarcodeOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t mediaBarcodeLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t mediaPartNumberOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t mediaPartNumberLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t driveManufacturerOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t driveManufacturerLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t driveModelOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t driveModelLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t driveSerialNumberOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t driveSerialNumberLength;
|
||||||
|
/**Offset to start of creator string from start of this block */
|
||||||
|
uint32_t driveFirmwareRevisionOffset;
|
||||||
|
/**Length in uint8_ts of the null-terminated UTF-16LE creator string */
|
||||||
|
uint32_t driveFirmwareRevisionLength;
|
||||||
|
} MetadataBlockHeader;
|
||||||
|
|
||||||
|
/**Geometry block, contains physical geometry information */
|
||||||
|
typedef struct CicmMetadataBlock {
|
||||||
|
/**Identifier, <see cref="BlockType.CicmBlock" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
uint32_t length;
|
||||||
|
} CicmMetadataBlock;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_METADATA_H
|
||||||
56
include/aaruformat/structs/optical.h
Normal file
56
include/aaruformat/structs/optical.h
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Aaru Data Preservation Suite.
|
||||||
|
* Copyright (c) 2019-2025 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)
|
||||||
|
|
||||||
|
/**Contains list of optical disc tracks */
|
||||||
|
typedef struct TracksHeader {
|
||||||
|
/**Identifier, <see cref="BlockType.TracksBlock" /> */
|
||||||
|
uint32_t identifier;
|
||||||
|
/**How many entries follow this header */
|
||||||
|
uint16_t entries;
|
||||||
|
/**CRC64-ECMA of the block */
|
||||||
|
uint64_t crc64;
|
||||||
|
} TracksHeader;
|
||||||
|
|
||||||
|
/**Optical disc track */
|
||||||
|
typedef struct TrackEntry {
|
||||||
|
/**Track sequence */
|
||||||
|
uint8_t sequence;
|
||||||
|
/**Track type */
|
||||||
|
uint8_t type;
|
||||||
|
/**Track starting LBA */
|
||||||
|
int64_t start;
|
||||||
|
/**Track last LBA */
|
||||||
|
int64_t end;
|
||||||
|
/**Track pregap in sectors */
|
||||||
|
int64_t pregap;
|
||||||
|
/**Track session */
|
||||||
|
uint8_t session;
|
||||||
|
/**Track's ISRC in ASCII */
|
||||||
|
uint8_t isrc[13];
|
||||||
|
/**Track flags */
|
||||||
|
uint8_t flags;
|
||||||
|
} TrackEntry;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif //LIBAARUFORMAT_OPTICAL_H
|
||||||
Reference in New Issue
Block a user