public class CompositionExample extends Object
Example of a class that creates some instances of AAF classes and writes them either to an XML or AAF structured storage file. To run the class, try:
java tv.amwa.maj.example.CompositionExample <filename(.aaf|.isr|.xml)>
The type of file to save is determined from the extension, where .isr and .aaf both
produce a structured storage file.
Note that you need the MAJ API on your classpath, either as a jar file or the compiled classes. To write a structured storage file, you must also have the POIFS library from Apache on the classpath.
| Constructor and Description |
|---|
CompositionExample() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
Create some AAF classes representing a package hierarchy, from top level composition
down to top-level file packages, with a tape descriptor at the end of the source-reference
chain.
|
static Preface |
makeExamplePreface()
Create all the AAF objects required to represent the example top level composition.
|
static CDCIDescriptor |
makeIMX50VideoDescriptor(long essenceLength,
int linkedTrackID)
Example utility method to tidy up making an IMX50 picture descriptor.
|
static SourceClip |
makeSourceClip(String trackType,
Package sourcePackage,
int sourceTrackID,
long startPosition,
long componentLength)
Example utility method useful to speed up the making of source clips.
|
static TimelineTrack |
makeTimelineTrack(String trackType,
Package sourceChainReference,
int sourceTrackID,
long startPosition,
int localTrackID,
long componentLength)
Example utility method to speed up making a timeline track.
|
static WAVEPCMDescriptor |
makeWAVEPCMDescriptor(long essenceLength,
int linledTrackID)
Example utility method to tidy up the making of a WAVE PCM descriptor.
|
public static final void main(String[] args)
Create some AAF classes representing a package hierarchy, from top level composition down to top-level file packages, with a tape descriptor at the end of the source-reference chain. Write these packages to an XML or AAF structured storage file.
args - The filename to write the file to relative to the present working directory.public static final Preface makeExamplePreface() throws Exception
Create all the AAF objects required to represent the example top level composition.
Exceptionpublic static final CDCIDescriptor makeIMX50VideoDescriptor(long essenceLength, int linkedTrackID)
Example utility method to tidy up making an IMX50 picture descriptor.
public static final WAVEPCMDescriptor makeWAVEPCMDescriptor(long essenceLength, int linledTrackID)
Example utility method to tidy up the making of a WAVE PCM descriptor.
public static final TimelineTrack makeTimelineTrack(String trackType, Package sourceChainReference, int sourceTrackID, long startPosition, int localTrackID, long componentLength)
Example utility method to speed up making a timeline track.
public static final SourceClip makeSourceClip(String trackType, Package sourcePackage, int sourceTrackID, long startPosition, long componentLength)
Example utility method useful to speed up the making of source clips.
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.