diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-09-15 19:11:01 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-25 14:59:14 -0700 |
commit | cc4f48be3f49ffef51c7c0cb328de709a05c4a7d (patch) | |
tree | 9b0f1671a2b3f0d1d7a4449f21531625d2514237 /core/xmp_parser.h | |
parent | 0aab39b35dd034a558282ca8ee53e9dfe838e0b9 (diff) | |
download | subsurface-cc4f48be3f49ffef51c7c0cb328de709a05c4a7d.tar.gz |
Metadata: rudimentary support for XMP metadataa in MP4-based videos
XMP is a media-metadata standard based on XML which may be used
across a variety of media formats. Some video-processing software
writes XMP data without updating the native metadata fields.
Therefore, we should aim at reading XMP metadata and give priority
of XMP data over native fields.
Pros:
- Support for *all* common media formats.
Cons:
- XML (complex, verbose, chaotic).
- Does not even come close to fulfilling its promise of being
well defined (see below).
Implement a simple XMP-parser using libxml2. Connect the XMP-parser to
the existing Quicktime/MP4 parser.
First problem encountered: According to the spec, XMP data supposed
to be put in the 'XMP_' atom. But for example exiftools instead
writes an 'uuid' atom with a special 16-byte uid. Implement both,
more options will probably follow.
Second problem: two versions of recording the creation date were found
1) The content of a <exif:DateTimeOriginal> tag.
2) The xmp::CreateDate attribute of a <rdf:Description> tag.
Here too, more versions are expected to surface and will have
to be supported in due course (with an obvious priority problem).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/xmp_parser.h')
-rw-r--r-- | core/xmp_parser.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/xmp_parser.h b/core/xmp_parser.h new file mode 100644 index 000000000..8bdcb6de4 --- /dev/null +++ b/core/xmp_parser.h @@ -0,0 +1,11 @@ +// Parse XMP blocks using libxml2 + +#ifndef XMP_PARSER_H +#define XMP_PARSER_H + +#include "units.h" // for timestamp_t +#include <stddef.h> // for size_t + +timestamp_t parse_xmp(const char *data, size_t size); // On failure returns 0. + +#endif // XMP_PARSER_H |