mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
192 lines
6.0 KiB
Plaintext
192 lines
6.0 KiB
Plaintext
=== Metadata Block (`META`)
|
|
|
|
The metadata block contains descriptive information related to the media source, which is not part of the original media data itself.
|
|
Typical fields may include the manufacturer name, device model, acquisition sequence identifiers, and other contextual attributes.
|
|
|
|
All string values within this block are encoded as little-endian UTF-16 and terminated with a null character.
|
|
|
|
[source,c]
|
|
#define META_MAGIC 0x4154454D
|
|
/**Metadata block, contains metadata */
|
|
typedef struct MetadataBlockHeader
|
|
{
|
|
uint32_t identifier; ///< Block identifier, must be BlockType::MetadataBlock.
|
|
uint32_t blockSize; ///< Total size in bytes of the entire metadata block (header + strings).
|
|
int32_t mediaSequence; ///< Sequence number within a multi-disc / multi-volume set (0-based or 1-based as
|
|
///< producer defines).
|
|
int32_t lastMediaSequence; ///< Total number of media in the set; 0 or 1 if single item.
|
|
uint32_t creatorOffset; ///< Offset to UTF-16LE creator string (or undefined if creatorLength==0).
|
|
uint32_t creatorLength; ///< Length in bytes (including null) of creator string (0 if absent).
|
|
uint32_t commentsOffset; ///< Offset to UTF-16LE comments string.
|
|
uint32_t commentsLength; ///< Length in bytes (including null) of comments string.
|
|
uint32_t mediaTitleOffset; ///< Offset to UTF-16LE media title string.
|
|
uint32_t mediaTitleLength; ///< Length in bytes (including null) of media title string.
|
|
uint32_t mediaManufacturerOffset; ///< Offset to UTF-16LE media manufacturer string.
|
|
uint32_t mediaManufacturerLength; ///< Length in bytes (including null) of media manufacturer string.
|
|
uint32_t mediaModelOffset; ///< Offset to UTF-16LE media model string.
|
|
uint32_t mediaModelLength; ///< Length in bytes (including null) of media model string.
|
|
uint32_t mediaSerialNumberOffset; ///< Offset to UTF-16LE media serial number string.
|
|
uint32_t mediaSerialNumberLength; ///< Length in bytes (including null) of media serial number string.
|
|
uint32_t mediaBarcodeOffset; ///< Offset to UTF-16LE media barcode string.
|
|
uint32_t mediaBarcodeLength; ///< Length in bytes (including null) of media barcode string.
|
|
uint32_t mediaPartNumberOffset; ///< Offset to UTF-16LE media part number string.
|
|
uint32_t mediaPartNumberLength; ///< Length in bytes (including null) of media part number string.
|
|
uint32_t driveManufacturerOffset; ///< Offset to UTF-16LE drive manufacturer string.
|
|
uint32_t driveManufacturerLength; ///< Length in bytes (including null) of drive manufacturer string.
|
|
uint32_t driveModelOffset; ///< Offset to UTF-16LE drive model string.
|
|
uint32_t driveModelLength; ///< Length in bytes (including null) of drive model string.
|
|
uint32_t driveSerialNumberOffset; ///< Offset to UTF-16LE drive serial number string.
|
|
uint32_t driveSerialNumberLength; ///< Length in bytes (including null) of drive serial number string.
|
|
uint32_t driveFirmwareRevisionOffset; ///< Offset to UTF-16LE drive firmware revision string.
|
|
uint32_t driveFirmwareRevisionLength; ///< Length in bytes (including null) of drive firmware revision string.
|
|
} MetadataBlockHeader;
|
|
|
|
==== Field Descriptions
|
|
|
|
[cols="2,2,2,6",options="header"]
|
|
|===
|
|
|Type
|
|
|Size
|
|
|Name
|
|
|Description
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|identifier
|
|
|The metadata table identifier, always `META`
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|blockSize
|
|
|The size of this block including all of its data.
|
|
|
|
|int32_t
|
|
|4 bytes
|
|
|mediaSequence
|
|
|The number of heads.
|
|
|
|
|int32_t
|
|
|4 bytes
|
|
|lastMediaSequence
|
|
|The number of sectors per track.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|creatorOffset
|
|
|Offset to start of creator string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|creatorLength
|
|
|Length in bytes of the creator string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|commentsOffset
|
|
|Offset to start of comments string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|commentsLength
|
|
|Length in bytes of the comments string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaTitleOffset
|
|
|Offset to start of media title string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaTitleLength
|
|
|Length in bytes of the media title string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaManufacturerOffset
|
|
|Offset to start of media manufacturer string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaManufacturerLength
|
|
|Length in bytes of the media manufacturer string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaModelOffset
|
|
|Offset to start of media model string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaModelLength
|
|
|Length in bytes of the media model string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaSerialNumberOffset
|
|
|Offset to start of media serial number string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaSerialNumberLength
|
|
|Length in bytes of the media serial number string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaBarcodeOffset
|
|
|Offset to start of media barcode string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaBarcodeLength
|
|
|Length in bytes of the media barcode string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaPartNumberOffset
|
|
|Offset to start of media part number string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|mediaPartNumberLength
|
|
|Length in bytes of the media part number string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveManufacturerOffset
|
|
|Offset to start of drive manufacturer string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveManufacturerLength
|
|
|Length in bytes of the drive manufacturer string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveModelOffset
|
|
|Offset to start of drive model string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveModelLength
|
|
|Length in bytes of the drive model string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveSerialNumberOffset
|
|
|Offset to start of drive serial number string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveSerialNumberLength
|
|
|Length in bytes of the drive serial number string.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveFirmwareRevisionOffset
|
|
|Offset to start of drive firmware revision string from start of this block.
|
|
|
|
|uint32_t
|
|
|4 bytes
|
|
|driveFirmwareRevisionLength
|
|
|Length in bytes of the drive firmware revision string.
|
|
|=== |