The media file format provides for adding extra global data in special header and footer sections. To save and load special header and/or footer records:
When a buffer is saved, the methods write-headers-to-file and write-footers-to-file are invoked; this is when the derived wx:media-edit% or wx:media-pasteboard% object has a chance to save records. To write a header/footer record, first invoke the BeginWriteHeaderFooterToFile method, at which point the record name is provided. Once the record is written, call EndWriteHeaderFooterToFile.
When a buffer is loaded and a header/footer record is encountered, the read-header-from-file or read-footer-from-file method is invoked, with the record name as the parameter. If the name matches a known record type, then the data can be loaded.
See also write-headers-to-file and write-headers-to-file .