Skip to main content

Serialization

Location: src/MovieMakerCore/StoryboardManager/Serialization/

Movie Maker projects are .wlmp files — XML written with XmlLite (XmlLite.lib), parsed with an IXmlReader.

Components​

ComponentRole
SerializationContextShared reader/writer state: version negotiation, error reporting, ID↔object maps
SerializationReaderIXmlReader-driven XML → model pass
SerializationWritermodel → XML pass (IXmlWriter)
SerializationClassesper-element (de)serialization: project, tracks, extents, effects, themes
BoundPlaceholderplaceholder objects that resolve late (theme slots)

Format handling​

  • Reader supports the project versions the original did, including the legacy v1 format — dead code in practice, shipped-but-unused (Quirk #19).
  • Round-trip fidelity is contract-tested: writing then reading a project preserves model state (some round-trip edge cases remain known stubs — tracked by the TODO audit).

XmlLite compatibility notes​

Two Win10-SDK API differences were adapted during reconstruction (see SDK Compatibility):

  • IXmlReader::GetAttribute does not exist → replaced with MoveToAttributeByName + GetValue.
  • XmlWriterProperty_ProcessNamespaces was removed from the SDK → defined locally as ((XmlWriterProperty)1).
  • WriteEndElement() / WriteEndDocument() take 0 arguments (the original code base assumed defaults — Gotchas #16 in ROADMAP.md).

Known preserved defect​

The serialization writer contains a memory leak on the error path — faithfully preserved from the original binary (Quirk #23). Do not "fix" it without an explicit remix request; the contract suite documents the behavior.