mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
[Specification] Add metadata block definition (META)
This commit is contained in:
@@ -62,4 +62,8 @@ include::structs/twin_sector.adoc[]
|
|||||||
|
|
||||||
<<<
|
<<<
|
||||||
|
|
||||||
include::structs/geom.adoc[]
|
include::structs/geom.adoc[]
|
||||||
|
|
||||||
|
<<<
|
||||||
|
|
||||||
|
include::structs/metadata.adoc[]
|
||||||
219
docs/spec/structs/metadata.adoc
Normal file
219
docs/spec/structs/metadata.adoc
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
=== The 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
|
||||||
|
{
|
||||||
|
/**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;
|
||||||
|
|
||||||
|
==== 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.
|
||||||
|
|===
|
||||||
Reference in New Issue
Block a user