|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tv.amwa.maj.industry.AAFFactory
public final class AAFFactory
Factory class for creating instances of AAF classes, class definitions and type definitions. The methods provided in this class mimic the constructor methods found in the MAJ API implementations of the classes. The MAJ API expects all required properties to have their values specified on construction.
To use this class, you need to create an instance of the factory. This allows an environment for generation tracking to be established for all classes generated by the factory rather than the need to set it for each class. The code below shows an example of using this factory:
AAFFactory mobFactory = AAFFactory.getFactory(); mobFactory.setGenerationTracking(true); MasterMob primaryPackage = mobFactory.makeMasterMob(new MobID(), "primary package");
Method Summary | |
---|---|
ClassDefinition |
classDefinitionForClass(Class<?> javaClass)
Finds and returns an class definition for the given Java class. |
ClassDefinition |
classDefinitionForName(String className)
Finds and returns a class definition for the given AAF class name. |
DataDefinition |
dataDefinitionForName(String definitionName)
Finds and returns a data definition from the given data definition name. |
static AAFFactory |
getFactory()
Returns an instance of the factory that can be used to create to classes and reference meta definitions. |
tv.amwa.maj.io.file.AAFFile |
makeAAFFile(FileDescriptor aafFile)
Manufactures and initializes an AAF file from a Java file descriptor. |
AES3PCMDescriptor |
makeAES3PCMDescriptor(ContainerDefinition containerFormat,
Rational audioSamplingRate,
int channels,
int quantizationBits,
short blockAlign,
int averageBPS)
Manufactures a new AES3 PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format. |
AIFCDescriptor |
makeAIFCDescriptor(ContainerDefinition containerFormat,
Rational sampleRate,
long length,
byte[] summary)
Manufactures and initializes a new AIFC descriptor, which specifies that a file source mob is associated with audio essence formatted according to the Audio Interchange File Format with Compression (AIFC). |
AuxiliaryDescriptor |
makeAuxiliaryDescriptor(String mimeType)
Manufactures and initializes a new auxiliary descriptor, which describes an auxiliary file essence source using the given mime type. |
BWFImportDescriptor |
makeBWFImportDescriptor()
Manufactures and initializes a new BWF import descriptor, which specifies imported audio data essence encoded according to the Broadcast Wave specifications. |
CDCIDescriptor |
makeCDCIDescriptor(ContainerDefinition containerFormat,
int storedHeight,
int storedWidth,
LayoutType frameLayout,
int[] videoLineMap,
Rational imageAspectRatio,
int horizontalSubsampling,
int componentWidth)
Manufactures and initializes a new CDCI descriptor, which specifies that a file source mob is associated with video essence that is formatted with one luminance component and two color-difference components. |
ClassDefinition |
makeClassDefinition(AUID classID,
String className,
ClassDefinition parentClass,
boolean isConcrete)
Manufactures and initializes a class definition, which defines a class and references its underlying properties. |
CodecDefinition |
makeCodecDefinition(AUID identification,
String name,
ClassDefinition fileDescriptorClass,
Set<DataDefinition> dataDefinitions)
Manufactures and initializes all the fields of a codec definition, which specifies an essence codec. |
CommentMarker |
makeCommentMarker(DataDefinition dataDefinition)
Manufactures and initializes a new comment marker for the given kind of essence data, which specifies a user comment that is associated with a point in time. |
CompositionMob |
makeCompositionMob(MobID mobID,
String name)
Manufacturers and initializes a composition mob, which specifies how to combine essence elements into a sequence, how to modify essence elements, and how to synchronize essence elements. |
ConstantValue |
makeConstantValue(ParameterDefinition parameterDefinition,
Object value)
Manufactures and initializes a new constant value object, which specifies a constant data value for an effect control value. |
ContainerDefinition |
makeContainerDefinition(AUID identification,
String name)
Manufactures and initializes a container definition, which specifies the mechanism used to store essence data. |
ContentStorage |
makeContentStorage(Set<Mob> mobs,
Set<EssenceData> essenceData)
Manufactures and initializes a content storage object, which stores the mob and essence data objects of an AAF persistent unit. |
ControlPoint |
makeControlPoint(VaryingValue varyingValue,
Rational time,
Object value)
Manufactures and initializes a new control point, which contains a value at point in time and is used to specify an effect control value. |
DataDefinition |
makeDataDefinition(AUID identification,
String name)
Manufactures and initializes the required fields of a data definition, which specifies the kind of data that can be stored in a component. |
DataEssenceDescriptor |
makeDataEssenceDescriptor(ContainerDefinition containerFormat)
Manufactures and initializes a new data essence descriptor, which specifies that a file source mob is associated with data essence. |
DescriptiveClip |
makeDescriptiveClip(DataDefinition dataDefinition,
long length,
SourceReferenceValue sourceReference)
Manufactures and initializes a new descriptive clip, which specifies what is being described and references a mob to provide that description. |
DescriptiveMarker |
makeDescriptiveMarker()
Manufactures and initializes a descriptive marker, which specifies descriptive metadata that is associated with a point in time. |
Dictionary |
makeDictionary()
Manufactures and initializes a new dictionary object, which has the definition objects of an AAF persistent unit. |
EdgecodeSegment |
makeEdgecode(long length,
EdgecodeValue edgecode)
Manufactures and initializes a new edgecode segment, which stores film edge code information. |
EdgecodeSegment |
makeEdgecodeSegment(long length,
EdgecodeValue edgecode)
Manufactures and initializes a new edgecode segment, which stores film edge code information. |
EdgecodeValue |
makeEdgecodeValue(long start,
FilmType filmKind,
EdgeType codeFormat)
Manufactures and initializes a new edgecode value, which can be used to define the value on an edgecode segment. |
EssenceData |
makeEssenceData(SourceMob sourceMob,
byte[] data)
Manufactures and initializes a new essence data object that contains essence. |
tv.amwa.maj.io.file.EssenceFormat |
makeEssenceFormat()
Manufactures and initializes an empty essence format list. |
EssenceGroup |
makeEssenceGroup(DataDefinition dataDefinition,
long length)
Manufactures and initializes an empty essence group segment, which describes multiple digital representations of the same original content source. |
EventMobSlot |
makeEventMobSlot(int slotId,
Segment segment,
Rational editRate)
Manufactures and initializes a new event mob slot, which holds a sequence of events. |
Filler |
makeFiller(DataDefinition dataDefinition,
long length)
Manufactures and initializes a new filler segment, which represents an unspecified value for the duration of the segment. |
FilmDescriptor |
makeFilmDescriptor()
Manufactures and initializes a film descriptor that describes film media. |
GPITrigger |
makeGPITrigger(DataDefinition dataDefinition,
boolean activeState)
Manufactures and initializes a new GPI trigger event, which specifies a trigger action that should be taken when the GPITrigger is reached. |
Header |
makeHeader()
Manufactures and initializes a header, which provides file-wide information and indexes. |
HTMLClip |
makeHTMLClip(MobID sourceID,
int sourceMobSlotID)
Manufactures and initializes a new HTML clip, which represents an HTML document and identifies the source of the document. |
HTMLDescriptor |
makeHTMLDescriptor(ContainerDefinition containerFormat)
Manufactures and initializes a new HTML descriptor, which describes static essence in the HTML file format. |
Identification |
makeIdentification(String companyName,
String productName,
String productVersionString,
AUID productID)
Manufactures and initializes a new identification, which provides information about the application that created or modified a file. |
ImportDescriptor |
makeImportDescriptor()
Manufactures and initializes a new import descriptor, which represents a file essence source that is not directly manipulated by an AAF application. |
InterpolationDefinition |
makeInterpolationDefinition(AUID identification,
String name)
Manufactures and initializes a new interpolation definition, which specifies the mechanism used to calculate the values produced by a varying value using the specified control points. |
KLVData |
makeKLVData(AUID key,
byte[] value)
Manufactures and initializes a new KLV data object, which contains user data specified with a key (SMPTE label), length, and value. |
KLVDataDefinition |
makeKLVDataDefinition(AUID identification,
String name)
Manufactures and initializes a new KLV data definition, which documents the KLV data objects used in the current persistent unit. |
MasterMob |
makeMasterMob(MobID mobID,
String name)
Manufactures and initializes a new master mob, which provides access to source mob and essence data objects. |
MPEGVideoDescriptor |
makeMPEGVideoDescriptor(ContainerDefinition containerFormat,
int storedHeight,
int storedWidth,
LayoutType frameLayout,
int[] videoLineMap,
Rational imageAspectRatio,
int horizontalSubsampling,
int componentWidth)
Manufactures and initializes a new MPEG video descriptor , which specifies that a file source mob is associated with video essence that is represented and coded according to the MPEG specifications. |
MultipleDescriptor |
makeMultipleDescriptor(Rational sampleRate,
long length)
Manufactures and initializes a new multiple descriptor, which content data associated with a single file source mob
that contains multiple tracks of essence. |
NestedScope |
makeNestedScope(List<Segment> slots)
Manufactures and initializes a new nested scope, which defines a scope and has an ordered set of segments. |
NetworkLocator |
makeNetworkLocator(String urlString)
Manufactures and initializes a new network locator, which provides information to help find a file containing essence. |
OperationDefinition |
makeOperationDefinition(AUID identifier,
String name,
DataDefinition dataDefinition,
int numberInputs)
Manufactures and initializes a new operation definition, which identifies an operation that is performed on an array of segments. |
OperationGroup |
makeOperationGroup(DataDefinition dataDefinition,
long length,
OperationDefinition operation)
Manufactures and initializes a new operation group, which contains an ordered set of segments and an operation that is performed on these. |
ParameterDefinition |
makeParameterDefinition(AUID identification,
String name,
TypeDefinition type)
Manufactures and initializes a new parameter definition, which defines a kind of parameter for an effect. |
PCMDescriptor |
makePCMDescriptor(ContainerDefinition containerFormat,
Rational audioSamplingRate,
int channels,
int quantizationBits,
short blockAlign,
int averageBPS)
Manufactures and initializes a new PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format. |
PluginDefinition |
makePluginDefinition(AUID identification,
String name,
AUID pluginCategory,
VersionType versionNumber,
AUID definitionObject)
Manufactures and initializes a plugin definition, which is used to identify code objects that provide an implementation for a definition object such as codec definition, or for a meta definition such as a class definition. |
PropertyDefinition |
makePropertyDefinition(AUID identification,
String name,
TypeDefinition type,
ClassDefinition memberOf,
boolean isOptional)
Manufactures and initializes a new property definition, which describes allowed properties of a class definition. |
Pulldown |
makePulldown(DataDefinition dataDefinition,
Segment inputSegment,
PulldownKindType pulldownKind,
PulldownDirectionType pulldownDirection,
int phaseFrame)
Manufactures and initializes a new pulldown segment, which converts between film frame rates and videotape frame rates. |
RecordingDescriptor |
makeRecordingDescriptor()
Manufactures and initializes a new recording descriptor, which describes the source of file source material that has no physical source. |
RGBADescriptor |
makeRGBADescriptor(ContainerDefinition containerFormat,
int storedHeight,
int storedWidth,
LayoutType frameLayout,
int[] videoLineMap,
Rational imageAspectRatio,
RGBAComponent[] pixelLayout)
Manufactures and initializes a new RGBA descriptor that does not include or use a palette. |
RGBADescriptor |
makeRGBADescriptor(ContainerDefinition containerFormat,
int storedHeight,
int storedWidth,
LayoutType frameLayout,
int[] videoLineMap,
Rational imageAspectRatio,
RGBAComponent[] pixelLayout,
byte[] palette,
RGBAComponent[] paletteLayout)
Manufactures and initializes a new RGBA descriptor that includes a palette. |
RIFFChunk |
makeRIFFChunk(int chunkID)
Manufactures and initializes a new RIFF data chunk with the given chunk identifier. |
ScopeReference |
makeScopeReference(DataDefinition dataDefinition,
int relativeScope,
int relativeSlot)
Manufactures and initializes a new scope reference object, which refers to a section in the specified mob slot or nested scope slot. |
Selector |
makeSelector(Segment selected)
Manufactures and initializes a new selector segment, which provides the value of a single segment while preserving references to unused alternatives. |
Sequence |
makeSequence(DataDefinition dataDefinition)
Manufactures and initializes a new sequence, which combines an ordered list of segments and transitions. |
SoundDescriptor |
makeSoundDescriptor(ContainerDefinition containerFormat,
Rational audioSamplingRate,
int channels,
int quantizationBits)
Manufactures and initializes a new sound descriptor, which specifies that a file source mob is associated with audio essence. |
SourceClip |
makeSourceClip(DataDefinition dataDefinition,
long length,
SourceReferenceValue sourceReference)
Manufactures and initializes a new source clip, which represents an item of essence and identifies the source of the essence. |
SourceMob |
makeSourceMob(MobID mobID,
String name,
EssenceDescriptor essenceDescription)
Manufactures and initializes a new source mob, which describes essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film. |
StaticMobSlot |
makeStaticMobSlot(int slotId,
Segment segment)
Manufactures and initializes a new static mob slot, which describes essence data that has no relationship to time, such as a static image. |
TaggedValue |
makeTaggedValue(String name,
TypeDefinition typeDef,
Object value)
Manufactures and initializes a new tagged value, which specifies a user-defined tag and value. |
TaggedValueDefinition |
makeTaggedValueDefinition(AUID identification,
String name)
Manufactures and initializes all the fields of a tagged value definition, which can be used to document the tagged value objects used in an AAF persistent unit. |
TapeDescriptor |
makeTapeDescriptor()
Manufactures and initializes a new tape descriptor, which describes audio tape or video tape media. |
TextLocator |
makeTextLocator(String name)
Manufactures and initializes a new text locator, which provides information to help find a file containing essence or to help find the physical media. |
TIFFDescriptor |
makeTIFFDescriptor(ContainerDefinition containerFormat,
boolean isUniform,
boolean isContiguous,
byte[] summary)
Manufactures and initializes a new TIFF descriptor, which specifies that a file source mob is associated with video essence formatted according to the TIFF specification. |
TimecodeSegment |
makeTimecode(long length,
TimecodeValue timecode)
Manufactures and initializes a new timecode segment, which stores videotape or audio tape timecode information. |
TimecodeSegment |
makeTimecodeSegment(long length,
TimecodeValue timecode)
Manufactures and initializes a new timecode segment, which stores videotape or audio tape timecode information. |
TimecodeStream12M |
makeTimecodeStream12M(Rational sampleRate,
byte[] source,
TCSource sourceType)
Manufactures and initializes a new SMPTE 12M-compliant timecode stream, which specifies a stream of timecode data in the SMPTE 12M format. |
TimecodeValue |
makeTimecodeValue(long start,
short fps,
boolean drop)
Manufactures and initializes a new timecode value. |
TimelineMobSlot |
makeTimelineMobSlot(int slotId,
Segment segment,
Rational editRate,
long origin)
Manufactures and initializes a new timeline mob slot, which describes time-varying timeline essence. |
Transition |
makeTransition(DataDefinition dataDefinition,
long length,
OperationGroup operationGroup,
long cutPoint)
Manufactures and initializes a transition, which specifies that the two adjacent segments should be overlapped when they are played and that the overlapped sections should be combined using the specified effect. |
TypeDefinitionCharacter |
makeTypeDefinitionCharacter(AUID identification,
String typeName)
Manufactures and initializes a new type definition for characters, which defines a property type that has a value of a single 2-byte character similar to Java's char
type. |
TypeDefinitionEnumeration |
makeTypeDefinitionEnumeration(AUID identification,
String typeName,
Class<?> enumeration)
Manufactures and initializes an enumeration type definition, which defines a property type that can have one of a set of integer values. |
TypeDefinitionExtendibleEnumeration |
makeTypeDefinitionExtendibleEnumeration(AUID identification,
String typeName,
SortedMap<String,AUID> elements)
Manufactures and initializes a new extendible enumeration type definition, which defines a property type that can have one of an extendible set of AUID values. |
TypeDefinitionFixedArray |
makeTypeDefinitionFixedArray(AUID identification,
String typeName,
TypeDefinition typeDefinition,
int numberElements)
Manufactures and initializes a new fixed array type definition, which defines a property type that has a fixed number of values of the underlying type. |
TypeDefinitionIndirect |
makeTypeDefinitionIndirect(AUID identification,
String typeName)
Manufactures and initializes a new indirect type definition, which defines a property type that has a value whose type is specified in each instance. |
TypeDefinitionInteger |
makeTypeDefinitionInteger(AUID identification,
String typeName,
byte intSize,
boolean isSigned)
Manufactures and initializes a new integer type definition, which defines a property type that is a signed or an unsigned integer with the specified number of bytes. |
TypeDefinitionOpaque |
makeTypeDefinitionOpaque(AUID identification,
String typeName)
Manufactures and initializes a new opaque type definition, which defines a property type that has a value whose type is specified in each instance. |
TypeDefinitionRecord |
makeTypeDefinitionRecord(AUID identification,
String typeName,
String[] names,
Map<String,TypeDefinition> elements)
Manufactures and initializes a new record type definition, which defines a property type that consists of an ordered set of fields, where each field has a name and type. |
TypeDefinitionRename |
makeTypeDefinitionRename(AUID identification,
String typeName,
TypeDefinition baseType)
Manufactures and initializes a new renamed type definition, which defines a property type that has the same structure and representation as its underlying type but has a different meaning. |
TypeDefinitionSet |
makeTypeDefinitionSet(AUID identification,
String typeName,
TypeDefinitionObjectReference elementType)
Manufactures and initializes a new set type definition, which defines a property type that has a collection of object references to uniquely identified objects. |
TypeDefinitionStream |
makeTypeDefinitionStream(AUID identification,
String typeName)
Manufactures and initializes a new type definition for a streams, which defines a property type that is stored in a stream and has a value that consists of a varying number of the bytes. |
TypeDefinitionString |
makeTypeDefinitionString(AUID identification,
String typeName,
TypeDefinition typeDefinition)
Manufactures and initializes a new string type definition, which defines a property type that consists of a zero-terminated array of the underlying character or integer type. |
TypeDefinitionStrongObjectReference |
makeTypeDefinitionStrongObjectReference(AUID identification,
String typeName,
ClassDefinition referencedType)
Manufactures and initializes a new strong object reference type definition, which defines a property type that defines an object relationship where the target of the strong reference is owned by the object with the property. |
TypeDefinitionVariableArray |
makeTypeDefinitionVariableArray(AUID identification,
String typeName,
TypeDefinition elementType)
Manufactures and initializes a new variable size array type definition, which defines a property type that has a varying number of values of the underlying type. |
TypeDefinitionWeakObjectReference |
makeTypeDefinitionWeakObjectReference(AUID identification,
String typeName,
ClassDefinition objectType,
AUID[] targetSet)
Manufactures and initializes a new weak object reference type definition, which defines a property type that defines an object relationship where the target of the weak reference is referenced by the object with the property. |
VaryingValue |
makeVaryingValue(ParameterDefinition parameterDefinition,
InterpolationDefinition interpolation)
Manufactures and initializes a new varying value, which specifies a changing data value for an effect control value. |
WAVEDescriptor |
makeWAVEDescriptor(ContainerDefinition containerFormat,
byte[] summary)
Manufactures and initializes a new WAVE descriptor, which specifies that a file source mob is associated with audio essence formatted according to the RIFF Waveform Audio File Format (WAVE). |
void |
setGenerationTracking(boolean generationTracking)
Enable or disable generation tracking for all future objects made by this factory. |
TypeDefinition |
typeDefinitionForIdentification(AUID identification)
Finds and returns the type definition for the given type identification. |
TypeDefinition |
typeDefinitionForName(String typeName)
Finds and returns the type definition for the given type name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final AAFFactory getFactory()
Returns an instance of the factory that can be used to create to classes and reference meta definitions.
public void setGenerationTracking(boolean generationTracking)
Enable or disable generation tracking for all future objects made by this factory.
generationTracking
- Set to true
to enable generation tracking for all
future objects created by this factory; set to false
to disable.public ClassDefinition classDefinitionForClass(Class<?> javaClass) throws NullPointerException, ObjectNotFoundException
AAFFactory
Finds and returns an class definition for the given Java class. The given Java class must be known to the implementation of the factory or be annotated as an AAF class.
classDefinitionForClass
in interface AAFFactory
javaClass
- Java class to use to search for a corresponding AAF class definition.
NullPointerException
- The java class argument is null
.
ObjectNotFoundException
- A matching AAF class definition for the given class cannot be
found.ClassDefinitionWarehouse.forClass(Class)
,
AAFClass
,
AAFFactory.classDefinitionForName(String)
,
ClassDefinition
public ClassDefinition classDefinitionForName(String className) throws NullPointerException, ObjectNotFoundException
Finds and returns a class definition for the given AAF class name. Firstly, the search takes place using the class name specified in the AAF object specification and then by using a Java class name.
The search order used by this method is:
Class.forName(String)
followed by
classDefinitionForClass(Class)
with the result. Return the value.Class.forName(String)
followed by
classDefinitionForClass(Class)
with the result. Return the value.
classDefinitionForName
in interface AAFFactory
className
- Name of the class definition to find, specified using a name from the
AAF object specification.
NullPointerException
- The class name argument is null
.
ObjectNotFoundException
- A class definition for the given name cannot be found.ClassDefinitionWarehouse.forName(String)
,
AAFFactory.classDefinitionForClass(Class)
,
ClassDefinition
public tv.amwa.maj.io.file.AAFFile makeAAFFile(FileDescriptor aafFile) throws NullPointerException
AAFFactory
Manufactures and initializes an AAF file from a Java file descriptor. This method makes no attempt to check the validity of the given file descriptor or whether the file it specifies exists and can be accessed.
Note that in the current version of the MAJ API, no support is provided for AAF structured format or
KLV files. The MAJ API implementation of this method does nothing useful. This and related methods are
provided as part of a skeleton implementation of an interface similar to that provided in the existing
C-based reference implementation COM interface definitions (file "AAF.idl
").
makeAAFFile
in interface AAFFactory
aafFile
- File descriptor for an AAF file.
NullPointerException
- The given file descriptor is null
.Related MAJ API constructor
public AIFCDescriptor makeAIFCDescriptor(ContainerDefinition containerFormat, Rational sampleRate, long length, byte[] summary) throws NullPointerException
AAFFactory
Manufactures and initializes a new AIFC descriptor, which specifies that a file source mob is associated with audio essence formatted according to the Audio Interchange File Format with Compression (AIFC).
makeAIFCDescriptor
in interface AAFFactory
containerFormat
- Container mechanism used to store the essence.sampleRate
- Sample rate of the essence.length
- Duration of the essence measured in sample units.summary
- Copy of the descriptive information in the associated AIFC audio data value.
NullPointerException
- One or more of the arguments is null
and all
values are required.Related MAJ API constructor
,
CodecConstant.AIFC
public AuxiliaryDescriptor makeAuxiliaryDescriptor(String mimeType) throws NullPointerException
AAFFactory
Manufactures and initializes a new auxiliary descriptor, which describes an auxiliary file essence source using the given mime type.
makeAuxiliaryDescriptor
in interface AAFFactory
mimeType
- Registered mimetype of the data in the auxiliary file, according to
RFC 2046 (MIME Media Types) and
RFC 2048 (MIME Registration Procedures).
NullPointerException
- The mime type argument is null
.Related MAJ API constructor
public CDCIDescriptor makeCDCIDescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, int horizontalSubsampling, int componentWidth) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new CDCI descriptor, which specifies that a file source mob is associated with video essence that is formatted with one luminance component and two color-difference components. This format is commonly known as "YCbCr".
makeCDCIDescriptor
in interface AAFFactory
containerFormat
- Container mechanism used to store the essence.storedHeight
- Number of pixels in vertical dimension of the stored view.storedWidth
- Number of pixels in horizontal dimension of the stored view.frameLayout
- Describes whether all data for a complete sample is in one
frame or is split into more than one field.videoLineMap
- The scan line in the analog source that corresponds to the
beginning of each digitized field. For single-field video, there is 1 value in
the array; for interlaced video, there are 2 values in the array.imageAspectRatio
- Describes the ratio between the horizontal size and the vertical
size in the intended final image.horizontalSubsampling
- Ratio of luminance sampling to chrominance sampling in the
horizontal direction. For 4:2:2 video, the value is 2, which means that there are twice as
many luminance values as there are color-difference values. Legal values are 1,
2 and 4.componentWidth
- Number of bits used to store each component. Can have a value
of 8, 10 or 16. Each component in a sample is
packed contiguously; the sample is filled with the number of bits specified by the optional
padding bits property. If the padding bits property is omitted, samples are packed contiguously.
NullPointerException
- One or more of arguments is null
and all of
the arguments are required.
IllegalArgumentException
- The given values are not of the permitted ranges.Related MAJ API constructor
,
CodecConstant.CDCI
public ClassDefinition makeClassDefinition(AUID classID, String className, ClassDefinition parentClass, boolean isConcrete) throws NullPointerException
AAFFactory
Manufactures and initializes a class definition, which defines
a class and references its underlying properties. If the concrete
property is set to true
, objects of
this class can be instantiated; otherwise, it is illegal to
instantiate such objects.
When creating a class definition using the MAJ API, it is advisable to set the Java
class implementation of the given definition using ClassDefinition.setJavaImplementation(Class)
.
Note that for reasons of interoperability, it is recommended that reference is made to existing
class definitions. To get a reference to an existing class definition, use the
AAFFactory.classDefinitionForClass(Class)
and AAFFactory.classDefinitionForName(String)
methods.
makeClassDefinition
in interface AAFFactory
classID
- Identification of the new class definition.className
- Friendly name of the new class definition.parentClass
- Specifies the parent of the class being defined
according to class inheritance. If set to null
, the new definition is
assumed to be for a root class.isConcrete
- Can objects of this class be instantiated?
NullPointerException
- The identification argument is null
.Related MAJ API constructor
,
AAFFactory.classDefinitionForClass(Class)
,
AAFFactory.classDefinitionForName(String)
,
ClassDefinitionWarehouse
,
AAFClass
public CodecDefinition makeCodecDefinition(AUID identification, String name, ClassDefinition fileDescriptorClass, Set<DataDefinition> dataDefinitions) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes all the fields of a codec definition,
which specifies an essence codec. The set of data definitions for essence kinds processed
by the codec must contain at least one item, otherwise an IllegalArgumentException
will be thrown.
makeCodecDefinition
in interface AAFFactory
identification
- Unique identifier for new codec definition.name
- Display name for the new codec definition.fileDescriptorClass
- Class definition of the sub-class of file descriptor that identifies
the essence format that this codec processes.dataDefinitions
- Data definitions of the essence formats that the new codec processes.
NullPointerException
- One or more of the arguments is null
and all
are required in this implementation.
IllegalArgumentException
- Cannot crate a codec definition with and empty
set of data definitions.Related MAJ API constructor
,
CodecConstant
,
Dictionary.getCodecDefinitions()
public CommentMarker makeCommentMarker(DataDefinition dataDefinition)
AAFFactory
Manufactures and initializes a new comment marker for the given kind of
essence data, which
specifies a user comment that is associated with a point in time. If this event is in an
event mob slot, the position must also be set using
Event.setPosition(long)
. Call
CommentMarker.setAnnotation(SourceReferenceSegment)
to set the optional annotation.
makeCommentMarker
in interface AAFFactory
dataDefinition
- Kind of data represented by this component.
Related MAJ API constructor
,
Event
public CompositionMob makeCompositionMob(MobID mobID, @AAFString String name) throws NullPointerException
AAFFactory
Manufacturers and initializes a composition mob, which specifies how to combine
essence elements into a sequence, how to modify essence elements, and how to synchronize
essence elements. The required properties of creation time and last modified time will
be set automatically to the time of calling this method. These timestamp
values can subsequently be set manually by calling
setCreateTime()
and
and setModTime()
.
makeCompositionMob
in interface AAFFactory
mobID
- Unique material identifier for the new composition mob.name
- Name of the new composition mob.
NullPointerException
- Unique material identifier argument is null
.Related MAJ API constructor
,
Mob
public ConstantValue makeConstantValue(ParameterDefinition parameterDefinition, Object value) throws NullPointerException, ClassCastException
AAFFactory
Manufactures and initializes a new constant value object, which specifies a constant data value for an effect control value.
makeConstantValue
in interface AAFFactory
parameterDefinition
- Parameter definition for this object. This determines
the type of the constant value.value
- The constant's value.
NullPointerException
- Either of the arguments is null
.
ClassCastException
- The given value is not of the required type.Related MAJ API constructor
,
Parameter
public ContainerDefinition makeContainerDefinition(AUID identification, String name) throws NullPointerException
AAFFactory
Manufactures and initializes a container definition, which specifies the mechanism
used to store essence data. A container can be either a kind of file, such as an AAF file,
or it can be another mechanism for storing essence data. The essence is identified flag is
initially set to false
. Call
ContainerDefinition.setEssenceIsIdentified(Boolean)
to change this.
makeContainerDefinition
in interface AAFFactory
identification
- Unique identifier for the new container definition.name
- Display name for new container definition.
NullPointerException
- Identification argument is null
.Related MAJ API constructor
,
ContainerConstant
,
Dictionary.getContainerDefinitions()
public ContentStorage makeContentStorage(Set<Mob> mobs, Set<EssenceData> essenceData) throws NullPointerException
AAFFactory
Manufactures and initializes a content storage object, which stores the mob and essence data objects of an AAF persistent unit. An AAF persistent unit shall have exactly one content storage object.
Use empty sets to indicate no mobs or essence data items are stored initially.
makeContentStorage
in interface AAFFactory
mobs
- Set of all mobs to place into the new content storage.essenceData
- Set of all essence data objects to place into the new content storage.
NullPointerException
- One or both of the sets are null
. Use empty
sets to indicate no mobs or essence data items are stored initially.Related MAJ API constructor
public ControlPoint makeControlPoint(VaryingValue varyingValue, Rational time, Object value) throws RationalRangeException, NullPointerException, ClassCastException
AAFFactory
Manufactures and initializes a new control point, which contains a value at point in time and is used to specify an effect control value.
makeControlPoint
in interface AAFFactory
varyingValue
- A varying value for the given point in time. This also determines the type of
this control point through its associated parameter definition.time
- Specifies the time within the varying value segment for which the value is defined,
with a value between 0 and 1.value
- Control point value.
RationalRangeException
- Rational time value is outside the inclusive range 0.0 to 1.0.
NullPointerException
- One or more of the arguments is null
and all values
are required.
ClassCastException
- The control point value is not of the required type.Related MAJ API constructor
,
ParameterDefinition
,
VaryingValue
public DataDefinition makeDataDefinition(AUID identification, String name) throws NullPointerException
AAFFactory
Manufactures and initializes the required fields of a data definition, which specifies the kind of data that can be stored in a component.
Note that it is not normally necessary to make a new data definition as references to
all the registered data definitions are available through
AAFFactory.dataDefinitionForName(String)
.
makeDataDefinition
in interface AAFFactory
identification
- Unique identifier for the data definition.name
- Name for the data definition.
NullPointerException
- One or both of the arguments is/are null
.Related MAJ API constructor
,
DataDefinitionConstant
,
Dictionary.getDataDefinitions()
,
AAFFactory.dataDefinitionForName(String)
public DescriptiveMarker makeDescriptiveMarker()
AAFFactory
Manufactures and initializes a descriptive marker,
which specifies descriptive metadata that is associated with a point in time. If this event is in an
event mob slot, the position should subsequently be set using
Event.setPosition(long)
.
makeDescriptiveMarker
in interface AAFFactory
Related MAJ API constructor
,
CommentMarker
,
Event
public Dictionary makeDictionary()
AAFFactory
Manufactures and initializes a new dictionary object, which has the definition objects of an AAF persistent unit. All the sets of definitions in the dictionary are initialized to empty sets.
makeDictionary
in interface AAFFactory
Related MAJ API constructor
,
DefinitionObject
public EdgecodeSegment makeEdgecode(long length, EdgecodeValue edgecode) throws NullPointerException, BadSizeException, BadLengthException
AAFFactory
Manufactures and initializes a new edgecode segment, which stores film edge code information.
Note that in the MAJ API, the edgecode segment class is known as "EdgecodeSegment
"
whereas in the AAF specification it is known as just "Edgecode
". See the section on
naming conflicts in the package description for
more details. As a result, calling this method is the same as calling
makeEdgecodeSegment()
.
makeEdgecode
in interface AAFFactory
length
- Duration in edit units of this component.edgecode
- Edgecode value for the new edgecode segment, which can be created with a call to
AAFFactory.makeEdgecodeValue(long, FilmType, EdgeType)
.
NullPointerException
- Edgecode argument is null
.
BadSizeException
- The given edgecode value has a header that is longer than 8 bytes.
BadLengthException
- Cannot set the length of a component to a negative value.Related MAJ API constructor
,
EdgecodeValue
,
AAFFactory.makeEdgecodeValue(long, FilmType, EdgeType)
public EdgecodeSegment makeEdgecodeSegment(long length, EdgecodeValue edgecode) throws NullPointerException, BadSizeException, BadLengthException
AAFFactory
Manufactures and initializes a new edgecode segment, which stores film edge code information.
Note that in the MAJ API, the edgecode segment class is known as "EdgecodeSegment
"
whereas in the AAF specification it is known as just "Edgecode
". See the section on
naming conflicts in the package description for
more details. As a result, calling this method is the same as calling
makeEdgecode
.
makeEdgecodeSegment
in interface AAFFactory
length
- Duration in edit units of this component.edgecode
- Edgecode value for the new edgecode segment, which can be created with a call to
AAFFactory.makeEdgecodeValue(long, FilmType, EdgeType)
.
NullPointerException
- Edgecode argument is null
.
BadSizeException
- The given edgecode value has a header that is longer than 8 bytes.
BadLengthException
- Cannot set the length of a component to a negative value.Related MAJ API constructor
,
EdgecodeValue
,
AAFFactory.makeEdgecodeValue(long, FilmType, EdgeType)
public EdgecodeValue makeEdgecodeValue(long start, FilmType filmKind, EdgeType codeFormat) throws NullPointerException
AAFFactory
Manufactures and initializes a new edgecode value,
which can be used to define the value on an edgecode segment.
The optional edgecode header is initially omitted and can be subsequently set using the
EdgecodeValue.setHeader(byte[])
method. It is recommended that this is done before
the manufactured edgecode value is used to create an edgecode segment.
makeEdgecodeValue
in interface AAFFactory
start
- Edgecode value at the beginning of the segmentfilmKind
- Type of film.codeFormat
- Edge code format.
NullPointerException
- The film kind and/or code format arguments is/are
null
.Related MAJ API constructor
,
EdgecodeValue
,
AAFFactory.makeEdgecodeSegment(long, EdgecodeValue)
,
AAFFactory.makeEdgecode(long, EdgecodeValue)
public EssenceData makeEssenceData(SourceMob sourceMob, byte[] data) throws NullPointerException
AAFFactory
Manufactures and initializes a new essence data object that contains essence. This method requires a weak reference to the corresponding source mob that describes the given essence data.
makeEssenceData
in interface AAFFactory
sourceMob
- Identifies the source mob that describes the essence.data
- The essence data.
NullPointerException
- One or both of the arguments is/are null
.Related MAJ API constructor
public tv.amwa.maj.io.file.EssenceFormat makeEssenceFormat()
AAFFactory
Manufactures and initializes an empty essence format list. Specifiers can be
added to the list using
addFormatSpecifier()
.
Note that in the current version of the MAJ API, no support is provided for AAF structured format or
KLV files. The MAJ API implementation of this method does nothing useful. This and related methods are
provided as part of a skeleton implementation of an interface similar to that provided in the existing
C-based reference implementation COM interface definitions (file "AAF.idl
").
makeEssenceFormat
in interface AAFFactory
public EssenceGroup makeEssenceGroup(DataDefinition dataDefinition, long length) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes an empty essence group segment, which describes
multiple digital representations of the same original content source. The group should contain
at least one segment, so call EssenceGroup.appendChoice(Segment)
directly after creating
the group.
makeEssenceGroup
in interface AAFFactory
dataDefinition
- Kind of data described by the component.length
- Length of each and every segment in this group.
NullPointerException
- Data definition argument is null
.
BadLengthException
- Cannot set the length of a component to a negative value.Related MAJ API constructor
public EventMobSlot makeEventMobSlot(int slotId, Segment segment, Rational editRate) throws NullPointerException
AAFFactory
Manufactures and initializes a new event mob slot, which holds a sequence of events.
makeEventMobSlot
in interface AAFFactory
slotId
- Integer that is used to reference the new mob slot.segment
- Value of the new mob slot.editRate
- Units in which the events specify their starting time and duration.
NullPointerException
- The segment or edit rate values are null
.Related MAJ API constructor
,
MobSlot
public Filler makeFiller(DataDefinition dataDefinition, long length) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes a new filler segment, which represents an unspecified value for the duration of the segment.
makeFiller
in interface AAFFactory
dataDefinition
- Kind of data described by the component.length
- Duration measured in edit units of the component.
NullPointerException
- Data definition is null
.
BadLengthException
- The length of a filler segment cannot be negative.Related MAJ API constructor
public FilmDescriptor makeFilmDescriptor()
AAFFactory
Manufactures and initializes a film descriptor that describes film media.
makeFilmDescriptor
in interface AAFFactory
Related MAJ API constructor
public GPITrigger makeGPITrigger(DataDefinition dataDefinition, boolean activeState) throws NullPointerException
AAFFactory
Manufactures and initializes a new GPI trigger event, which specifies a
trigger action that should be taken when the GPITrigger is reached. If this event
is located in an event mob slot, its position should be
subsequently set using Event.setPosition(long)
.
makeGPITrigger
in interface AAFFactory
dataDefinition
- Kind of data represented by this component.activeState
- Is the event turned on?
NullPointerException
- Data definition argument is null
.Related MAJ API constructor
,
Event
public Header makeHeader()
AAFFactory
Manufactures and initializes a header, which provides file-wide information and indexes. An AAF file shall have exactly one header object.
makeHeader
in interface AAFFactory
Related MAJ API constructor
public Identification makeIdentification(String companyName, String productName, String productVersionString, AUID productID) throws NullPointerException
AAFFactory
Manufactures and initializes a new identification, which provides information about the application that created or modified a file. The mandatory date and generation AUID properties of the identification will be created automatically.
makeIdentification
in interface AAFFactory
companyName
- Name of the company or organization that created the application.productName
- Name of the application.productVersionString
- Version number of the application in string form.productID
- Unique identifier for the application.
NullPointerException
- One or more of the arguments is null
and all
arguments are required.Related MAJ API constructor
public ImportDescriptor makeImportDescriptor()
AAFFactory
Manufactures and initializes a new import descriptor, which represents a file essence source that is not directly manipulated by an AAF application.
makeImportDescriptor
in interface AAFFactory
Related MAJ API constructor
,
PhysicalDescriptor
public InterpolationDefinition makeInterpolationDefinition(AUID identification, String name) throws NullPointerException
AAFFactory
Manufactures and initializes a new interpolation definition, which specifies the mechanism used to calculate the values produced by a varying value using the specified control points.
makeInterpolationDefinition
in interface AAFFactory
identification
- Unique identifier for this interpolation.name
- Display name for the interpolation.
NullPointerException
- One or both of the arguments is null
.Related MAJ API constructor
,
InterpolationConstant
,
Dictionary.getInterpolationDefinitions()
public KLVData makeKLVData(AUID key, byte[] value) throws NullPointerException, NotValidKeyException
AAFFactory
Manufactures and initializes a new KLV data object, which contains
user data specified with a key (SMPTE label), length, and value.
The key should have been previously registered using the
Dictionary.registerKLVDataKey(AUID, TypeDefinition)
method
in order to use the byte swapping functionality of the type model.
makeKLVData
in interface AAFFactory
key
- Key associated with the data value.value
- Value associated with the key.
NullPointerException
- One or both of the arguments is null
.
NotValidKeyException
- The given key must not resolve to a
built-in type. For most purposes, use a renamed type definition
to rename an existing type.Related MAJ API constructor
,
TypeDefinitionRename
,
KLVDataDefinition
public KLVDataDefinition makeKLVDataDefinition(AUID identification, String name) throws NullPointerException
AAFFactory
Manufactures and initializes a new KLV data definition, which documents the KLV data objects used in the current persistent unit.
makeKLVDataDefinition
in interface AAFFactory
identification
- Unique identifier for the KLV data definition.name
- Display name for the KLV data definition.
NullPointerException
- One or both of the arguments is null
.Related MAJ API constructor
,
Dictionary.getKLVDataDefinitions()
,
KLVData
public MasterMob makeMasterMob(MobID mobID, @AAFString String name) throws NullPointerException
AAFFactory
Manufactures and initializes a new master mob, which provides access to
source mob and essence data objects. The required
properties of creation time and last modified time will be set automatically to the time of calling this method.
These timestamp values can subsequently be set manually by calling
setCreateTime()
and
and setModTime()
.
makeMasterMob
in interface AAFFactory
mobID
- Unique material identifier for the mob.name
- Name of the master mob.
NullPointerException
- Unique material identifier is null
.Related MAJ API constructor
,
Mob
public NestedScope makeNestedScope(List<Segment> slots) throws NullPointerException, BadLengthException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new nested scope, which defines a scope and has an ordered set of segments. The length of all the given segments must be the same.
makeNestedScope
in interface AAFFactory
slots
- Ordered set of segments; where the last segment provides the value for the nested scope
object itself. The last segment is used to set the data definition and length for this segment.
NullPointerException
- The slots argument is null
.
BadLengthException
- One or more of the segments in the given list has a length that
is different to the length of the last segment.
IllegalArgumentException
- The list of slots is empty and it should contain at least
one element.Related MAJ API constructor
public NetworkLocator makeNetworkLocator(String urlString) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new network locator, which provides information to help find a file containing essence.
makeNetworkLocator
in interface AAFFactory
urlString
- Absolute Uniform Resource Locator (URL) complying with
RFC 1738 or
relative Uniform Resource Identifier (URI) complying with
RFC 2396 for file containing the
essence. If it is a relative URI, the base URI is determined from the URI of the AAF persistent
unit itself.
NullPointerException
- Location URL is null
.
IllegalArgumentException
- The given URI is not syntactically valid.Related MAJ API constructor
,
Locator
public OperationDefinition makeOperationDefinition(AUID identifier, String name, DataDefinition dataDefinition, int numberInputs) throws NullPointerException
AAFFactory
Manufactures and initializes a new operation definition, which identifies an operation that is performed on an array of segments.
makeOperationDefinition
in interface AAFFactory
identifier
- Unique identifier for the operation definition.name
- Display name of the operation definition.dataDefinition
- The kind of data that is produced by the operation.numberInputs
- Number of input segments. A value of -1 indicates that the
effect can have any number of input segments.
NullPointerException
- One or more of the arguments is null
and they
are all required properties in this implementation.Related MAJ API constructor
,
OperationConstant
,
Dictionary.getOperationDefinitions()
public OperationGroup makeOperationGroup(DataDefinition dataDefinition, long length, OperationDefinition operation) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes a new operation group, which contains an ordered set of segments and an operation that is performed on these. The lists of segments and parameters of the newly manufactyred operation group are initialized to be empty.
makeOperationGroup
in interface AAFFactory
dataDefinition
- Data definition object that specifies the kind of data described by
the component.length
- Length of the component represented by this operation group.operation
- Operation definition that identifies the kind of operation.
NullPointerException
- The data definition and/or operation arguments is/are
null
.
BadLengthException
- Cannot set the length of an operation group to a negative value.Related MAJ API constructor
,
OperationDefinition.forName(String)
,
OperationConstant
public PCMDescriptor makePCMDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, int channels, int quantizationBits, short blockAlign, int averageBPS) throws NullPointerException
AAFFactory
Manufactures and initializes a new PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format.
makePCMDescriptor
in interface AAFFactory
containerFormat
- Identifies the container mechanism used to store the essence.audioSamplingRate
- Sampling rate of the audio essence.channels
- Number of audio channels.quantizationBits
- Number of quantization bits.blockAlign
- Sample block alignment.averageBPS
- Average bytes per second.
NullPointerException
- The container format or sampling rate properties are
null
.Related MAJ API constructor
,
SoundDescriptor
public ParameterDefinition makeParameterDefinition(AUID identification, String name, TypeDefinition type) throws NullPointerException
AAFFactory
Manufactures and initializes a new parameter definition, which defines a kind of parameter for an effect.
makeParameterDefinition
in interface AAFFactory
identification
- Uniquely identifies the parameter definition.name
- Display name of the parameter definition.type
- Data type of the parameter.
NullPointerException
- One or more of the arguments is null
and they
are all required properties by the MAJ API.Related MAJ API constructor
,
ParameterConstant
,
Dictionary.getParameterDefinitions()
,
Parameter
public PluginDefinition makePluginDefinition(AUID identification, String name, AUID pluginCategory, VersionType versionNumber, AUID definitionObject) throws NullPointerException
AAFFactory
Manufactures and initializes a plugin definition, which is used to identify code objects that provide an implementation for a definition object such as codec definition, or for a meta definition such as a class definition.
The plugin category for the plugin can be subsequently set using one of the categories defined from
those provided in interface PluginCategoryType
using the
PluginDefinition.setCategoryClass(tv.amwa.maj.record.AUID)
method.
makePluginDefinition
in interface AAFFactory
identification
- Unique identifier for the new plugin definition.name
- Display name for the new plugin definition.pluginCategory
- Kind of plugin.versionNumber
- Version of the plugin.definitionObject
- Unique identifier of the class definition or meta definition that this
definition object provides an implementation of.
NullPointerException
- One or more of the arguments is null
and all
are required in this implementation.Related MAJ API constructor
,
PluginCategoryType
,
Dictionary.getPluginDefinitions()
public PropertyDefinition makePropertyDefinition(AUID identification, String name, TypeDefinition type, ClassDefinition memberOf, boolean isOptional) throws NullPointerException
AAFFactory
Manufactures and initializes a new property definition, which describes allowed properties of a class definition.
It is not normally necessary to create property definitions directly as they are
available through methods of
ClassDefinition
. To extend the
AAF object model as implemented in the MAJ API with user defined classes, the
AAFProperty
annotation can be used to automatically generate
property definitions.
makePropertyDefinition
in interface AAFFactory
identification
- Unique identifier for the new property definition.name
- Display name of the new property definition.type
- Property type for the new property definition.memberOf
- The class that the new property is a member of.isOptional
- Can an object omit a value for this property?
NullPointerException
- One or more of the arguments is null
and they
are all required in this implementation.Related MAJ API constructor
,
ClassDefinition.getPropertyDefinitions()
public Pulldown makePulldown(DataDefinition dataDefinition, Segment inputSegment, PulldownKindType pulldownKind, PulldownDirectionType pulldownDirection, int phaseFrame) throws NullPointerException
AAFFactory
Manufactures and initializes a new pulldown segment, which converts between film frame rates and videotape frame rates.
makePulldown
in interface AAFFactory
dataDefinition
- Kind of data represented by this new component.inputSegment
- A segment that is either a source clip or
timecode segment. The length of input segment object is in the edit
units determined by the pulldown kind and pulldown direction.pulldownKind
- Specifies whether the new pulldown object is converting from nominally 30 Hz
or 25 Hz videoframe rate, and whether frames are dropped or the video is played at another speed.pulldownDirection
- Specifies whether the pulldown object is converting from tape to film
speed or from film to tape speed.phaseFrame
- The phase within the repeating pulldown pattern of the first frame after the
pulldown conversion. A value of 0 specifies that the pulldown object starts
at the beginning of the pulldown pattern.
NullPointerException
- One or more of the arguments is null
and all arguments
are required.Related MAJ API constructor
public RGBADescriptor makeRGBADescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, RGBAComponent[] pixelLayout) throws NullPointerException
AAFFactory
Manufactures and initializes a new RGBA descriptor that does not include or use a palette. An RGBA descriptor specifies that a file source mob is associated with video essence formatted with three color components, or with three color components and an alpha component.
makeRGBADescriptor
in interface AAFFactory
containerFormat
- Container mechanism used to store the essence.storedHeight
- Number of pixels in vertical dimension of stored view.storedWidth
- Number of pixels in horizontal dimension of stored view.frameLayout
- Describes whether all data for a complete sample is in one
frame or is split into more than one field.videoLineMap
- The scan line in the analog source that corresponds to the
beginning of each digitized field. For single-field video, there is 1 value in
the array; for interlaced video, there are 2 values in the array.imageAspectRatio
- Describes the ratio between the horizontal size and the vertical
size in the intended final image.pixelLayout
- Order and size of the components within the pixel.
NullPointerException
- One or more of the arguments is null
.Related MAJ API constructor
,
CodecConstant.RGBA
public RGBADescriptor makeRGBADescriptor(ContainerDefinition containerFormat, @UInt32 int storedHeight, @UInt32 int storedWidth, LayoutType frameLayout, @VideoLineMap int[] videoLineMap, Rational imageAspectRatio, RGBAComponent[] pixelLayout, @DataValue byte[] palette, RGBAComponent[] paletteLayout) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new RGBA descriptor that includes a palette. An RGBA descriptor specifies that a file source mob is associated with video essence formatted with three color components, or with three color components and an alpha component.
Note that this method can be used to create a descriptor for image data
that does not have a palette, although this will result in the storage of
redundant data within the descriptor. If a palette is not required, use
makeRGBAComponent(..., Rational, RGBAComponent[])
instead.
makeRGBADescriptor
in interface AAFFactory
containerFormat
- Container mechanism used to store the essence.storedHeight
- Number of pixels in vertical dimension of stored view.storedWidth
- Number of pixels in horizontal dimension of stored view.frameLayout
- Describes whether all data for a complete sample is in one
frame or is split into more than one field.videoLineMap
- The scan line in the analog source that corresponds to the
beginning of each digitized field. For single-field video, there is 1 value in
the array; for interlaced video, there are 2 values in the array.imageAspectRatio
- Describes the ratio between the horizontal size and the vertical
size in the intended final image.pixelLayout
- Order and size of the components within the pixel.palette
- Palette to include with this digital image descriptor.paletteLayout
- Layout of the values within the palette.
NullPointerException
- One or more of the arguments is null
.
IllegalArgumentException
- The given values are outside acceptable bounds or
the pixel layout requires a palette and an adequate palette is not provided.Related MAJ API constructor
,
CodecConstant.RGBA
public RecordingDescriptor makeRecordingDescriptor()
AAFFactory
Manufactures and initializes a new recording descriptor, which describes the source of file source material that has no physical source.
When no physical source exists for file source material, such as in the case of live recordings, a recording source may be used to represent the source. A recording source is analogous to a tape source except that it does not represent a source that physically existed. It is used to provide a timecode reference to file source material.
makeRecordingDescriptor
in interface AAFFactory
Related MAJ API constructor
,
PhysicalDescriptor
public ScopeReference makeScopeReference(DataDefinition dataDefinition, int relativeScope, int relativeSlot) throws NullPointerException
AAFFactory
Manufactures and initializes a new scope reference object, which refers to a section in the specified mob slot or nested scope slot.
makeScopeReference
in interface AAFFactory
dataDefinition
- Data definition for the referenced slot and for this component.relativeScope
- Number of nested scopes to pass to find the nested scope slot or
mob owning the slot.relativeSlot
- Number of slots that precede the slot owning the scope reference to pass to find the
slot referenced.
NullPointerException
- Data definition is null
.Related MAJ API constructor
public Selector makeSelector(Segment selected) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes a new selector segment, which provides the value of a single segment while preserving references to unused alternatives. This list of alternatives is initialized to an empty list. The length and kind of data represented by this component is extracted from the given selected segment.
makeSelector
in interface AAFFactory
selected
- Initial and currently selected element.
NullPointerException
- Selected element is null
.
BadLengthException
- The given selected segment has a negative length.Related MAJ API constructor
public Sequence makeSequence(DataDefinition dataDefinition) throws NullPointerException
AAFFactory
Manufactures and initializes a new sequence, which combines an ordered list of segments and transitions.
makeSequence
in interface AAFFactory
dataDefinition
- Kind of data represented by this component.
NullPointerException
- Data definition is null
.Related MAJ API constructor
public SoundDescriptor makeSoundDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, int channels, int quantizationBits) throws NullPointerException
AAFFactory
Manufactures and initializes a new sound descriptor, which specifies that a file source mob is associated with audio essence.
makeSoundDescriptor
in interface AAFFactory
containerFormat
- Identifies the container mechanism used to store the essence.audioSamplingRate
- Sampling rate of the audio essence.channels
- Number of audio channels.quantizationBits
- Number of quantization bits.
NullPointerException
- One or both of the container format and/or sampling rate
is null
.Related MAJ API constructor
public SourceClip makeSourceClip(DataDefinition dataDefinition, long length, SourceReferenceValue sourceReference) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes a new source clip, which represents an item of essence
and identifies the source of the essence. The required source reference
values can be created using the following methods of the SourceReferenceValue
class:
SourceReferenceValue(tv.amwa.maj.record.MobID, int, Long)
.inContextReference(int)
or
inContextReference(int, Long)
.SourceReferenceValue.originalSource()
.
makeSourceClip
in interface AAFFactory
dataDefinition
- Kind of data represented by this component.length
- Length of the source clip component.sourceReference
- Reference to the source clip.
NullPointerException
- The data definition and/or source reference arguments
is/are null
.
BadLengthException
- The length of the component is negative.Related MAJ API constructor
,
SourceReferenceValue
,
SourceReferenceValue
,
SourceReferenceSegment
public SourceMob makeSourceMob(MobID mobID, @AAFString String name, EssenceDescriptor essenceDescription) throws NullPointerException
AAFFactory
Manufactures and initializes a new source mob, which describes essence that is either stored in
a digital form in a file or stored on a physical media, such as tape or film. The required
properties of creation time and last modified time will be set automatically to the time of
calling this method. These timestamp values can subsequently
be set manually by calling setCreateTime()
and setModTime()
.
makeSourceMob
in interface AAFFactory
mobID
- Unique identifier for the mob.name
- Name of the source mob.essenceDescription
- Describes the format of the essence associated with the new source mob.
NullPointerException
- The mob id and/or essence description arguments are
null
.Related MAJ API constructor
,
Mob
public StaticMobSlot makeStaticMobSlot(int slotId, Segment segment) throws NullPointerException
AAFFactory
Manufactures and initializes a new static mob slot, which describes essence data that has no relationship to time, such as a static image.
makeStaticMobSlot
in interface AAFFactory
slotId
- An integer that is used to reference the new mob slot.segment
- Value of the mob slot.
NullPointerException
- The segment argument is null
.Related MAJ API constructor
,
MobSlot
public TIFFDescriptor makeTIFFDescriptor(ContainerDefinition containerFormat, boolean isUniform, boolean isContiguous, byte[] summary) throws NullPointerException
AAFFactory
Manufactures and initializes a new TIFF descriptor, which specifies that a file source mob is associated with video essence formatted according to the TIFF specification.
makeTIFFDescriptor
in interface AAFFactory
containerFormat
- Container format of the TIFF data.isUniform
- Does the data have the same number of rows per strip throughout?isContiguous
- Is the data stored in contiguous bytes?summary
- A copy of the TIFF IFD, without the sample data.
NullPointerException
- The container format and/or summary arguments are null
and both are required.Related MAJ API constructor
public TaggedValue makeTaggedValue(String name, TypeDefinition typeDef, Object value) throws NullPointerException, ClassCastException
AAFFactory
Manufactures and initializes a new tagged value, which specifies a user-defined tag and value.
makeTaggedValue
in interface AAFFactory
name
- User defined name (tag) of the tagged value object.typeDef
- Type definition of the following value data.value
- Value of the given type.
NullPointerException
- One or more of the arguments is null
and
all arguments are required.
ClassCastException
- The given value cannot be cast to a value of the given
type.Related MAJ API constructor
,
TaggedValueDefinition
public TaggedValueDefinition makeTaggedValueDefinition(AUID identification, String name) throws NullPointerException
AAFFactory
Manufactures and initializes all the fields of a tagged value definition, which can be used to document the tagged value objects used in an AAF persistent unit.
makeTaggedValueDefinition
in interface AAFFactory
identification
- Unique identifier for the new tagged value definition object.name
- Display name of the new tagged value definition object.
NullPointerException
- One or both of the arguments is null
.Related MAJ API constructor
,
TaggedValue
,
Dictionary.getTaggedValueDefinitions()
public TapeDescriptor makeTapeDescriptor()
AAFFactory
Manufactures and initializes a new tape descriptor, which describes audio tape or video tape media.
makeTapeDescriptor
in interface AAFFactory
Related MAJ API constructor
public TextLocator makeTextLocator(String name) throws NullPointerException
AAFFactory
Manufactures and initializes a new text locator, which provides information to help find a file containing essence or to help find the physical media.
makeTextLocator
in interface AAFFactory
name
- Text string containing information to help find the file containing the essence
or the physical media.
NullPointerException
- Location of the media is null
.Related MAJ API constructor
,
Locator
public TimecodeSegment makeTimecodeSegment(long length, TimecodeValue timecode) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes a new timecode segment, which stores videotape or
audio tape timecode information. To create the required timecode
value, call AAFFactory.makeTimecodeValue(long, short, boolean)
.
Note that in the MAJ API, the timecode segment class is known as "TimecodeSegment
"
whereas in the AAF specification it is known as just "Timecode
". See the section on
naming conflicts in the package description for
more details. As a result, calling this method is the same as calling
makeTimecode()
.
makeTimecodeSegment
in interface AAFFactory
length
- The length of this component.timecode
- Timecode value of the new timecode segment.
NullPointerException
- The timecode value is null
.
BadLengthException
- Cannot set the length of a component to a negative value.Related MAJ API constructor
,
TimecodeValue
,
AAFFactory.makeTimecodeValue(long, short, boolean)
,
AAFFactory.makeTimecode(long, tv.amwa.maj.record.TimecodeValue)
public TimecodeSegment makeTimecode(long length, TimecodeValue timecode) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes a new timecode segment, which stores videotape or
audio tape timecode information. To create the required timecode
value, call AAFFactory.makeTimecodeValue(long, short, boolean)
.
Note that in the MAJ API, the timecode segment class is known as "TimecodeSegment
"
whereas in the AAF specification it is known as just "Timecode
". See the section on
naming conflicts in the package description for
more details. As a result, calling this method is the same as calling
makeTimecodeSegment()
.
makeTimecode
in interface AAFFactory
length
- The length of this component.timecode
- Timecode value of the new timecode segment.
NullPointerException
- The timecode value is null
.
BadLengthException
- Cannot set the length of a component to a negative value.Related MAJ API constructor
,
TimecodeValue
,
AAFFactory.makeTimecodeValue(long, short, boolean)
public TimecodeStream12M makeTimecodeStream12M(Rational sampleRate, @DataBuffer byte[] source, TCSource sourceType) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new SMPTE 12M-compliant timecode stream, which specifies a stream of timecode data in the SMPTE 12M format.
makeTimecodeStream12M
in interface AAFFactory
sampleRate
- Sample rate of the timecode data contained in the source property.source
- The timecode data.sourceType
- Kind of timecode data.
NullPointerException
- One or more of the arguments is null
and all
are required.
IllegalArgumentException
Related MAJ API constructor
,
TimecodeStream
public TimecodeValue makeTimecodeValue(long start, short fps, boolean drop)
AAFFactory
Manufactures and initializes a new timecode value.
makeTimecodeValue
in interface AAFFactory
start
- Timecode at the beginning of the segment.fps
- Frames per second of the videotape or audio tape.drop
- Does the timecode contain drop values?
Related MAJ API constructor
,
TimecodeValue
,
TimecodeSegment
,
AAFFactory.makeTimecodeSegment(long, tv.amwa.maj.record.TimecodeValue)
public TimelineMobSlot makeTimelineMobSlot(int slotId, Segment segment, Rational editRate, long origin) throws NullPointerException
AAFFactory
Manufactures and initializes a new timeline mob slot, which describes time-varying timeline essence.
makeTimelineMobSlot
in interface AAFFactory
slotId
- Integer that is used to reference the mob slot.segment
- Value of the new timeline mob slot.editRate
- Units of time for the new timeline mob slot.origin
- Offset used to resolve source clip references to the
new timeline mob slot. A positive value of origin means that the first sample of the essence
is earlier than the zero position. A negative value of origin means that the zero position is
earlier than the first sample of the essence.
NullPointerException
- The segment and/or edit rate arguments is/are null
.Related MAJ API constructor
,
MobSlot
public Transition makeTransition(DataDefinition dataDefinition, long length, OperationGroup operationGroup, long cutPoint) throws NullPointerException
AAFFactory
Manufactures and initializes a transition, which specifies that the two adjacent segments should be overlapped when they are played and that the overlapped sections should be combined using the specified effect.
makeTransition
in interface AAFFactory
dataDefinition
- Kind of data represented by the new transition component.length
- Length of the transition component.operationGroup
- An operation group that specifies the effect to be performed during the
new transition.cutPoint
- The point at which a cut would be inserted if the transition
were removed.
NullPointerException
- The data definition and/or operation group arguments
is/are null
.Related MAJ API constructor
,
Sequence
public TypeDefinitionCharacter makeTypeDefinitionCharacter(AUID identification, String typeName) throws NullPointerException
AAFFactory
Manufactures and initializes a new type definition for characters,
which defines a property type that has a value of a single 2-byte character similar to Java's char
type.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionCharacter
in interface AAFFactory
identification
- AUID used to identify this type.typeName
- Friendly name used to identify this type.
NullPointerException
- The identification is null
.Related MAJ API constructor
,
TypeDefinitionCharacter.Character
,
TypeDefinition
public TypeDefinitionEnumeration makeTypeDefinitionEnumeration(AUID identification, String typeName, Class<?> enumeration) throws NullPointerException
AAFFactory
Manufactures and initializes an enumeration type definition, which defines a property type that can have one of a set of integer values. Each of the integer values is an enumeration element and also has an associated name.
An enumeration type definition is initialized with its identity and its enumeration elements as
defined by an Enum
class implementing AAFEnumerationValue
.
For any enumeration value, this interface provides the
value()
method that is
used to find the integer (Int64
) value associated with the enumeration token in
the AAF object specification and associated registers.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionEnumeration
in interface AAFFactory
identification
- Unique identifier to be used to identify this type.typeName
- Display name for the enumeration type definition.enumeration
- Java enumeration class representing this type definition and defining
its enumeration elements.
NullPointerException
- One or more of the arguments is null
,
or one or more of the elements of the names array is null.Related MAJ API constructor
,
AAFEnumerationValue
,
tv.amwa.maj.enumeration package,
TypeDefinition
public TypeDefinitionExtendibleEnumeration makeTypeDefinitionExtendibleEnumeration(AUID identification, @AAFString String typeName, SortedMap<String,AUID> elements) throws NullPointerException, DuplicateException
AAFFactory
Manufactures and initializes a new extendible
enumeration type definition, which defines a property type that can have one of an extendible set
of AUID values. The initial set of (possibly empty) elements must
be provided as a map from element name to AUID. Further enumeration elements can then be specified using the
appendElement(AUID, String)
method.
The MAJ API provides a means of managing extendible enumerations through the extendible enumeration factory and extendible enumeration item annotation.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionExtendibleEnumeration
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name of the type definition.elements
- Map containing element names and the AUIDs they map to.
NullPointerException
- The identification and/or elements arguments is/are
null
.
DuplicateException
- The given representation of an extendible enumeration
contains duplicate AUID values.Related MAJ API constructor
,
ExtendibleEnumerationWarehouse
,
ExtendibleEnumerationItem
,
ColorPrimariesType
,
TypeDefinition
public TypeDefinitionFixedArray makeTypeDefinitionFixedArray(AUID identification, String typeName, TypeDefinition typeDefinition, int numberElements) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new fixed array type definition, which defines a property type that has a fixed number of values of the underlying type. The order of the values is meaningful.
The following types are allowed as the underlying type for fixed array type definitions:
TypeDefinitionInteger
TypeDefinitionRecord
TypeDefinitionEnumeration
TypeDefinitionExtendibleEnumeration
TypeDefinitionFixedArray
If the element type is not one of the above kinds, an IllegalArgumentException
is
thrown.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionFixedArray
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name of the fixed array type definition.typeDefinition
- Type of each element to be contained in an array defined
by the fixed array type definition.numberElements
- Number of elements of this kind of array.
NullPointerException
- The identification and/or element type arguments is/are
null
.
IllegalArgumentException
- The given underlying type is not compatible
with the types supported by fixed size arrays.Related MAJ API constructor
,
TypeDefinition
,
TypeDefinitionVariableArray
public TypeDefinitionIndirect makeTypeDefinitionIndirect(AUID identification, String typeName) throws NullPointerException
AAFFactory
Manufactures and initializes a new indirect type definition, which defines a property type that has a value whose type is specified in each instance.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionIndirect
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name of the new indirect type definition.
NullPointerException
- The identification argument is null
.Related MAJ API constructor
,
TypeDefinition
,
TypeDefinitionIndirect
public TypeDefinitionInteger makeTypeDefinitionInteger(AUID identification, String typeName, byte intSize, boolean isSigned) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new integer type definition, which defines a property type that is a signed or an unsigned integer with the specified number of bytes.
The implementation of this method may only allow certain values
for the intSize
. It will allow at least 1, 2, 4, and 8 byte
integers; some implementations may allow more than that.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionInteger
in interface AAFFactory
identification
- AUID to use to identify this type.typeName
- Friendly name for the integer type definition.intSize
- Number of bytes used to represent a value.isSigned
- Is the integer type signed?
NullPointerException
- The identification argument is null
.
IllegalArgumentException
- The implementation does not support the given number of
bytes per integer value.Related MAJ API constructor
,
tv.amwa.maj.integer package,
TypeDefinition
public TypeDefinitionOpaque makeTypeDefinitionOpaque(AUID identification, String typeName) throws NullPointerException
AAFFactory
Manufactures and initializes a new opaque type definition, which defines a property type that has a value whose type is specified in each instance.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionOpaque
in interface AAFFactory
identification
- AUID used to identify this type.typeName
- Friendly name for the opaque type definition.
NullPointerException
- The identification argument is null
.Related MAJ API constructor
,
TypeDefinition
,
TypeDefinitionIndirect
public TypeDefinitionRecord makeTypeDefinitionRecord(AUID identification, String typeName, String[] names, Map<String,TypeDefinition> elements) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new record type definition, which defines a property type that consists of an ordered set of fields, where each field has a name and type.
It is only possible to use the following types as members of a record:
TypeDefinitionInteger
TypeDefinitionRecord
TypeDefinitionEnumeration
TypeDefinitionExtendibleEnumeration
TypeDefinitionFixedArray
If a type definition of a kind other than one listed above is used, an
IllegalArgumentException
will be thrown.
Record type definitions provide a documented mechanism for extended the AAF meta model.
However, care must be taken as any user-defined record types may not be interoperable with
other systems if the record is not registered. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. TThe full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionRecord
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name for the record type definition.names
- Names of the element of the record in the order of the records.elements
- Elements of the records represented as a map from name to type.
NullPointerException
- One or more of the identification, names or elements
arguments is null
, or one or more of the elements of the given arrays is
null
.
IllegalArgumentException
- One or more of the types contained in
the member type array is not a permissible type for a record. Alternatively, a
member type name is duplicated in the given array of member names.Related MAJ API constructor
,
tv.amwa.maj.record package,
TypeDefinition
public TypeDefinitionRename makeTypeDefinitionRename(AUID identification, String typeName, TypeDefinition baseType) throws NullPointerException
AAFFactory
Manufactures and initializes a new renamed type definition, which defines a property type that has the same structure and representation as its underlying type but has a different meaning. Required method parameters include the underlying base type the new type is an alias for, along with its own new identity.
makeTypeDefinitionRename
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name of the rename type definition.baseType
- Underlying base type this new rename type definition is an
alias for.
NullPointerException
- One or more of the arguments is null
.Related MAJ API constructor
,
KLVDataDefinition
,
TypeDefinition
public TypeDefinitionSet makeTypeDefinitionSet(AUID identification, @AAFString String typeName, TypeDefinitionObjectReference elementType) throws NullPointerException
AAFFactory
Manufactures and initializes a new set type definition, which defines a property type that has a collection of object references to uniquely identified objects. The order of the objects has no meaning.
Typically, the friendly name of a set type definition is either:
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionSet
in interface AAFFactory
identification
- AUID to be used to identify this type of set.typeName
- Friendly name for this type definition.elementType
- Type definition of each element contained in this set.
NullPointerException
- The identification and/or element type arguments is/are
null
.Related MAJ API constructor
,
TypeDefinitionVariableArray
,
TypeDefinition
public TypeDefinitionStream makeTypeDefinitionStream(AUID identification, String typeName) throws NullPointerException
AAFFactory
Manufactures and initializes a new type definition for a streams, which defines a property type that is stored in a stream and has a value that consists of a varying number of the bytes. The order of the bytes is meaningful.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionStream
in interface AAFFactory
identification
- AUID to be used to identify this stream type.typeName
- Friendly name for this type definition.
NullPointerException
- One or more of the arguments is null
.Related MAJ API constructor
,
DataBuffer
,
DataValue
,
TypeDefinition
public TypeDefinitionString makeTypeDefinitionString(AUID identification, String typeName, TypeDefinition typeDefinition) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new string type definition, which defines a property type that consists of a zero-terminated array of the underlying character or integer type.
Parameters for this method include the with its identity underlying data representation. Acceptable underlying type definitions are:
The MAJ API implementation of this interface uses TypeDefinitionCharacter
as
the underlying type and uses Java's built-in string handling.
However, by using a call to TypeDefinitionString.setCharacterSet(String)
it is possible to define mappings between different kinds of character sets and
Java strings.
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionString
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name for the string data type.typeDefinition
- Type of each element to be contained in the array.
NullPointerException
- The identification and/or type definition arguments is/are
null
.
IllegalArgumentException
- The given type is not an acceptable underlying
type for a string type definition.Related MAJ API constructor
,
AAFFactory.makeTypeDefinitionCharacter(tv.amwa.maj.record.AUID, String)
,
AAFFactory.makeTypeDefinitionInteger(tv.amwa.maj.record.AUID, String, byte, boolean)
,
AAFString
,
TypeDefinition
public TypeDefinitionStrongObjectReference makeTypeDefinitionStrongObjectReference(AUID identification, @AAFString String typeName, ClassDefinition referencedType) throws NullPointerException
AAFFactory
Manufactures and initializes a new strong object reference type definition, which defines a property type that defines an object relationship where the target of the strong reference is owned by the object with the property. An object can be the target of only one strong reference.
Typically, the friendly name of a strong reference to an instance of class "X" is known as "StrongReference to X", e.g. "StrongReference to SourceClip".
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionStrongObjectReference
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name of the type definition.referencedType
- Class definition of objects that it is permissible
for this type of object reference to reference.
NullPointerException
- The identification and/or referenced type is/are
null
.Related MAJ API constructor
,
TypeDefinitionObjectReference
,
TypeDefinitionWeakObjectReference
,
TypeDefinition
public TypeDefinitionVariableArray makeTypeDefinitionVariableArray(AUID identification, @AAFString String typeName, TypeDefinition elementType) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new variable size array type definition, which defines a property type that has a varying number of values of the underlying type. The order of the values is meaningful.
Note that it is only possible to use certain types as the
element type and an IllegalArgumentException
is thrown if the
given type is not permitted. The permissible types are:
TypeDefinitionInteger
TypeDefinitionRecord
TypeDefinitionEnumeration
TypeDefinitionExtendibleEnumeration
TypeDefinitionFixedArray
TypeDefinitionObjectReference
Typically, the friendly name of a variable size array type definition is either:
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionVariableArray
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name of the type definition.elementType
- Type of each element to be contained in the array.
NullPointerException
- The identification and/or element type arguments is/are
null
.
IllegalArgumentException
- The given element type is not permitted
for elements of a varying size array.Related MAJ API constructor
public TypeDefinitionWeakObjectReference makeTypeDefinitionWeakObjectReference(AUID identification, String typeName, ClassDefinition objectType, AUID[] targetSet) throws NullPointerException
AAFFactory
Manufactures and initializes a new weak object reference type definition, which defines a property type that defines an object relationship where the target of the weak reference is referenced by the object with the property. Only objects that define a unique identification (AUID or mob id) can be the targets of weak object references. An object can be the target of one or more than one weak references.
The targetSet
parameter points to an array of
property definition AUIDs that indicate the location of the property
containing the target of the weak reference. The AUIDs indicate the
containment path to the target property, starting at the root header
object.
For example, if the containment hierarchy is:
Header->A->B->C
Note that the final AUID
must
correspond to a property that is currently set.
Typically, the friendly name of a weak reference to an instance of class "X" is known as "WeakReference to X", e.g. "WeakReference to Mob".
Creating new and unregistered type definitions is a specialist activity and not recommended in normal API use as this may cause
interoperability issues with other systems. The official registry of type definitions
is or soon will be available from SMPTE at SMPTE Metadata Registries
And Related Items. The full range of data types documented in the
AAF object
specification v1.1 can be accessed by name or identification using either
AAFFactory.typeDefinitionForName(String)
or
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
respectively.
makeTypeDefinitionWeakObjectReference
in interface AAFFactory
identification
- AUID to be used to identify this type.typeName
- Friendly name of the type definition.objectType
- Class definition of objects that the reference is permitted
to reference. The referenced object may also belong to a subclass of the
referenced class.targetSet
- List of property definition ids that indicate where
the target of the reference is to be found.
NullPointerException
- One or more of the identification, object type or target
set arguments is null and all are required.Related MAJ API constructor
,
TypeDefinitionObjectReference
,
TypeDefinitionStrongObjectReference
,
TypeDefinition
public VaryingValue makeVaryingValue(ParameterDefinition parameterDefinition, InterpolationDefinition interpolation) throws NullPointerException
AAFFactory
Manufactures and initializes a new varying value, which specifies a changing data value for an effect control value. The value is identified with the given parameter definition, and requires an interpolation definition to define how the value will be calculated.
The order of the creation of varying values and control points may not be immediately obvious. Although the list of control points for a varying value should not be empty, varying values are used to help manufacture their own control points. The process of setting up a varying value is as follows:
VaryingValue.addControlPoint(ControlPoint)
.
makeVaryingValue
in interface AAFFactory
parameterDefinition
- Parameter definition for the varying value, which
determines the type of the varying value.interpolation
- Specifies the kind of interpolation to be used to
find the value between control points.
NullPointerException
- One or more of the arguments is null
and
all are required.Related MAJ API constructor
,
ControlPoint
,
Parameter
public WAVEDescriptor makeWAVEDescriptor(ContainerDefinition containerFormat, byte[] summary) throws NullPointerException
AAFFactory
Manufactures and initializes a new WAVE descriptor, which specifies that a file source mob is associated with audio essence formatted according to the RIFF Waveform Audio File Format (WAVE).
makeWAVEDescriptor
in interface AAFFactory
containerFormat
- Container mechanism used to store the essence.summary
- A copy of the WAVE file information without the sample data.
NullPointerException
- One or both of the arguments is/are null
and both are required.Related MAJ API constructor
,
CodecConstant.WAVE
public TypeDefinition typeDefinitionForName(String typeName) throws NullPointerException, ObjectNotFoundException
AAFFactory
Finds and returns the type definition for the given type name. Names are expected to be formatted in the same way as names in the AAF object specification or the AAF meta dictionary, for example:
UInt32
Int8Array
WeakReferenceVector of TypeDefinition
StrongReference to CompositionMob
StrongReferenceVector<Component>
WeakReference<ClassDefinition>
typeDefinitionForName
in interface AAFFactory
typeName
- Name of the type definition to check for.
NullPointerException
- The given type definition name is null
.
ObjectNotFoundException
- A type definition with the given name could not be found.TypeDefinitionWarehouse.forName(String)
,
AAFFactory.typeDefinitionForIdentification(tv.amwa.maj.record.AUID)
,
TypeDefinition
public TypeDefinition typeDefinitionForIdentification(AUID identification) throws NullPointerException, ObjectNotFoundException
AAFFactory
Finds and returns the type definition for the given type identification. For
example, the type definition for "Int32
" is represented by the following universal
label:
uuid:x-ul:060E2B34.0104.0101.01010700.00000000
typeDefinitionForIdentification
in interface AAFFactory
identification
- Identification for the type to find and return.
NullPointerException
- The identification is null
.
ObjectNotFoundException
- A type definition with the given identification
could not be found.TypeDefinitionWarehouse.forIdentification(tv.amwa.maj.record.AUID)
,
AAFFactory.typeDefinitionForName(String)
,
TypeDefinition
public DataDefinition dataDefinitionForName(String definitionName) throws NullPointerException, ObjectNotFoundException
AAFFactory
Finds and returns a data definition from the given data definition name. Names should match those given in section 22.1 of the AAF specification version 1.1.
dataDefinitionForName
in interface AAFFactory
definitionName
- Name of the definition to search for and retrieve.
NullPointerException
- The data definition name argument is null
.
ObjectNotFoundException
- A data definition of the given name could not be found.DataDefinition.forName(String)
public AES3PCMDescriptor makeAES3PCMDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, int channels, int quantizationBits, short blockAlign, int averageBPS) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures a new AES3 PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format.
makeAES3PCMDescriptor
in interface AAFFactory
containerFormat
- Identifies the container mechanism used to store the essence.audioSamplingRate
- Sampling rate of the audio essence.channels
- Number of audio channels.quantizationBits
- Number of quantization bits.blockAlign
- Sample block alignment.averageBPS
- Average bytes per second.
NullPointerException
- The container format or sampling rate properties are
null
.
IllegalArgumentException
- Cannot set the channels, quantization bits, block align
or average bits per second values to negative values.Related MAJ API constructor
,
PCMDescriptor
public BWFImportDescriptor makeBWFImportDescriptor()
AAFFactory
Manufactures and initializes a new BWF import descriptor,
which specifies imported audio data essence encoded according to the Broadcast Wave specifications.
The list of descriptors should not be empty, so call MultipleDescriptor.appendFileDescriptor(AAFFileDescriptor)
after calling this method.
makeBWFImportDescriptor
in interface AAFFactory
Related MAJ API constructor
,
ImportDescriptor
public DataEssenceDescriptor makeDataEssenceDescriptor(ContainerDefinition containerFormat) throws NullPointerException
AAFFactory
Manufactures and initializes a new data essence descriptor, which specifies that a file source mob is associated with data essence.
makeDataEssenceDescriptor
in interface AAFFactory
containerFormat
- Container format of the associated data essence.
NullPointerException
- The container format argument is null
.Related MAJ API constructor
public DescriptiveClip makeDescriptiveClip(DataDefinition dataDefinition, long length, SourceReferenceValue sourceReference) throws NullPointerException, BadLengthException
AAFFactory
Manufactures and initializes a new descriptive clip, which specifies what is being described and references a mob to provide that description.
makeDescriptiveClip
in interface AAFFactory
dataDefinition
- Kind of data represented by this component.length
- Length of the source clip component.sourceReference
- Reference to the mob providing the description.
NullPointerException
- The data definition and/or source reference arguments are
null
.
BadLengthException
- The length of a descriptive clip cannot be negative.Related MAJ API constructor
,
SourceClip
public HTMLClip makeHTMLClip(MobID sourceID, int sourceMobSlotID) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new HTML clip, which represents an HTML document and identifies the source of the document. An HTML clip must have a data definition of "Auxiliary" and is static and so has no length.
makeHTMLClip
in interface AAFFactory
sourceID
- Reference to the mob containing the HTML essence.sourceMobSlotID
- Reference to the slot in the mob containing the HTML clip.
NullPointerException
- The source ID argument is null
.
IllegalArgumentException
- The slot ID value must be non-negative.Related MAJ API constructor
,
TextClip
public HTMLDescriptor makeHTMLDescriptor(ContainerDefinition containerFormat) throws NullPointerException
AAFFactory
Manufactures and initializes a new HTML descriptor, which describes static essence in the HTML file format.
makeHTMLDescriptor
in interface AAFFactory
containerFormat
- Container format of the described HTML essence.
NullPointerException
- The container format argument is null
.Related MAJ API constructor
public MPEGVideoDescriptor makeMPEGVideoDescriptor(ContainerDefinition containerFormat, int storedHeight, int storedWidth, LayoutType frameLayout, int[] videoLineMap, Rational imageAspectRatio, int horizontalSubsampling, int componentWidth) throws NullPointerException, IllegalArgumentException
AAFFactory
Manufactures and initializes a new MPEG video descriptor , which specifies that a file source mob is associated with video essence that is represented and coded according to the MPEG specifications.
makeMPEGVideoDescriptor
in interface AAFFactory
containerFormat
- Container mechanism used to store the essence.storedHeight
- Number of pixels in vertical dimension of the stored view.storedWidth
- Number of pixels in horizontal dimension of the stored view.frameLayout
- Describes whether all data for a complete sample is in one
frame or is split into more than one field.videoLineMap
- The scan line in the analog source that corresponds to the
beginning of each digitized field. For single-field video, there is 1 value in
the array; for interlaced video, there are 2 values in the array.imageAspectRatio
- Describes the ratio between the horizontal size and the vertical
size in the intended final image.horizontalSubsampling
- Ratio of luminance sampling to chrominance sampling in the
horizontal direction. For 4:2:2 video, the value is 2, which means that there are twice as
many luminance values as there are color-difference values. Legal values are 1,
2 and 4.componentWidth
- Number of bits used to store each component. Can have a value of
8, 10 or 16. Each component in a sample is
packed contiguously; the sample is filled with the number of bits specified by the optional
padding bits property. If the padding bits property is omitted, samples are packed contiguously.
NullPointerException
- One or more of arguments is null
.
IllegalArgumentException
- The given values are not within the permitted ranges.Related MAJ API constructor
,
CDCIDescriptor
public MultipleDescriptor makeMultipleDescriptor(Rational sampleRate, @LengthType long length)
AAFFactory
Manufactures and initializes a new multiple descriptor, which
content data associated with a single file source mob
that contains multiple tracks of essence.
makeMultipleDescriptor
in interface AAFFactory
sampleRate
- Sample rate for the content represented by this multiple descriptor.length
- Length of content represented by this multiple descriptor.
MultipleDescriptor.MultipleDescriptor(tv.amwa.maj.record.Rational, long)
,
AAFFileDescriptor.getLinkedSlotID()
,
AAFFileDescriptor.setLinkedSlotID(Integer)
public RIFFChunk makeRIFFChunk(int chunkID)
AAFFactory
Manufactures and initializes a new RIFF data chunk with the given chunk identifier. The identifier is used to represent 4 ASCII characters that represent the kind of data stored inside the chunk.
makeRIFFChunk
in interface AAFFactory
chunkID
- Identifier for the new chunk.
Related MAJ API constructor
,
BWFImportDescriptor.getUnknownBWFChunks()
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |