-
-
Notifications
You must be signed in to change notification settings - Fork 63
Focus on non standard fields
A given field is considered "non standard" when :
- The metadata container specification has a finite set of standard fields (e.g. ID3v2) and the field you're trying to write is not among them
- The metadata container specification has rules for field names (e.g. MP4 where field codes shouldn't be longer than 4 characters) and the field you're trying to write doesn't follow these rules
- If they are mapped to a standard ATL field, they appear as such (e.g. MP4 where
----:com.apple.iTunes:CONDUCTOR
which is mapped asIMetaData.Conductor
; - If not, will appear as a key-value pair inside
AdditionalFields
.
Non-standard fields persisted using the TXXX
("User-defined information frame") field code appear inside AdditionalFields
with their actual field name.
Using specifications vocabulary, AdditionalFields
's key contains the Description and AdditionalFields
's value contains the Value.
Non-standard fields persisted using the GEOB
("Encapsulated object") field code appear inside AdditionalFields
with a key comprised of their content description prepended with GEOB.
.
Using specifications vocabulary, AdditionalFields
's key contains the Content description and AdditionalFields
's value contains the Encapsulated object.
NB : The Encapsulated object is serialized as a string encoded with ISO-8859-1.
Non-standard fields persisted using the ----
field code appear prepended with ----
inside AdditionalFields
(e.g. if you saved <name>=my.namespace:MY_CUSTOM_FIELD
, the corresponding AdditionalFields
key will read ----:my.namespace:MY_CUSTOM_FIELD
)
When the field is mapped to a standard ATL field, it is handled by the library. No extra processing is required.
When the metadata container has a "wildcard" field type that can host custom fields (e.g. TXXX
for ID3v2.4), ATL uses it to write non-standard fields.
If not, the field is ignored and a warning message will be logged to the ATL logger.
For any given input field with <name>
and <value>
stored into AdditionalFields
for writing :
Any field that is outside predefined standards is converted into a TXXX
field, using the following convention :
- ID :
TXXX
- Value :
<name>
\0
<value>
(where, according to specs,<name>
is the Description and<value>
is the Value)
Any field that is provided with a key in the form of GEOB.<something>
is converted into a GEOB
field, using the following convention :
- ID :
GEOB
- Text encoding : ISO-8859-1 (hardcoded for now)
- MIME type : application/octet-stream (hardcoded for now)
- Filename : empty (no value; hardcoded for now)
- Content description :
<something>
(NB :<name>
has the formGEOB.<something>
) - Encapsulated object:
<value>
- If
<name>
starts withWM/
, the field is part of the specific MicrosoftXtra
atom and is written there; - If
<name>
is longer than 4 characters, ATL tries to create the field a----
custom field. To do that,<name>
must contain a namespace. You must provide it by formatting<name>
in two possible ways :-
----
:
namespace
:
field name
-
namespace
:
field name
-
- If no namespace is provided, the field is ignored
Any field with a <name>
longer than 4 characters is ignored.
Any field with a <name>
longer than 4 characters is ignored.