Version: 1.0

Posted: 2003-01-14

Build Requirements: N/A

Runtime Requirements: Carbon QuickTime 5

View Source Code:

Download Sample (“SlideShowImporter.win.zip”, 938.3K)
Download Sample (“SlideShowImporter.win.dmg”, 997.2K)



Description

This is an example of a movie import component that accepts as input an XML file, and constructs a movie from the elements in this file. The XML file consists of XML elements of the form: /* An XML Element, i.e. <element attr="value" attr="value" ...> [contents] </element> or <element attr="value" attr="value" .../> */ Elements can be images, effect types, and audio files. Each image element consists of an image file attribute and a duration attribute. Each effect element consists of an effect type attribute and a duration attribute. Each audio element consists of an audio-only movie file attribute. The component parses each element in the file using the QuickTime XML parsing component, line by line, and constructs a movie from these elements. For example, given the following sample elements: <image src="sky01.jpg" dur="1" /><effect type = "dissolve" dur = "1" /> the program will construct a track media item from the image file "sky01.jpg", and add this media item to the video track of the movie (NOTE: in this sample, all our images are the same size - if you use different size images they will be scaled appropriately by QuickTime). The duration of this media item will be 1 as specified by the duration attribute. After adding the image element to the movie, the program will add the next element, the dissolve effect. After all images & effects are added this will result in a movie file which displays a series of images, with an effect as a transition between each image. In addition, an audio-only movie file will be played for the length of the movie as background music. Requirements: QuickTime 5 Keywords: xml movie import component

Document Revision History

Date Notes
2003-01-14Movie import component, constructs a movie from images, effect types, and audio files.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.