@MediaClass(uuid1=218169601, uuid2=257, uuid3=14080, uuid4={6,14,43,52,2,6,1,1}, definedName="SourcePackage", aliases="SourceMob", description="The SourcePackage class describes essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film.", symbol="SourcePackage") public class SourcePackageImpl extends PackageImpl implements SourcePackage, Serializable, Cloneable
Implements the description of essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film. The description is provided by an essence descriptor, which is either a tape descriptor, file descriptor, film descriptor, or some extended descriptor.
ObjectClassPropertyIDFULL_RANGE| Constructor and Description |
|---|
SourcePackageImpl()
Default constructor is not public to avoid unset required fields.
|
SourcePackageImpl(PackageID packageID,
String name,
EssenceDescriptor essenceDescription)
Creates and initializes a new source package, 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNilReference(int trackID,
long length,
DataDefinition dataDefinition,
Rational editRate)
Adds a track containing an original source reference to this source package.
|
void |
addPulldownReference(AppendOption addType,
Rational editRate,
int trackID,
DataDefinition essenceKind,
SourceReferenceValue reference,
long sourceReferenceLength,
PulldownKindType pulldownKind,
int phaseFrame,
PulldownDirectionType direction)
Connects the given source package with the physical source package
that describes the previous generation of essence, with an
additional pulldown as part of the reference
to indicate a non 1 to 1 relationship between the two.
|
void |
addStaticNilReference(int trackID,
DataDefinition dataDefinition) |
void |
appendEdgecodeTrack(Rational editRate,
int trackID,
long startEC,
long length,
FilmType filmKind,
EdgeType codeFormat,
byte[] header)
Creates and adds an edgecode track to the film package represented by this
source package, with the given starting edgecode, length and edit rate.
|
void |
appendPhysicalSourceReference(Rational editRate,
int trackID,
DataDefinition essenceKind,
SourceReferenceValue reference,
long sourceReferenceLength)
Connects this source package with the physical source package that
describes the previous generation of essence, appending it to the
existing package chain.
|
void |
appendTimecodeTrack(Rational editRate,
int trackID,
TimecodeValue startTC,
long length)
Creates and adds a timecode track to a tape package represented by this source
package, with the given starting timecode, length and edit rate.
|
SourcePackage |
clone()
Create a cloned copy of this interchange object.
|
EssenceDescriptor |
getEssenceDescription()
Returns the essence descriptor of this source package, which describes the format of the essence
associated with the source package.
|
EssenceDescriptor |
getEssenceDescriptor()
Deprecated.
|
static EssenceDescriptor |
initializeEssenceDescription() |
void |
newPhysicalSourceReference(Rational editRate,
int trackID,
DataDefinition essenceKind,
SourceReferenceValue reference,
long sourceReferenceLength)
Connects this source package with the physical source package that
describes the previous generation of essence, appending it to the
existing package chain.
|
List<FindSourceInformation> |
searchSource(int trackID,
long offset,
PackageKind packageKind,
CriteriaType mediaCriteria,
OperationChoice operationChoice)
Returns the source information for a track in a material package or source package.
|
void |
setEssenceDescription(EssenceDescriptor essenceDescriptor)
Sets the essence descriptor of this source package, which describes the format of the essence
associated with the source package.
|
void |
setEssenceDescriptor(EssenceDescriptor essenceDescriptor)
Deprecated.
|
void |
specifyValidCodeRange(DataDefinition essenceKind,
int trackID,
Rational editRate,
long startOffset,
long length)
Creates and adds a track containing source clips to the
source package to indicate that a (recently added) timecode track or edgecode track is
valid for that channel.
|
appendMobAttributeItem, appendNewEventTrack, appendNewStaticTrack, appendNewTimelineTrack, appendPackageAttribute, appendPackageAttribute, appendPackageKLVData, appendPackageTrack, appendPackageUserComment, appendPackageUserComment, changeReference, clearMobAttributeList, clearPackageAttributes, clearPackageKLVData, clearPackageTracks, clearPackageUserComments, cloneExternal, copy, countMobAttributeList, countPackageAttributes, countPackageKLVData, countPackageTracks, countPackageUserComments, getAUID, getConvertFrameRate, getCreationTime, getCreationTimeString, getMobAttributeItemAt, getMobAttributeList, getPackageAttributes, getPackageID, getPackageIDString, getPackageKLVData, getPackageLastModified, getPackageLastModifiedString, getPackageName, getPackageTrackAt, getPackageTracks, getPackageUsage, getPackageUsageString, getPackageUserComments, getSubclipBegin, getSubclipFullLength, getWeakTargetReference, initializeCreationTime, initializePackageID, initializePackageLastModified, initializePackageTracks, insertMobAttributeItem, insertPackageTrackAt, lookupPackageTrack, offsetToPackageTimecode, prependMobAttributeItem, prependPackageAttribute, prependPackageKLVData, prependPackageTrack, prependPackageUserComment, removeMobAttributeItemAt, removePackageAttribute, removePackageKLVData, removePackageTrackAt, removePackageUserComment, setConvertFrameRate, setCreationTime, setCreationTimeString, setPackageID, setPackageIDString, setPackageLastModified, setPackageLastModifiedString, setPackageName, setPackageUsage, setPackageUsageString, setSubclipBegin, setSubclipFullLengthaddApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getComment, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toStringappendNewEventTrack, appendNewStaticTrack, appendNewTimelineTrack, appendPackageAttribute, appendPackageAttribute, appendPackageKLVData, appendPackageTrack, appendPackageUserComment, appendPackageUserComment, changeReference, clearPackageAttributes, clearPackageKLVData, clearPackageTracks, clearPackageUserComments, cloneExternal, copy, countPackageAttributes, countPackageKLVData, countPackageTracks, countPackageUserComments, getCreationTime, getPackageAttributes, getPackageID, getPackageKLVData, getPackageLastModified, getPackageName, getPackageTrackAt, getPackageTracks, getPackageUsage, getPackageUserComments, insertPackageTrackAt, lookupPackageTrack, offsetToPackageTimecode, prependPackageTrack, removePackageAttribute, removePackageKLVData, removePackageTrackAt, removePackageUserComment, setCreationTime, setPackageID, setPackageLastModified, setPackageName, setPackageUsageaddApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toStringgetPersistentID, setPersistentIndexgetAUID, getWeakTargetReferencepublic SourcePackageImpl()
public SourcePackageImpl(PackageID packageID, @AAFString String name, EssenceDescriptor essenceDescription) throws NullPointerException
Creates and initializes a new source package, 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 be set manually by calling
setCreateTime() and
and setModTime().
packageID - Unique identifier for the package.name - Name of the source package.essenceDescription - Describes the format of the essence associated with thw new source package.NullPointerException - The package id and/or essence description arguments are
null.@MediaProperty(uuid1=100729092, uuid2=515, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="EssenceDescription", typeName="EssenceDescriptorStrongReference", optional=false, uniqueIdentifier=false, pid=18177, symbol="EssenceDescription") public EssenceDescriptor getEssenceDescription()
SourcePackageReturns the essence descriptor of this source package, which describes the format of the essence associated with the source package.
getEssenceDescription in interface SourcePackageTypeDefinitions.EssenceDescriptorStrongReference@Deprecated public EssenceDescriptor getEssenceDescriptor()
SourcePackageReturns the essence descriptor of this source package, which describes the format of the essence associated with the source package.
getEssenceDescriptor in interface SourcePackageTypeDefinitions.EssenceDescriptorStrongReference@MediaPropertySetter(value="EssenceDescription") public void setEssenceDescription(EssenceDescriptor essenceDescriptor) throws NullPointerException
SourcePackageSets the essence descriptor of this source package, which describes the format of the essence associated with the source package.
setEssenceDescription in interface SourcePackageessenceDescriptor - Essence descriptor of this source package.NullPointerException - The given essence descriptor is null.public static final EssenceDescriptor initializeEssenceDescription()
@Deprecated public void setEssenceDescriptor(EssenceDescriptor essenceDescriptor) throws NullPointerException
SourcePackageSets the essence descriptor of this source package, which describes the format of the essence associated with the source package.
setEssenceDescriptor in interface SourcePackageessenceDescriptor - Essence descriptor of this source package.NullPointerException - The given essence descriptor is null.public void addNilReference(int trackID,
long length,
DataDefinition dataDefinition,
Rational editRate)
throws NullPointerException,
IllegalArgumentException,
BadRateException,
BadLengthException,
TrackExistsException
SourcePackageAdds a track containing an original source reference to this source package. This special source id indicates that the package chain ends here, which indicates that no further record exists of where the essence was derived from. Some source clip is still required on the track to indicate that the track exists and may be referenced from other packages.
Examples of source packages that are not derived from a previous source of essence are:
addNilReference in interface SourcePackagetrackID - Track id to be assigned to the new track.length - Duration of the source clip to be added to the new track.dataDefinition - Data definition for the new track.editRate - Edit rate for the new track.NullPointerException - The given data definition and/or edit rate is/are
null.IllegalArgumentException - The given track identifier is nullBadLengthException - The length cannot be a negative value.BadRateException - The edit rate is not valid.TrackExistsException - The given track id matches that of a
track already present in this source package.SourceReferenceValue.isOriginalSource()public void addStaticNilReference(int trackID,
DataDefinition dataDefinition)
throws NullPointerException,
IllegalArgumentException,
TrackExistsException
public void addPulldownReference(AppendOption addType, Rational editRate, int trackID, DataDefinition essenceKind, SourceReferenceValue reference, long sourceReferenceLength, PulldownKindType pulldownKind, int phaseFrame, PulldownDirectionType direction) throws NullPointerException, PulldownDirectionException, BadLengthException, NotSourceClipException, TrackExistsException
SourcePackageConnects the given source package with the physical source package that describes the previous generation of essence, with an additional pulldown as part of the reference to indicate a non 1 to 1 relationship between the two.
This is a helper method to create a track with a pulldown object which references a source clip, which references a particular piece of media. This method takes many parameters because the components of a pulldown have been broken out as separate parameters.
The ancestor of a source package described by a tape descriptor is often a film descriptor.
addPulldownReference in interface SourcePackageaddType - Overwrite existing track sequence, or create a new sequence and append it.editRate - Edit rate of track to contain the reference.trackID - Track id for the track to contain the reference.essenceKind - Data kind of track to contain reference. Requires a data
kind valid for an essence stream. Valid data kinds are
DataDefinitionConstant.Picture and
DataDefinitionConstant.Sound.reference - Reference to a physical source package.sourceReferenceLength - Length of the referenced physical source package.pulldownKind - Method of conversion used between this physical
source package and this source package.phaseFrame - Phase of the first frame.direction - Direction of the pulldown operation.NullPointerException - One or more of the nullable arguments is/are null
and all are required.PulldownDirectionException - The given pullown direction is
invalid in this context, for example
tape to film speed
when this is a tape source package.BadLengthException - The given source reference length cannot is negative.NotSourceClipException - The existing contents of the given track does not
contain a source clip to add a pulldown reference to.TrackExistsException - The given track id matches that of a package
track already present in this source package.SourceClip,
Pulldown,
Sequencepublic void appendEdgecodeTrack(Rational editRate, int trackID, long startEC, long length, FilmType filmKind, EdgeType codeFormat, byte[] header) throws NullPointerException, IllegalArgumentException, BadLengthException, BadSizeException, FilmDescriptorOnlyException, TrackExistsException
SourcePackageCreates and adds an edgecode track to the film package represented by this
source package, with the given starting edgecode, length and edit rate.
It is also necessary to then add an essence track with
specifyValidCodeRange() to make the new edgecode track valid.
appendEdgecodeTrack in interface SourcePackageeditRate - Edit rate for the new edgecode track.trackID - Track id for the new track.startEC - Starting edgecode of the new edgecode track.length - Length of the new edgecode track.filmKind - Film kind for the new edgecode track.codeFormat - Code for the new edgecode track.header - Edgecode 8-byte header for the new edgecode track.NullPointerException - One or more of the arguments is null.BadLengthException - The length value is negative.BadSizeException - The size of the header is not the required 8 bytes.FilmDescriptorOnlyException - This operation is only valid
for a source package referencing a film descriptor.TrackExistsException - The given track id matches that of a track already
present in this source package.IllegalArgumentExceptionForge.makeEdgeCode(long, FilmType, EdgeType),
EdgecodeValue specificationpublic void appendPhysicalSourceReference(Rational editRate, int trackID, DataDefinition essenceKind, SourceReferenceValue reference, long sourceReferenceLength) throws NullPointerException, BadLengthException, InvalidDataDefinitionException, TrackExistsException
SourcePackageConnects this source package with the physical source package that describes the previous generation of essence, appending it to the existing package chain. If a physical source package, such as a file source package or tape source package, references another physical source package as its ancestor, with no pulldown, then this function makes the connection between the two.
This is a helper method to create a track with a source clip referencing a particular piece of media.
The ancestor of a source package with a file descriptor is often a tape descriptor.
The essenceKind parameter requires a data kind
valid for an essence stream. Valid data kinds are:
appendPhysicalSourceReference in interface SourcePackageeditRate - Edit rate of the track to contain the reference.trackID - Track ID of the track to contain the reference.essenceKind - Data kind of the track to contain the reference.reference - Reference to a physical source package.sourceReferenceLength - Length of the referenced source clip.NullPointerException - One or more of the nullable parameters is/are
null and all are required.BadLengthException - The source reference length is negative.InvalidDataDefinitionException - The given data definition is not
compatible with that of the track this element will be appended to.TrackExistsException - The given track id matches that of a track
already present in this source package.public void appendTimecodeTrack(Rational editRate, int trackID, TimecodeValue startTC, long length) throws NullPointerException, IllegalArgumentException, TapeDescriptorOnlyException, TrackExistsException
SourcePackageCreates and adds a timecode track to a tape package represented by this source
package, with the given starting timecode, length and edit rate. It is then necessary to call
specifyValidCodeRange() to add the filler to the
other essence tracks to indicate that the timecode is valid for that
other tracks of this package.
The start timecode parameter is expressed in frames
since midnight. The length parameter can be the value SourcePackage.FULL_RANGE,
in which case the length is 24 hours.
appendTimecodeTrack in interface SourcePackageeditRate - Edit rate of the timecode track.trackID - Track id for the new timecode track.startTC - Starting timecode for the timecode track.length - Duration of the new timecode track.NullPointerException - One or both of the edit rate and/or start timecode arguments
is/are null.TapeDescriptorOnlyException - This operation is only valid
for a source package referencing a tape descriptor.TrackExistsException - The given track id matches that of a track already present in this source package.IllegalArgumentExceptionSourcePackage.FULL_RANGE,
Forge.makeTimecode(long, short, boolean),
TimecodeValue specificationpublic void newPhysicalSourceReference(Rational editRate, int trackID, DataDefinition essenceKind, SourceReferenceValue reference, long sourceReferenceLength) throws NullPointerException, BadLengthException, TrackExistsException
SourcePackageConnects this source package with the physical source package that describes the previous generation of essence, appending it to the existing package chain. If a physical source package, such as a file source package or tape source package, references another physical source package as its ancestor, with no pulldown, then this function makes the 1 to 1 connection between the two.
This is a helper method to create a track with a source clip referencing a particular piece of media.
The ancestor of a source package with a file descriptor is often a tape descriptor.
The essence kind parameter requires a data kind valid for an essence stream. Valid data kinds are:
newPhysicalSourceReference in interface SourcePackageeditRate - Edit rate of the track to contain the reference.trackID - Track id of the track to contain the reference.essenceKind - Data kind of the track to contain the reference.reference - Reference to a physical source package.sourceReferenceLength - Length of the referenced source clip.NullPointerException - One or more of the nullable arguments is/are null
and all are required.BadLengthException - The given source reference length is negative.TrackExistsException - The given track id matches that of a package
track already present in this source package.SourceClippublic void specifyValidCodeRange(DataDefinition essenceKind, int trackID, Rational editRate, long startOffset, long length) throws NullPointerException, BadLengthException, TrackExistsException
SourcePackageCreates and adds a track containing source clips to the source package to indicate that a (recently added) timecode track or edgecode track is valid for that channel.
The essence kind parameter requires a data kind with valid for an essence stream. Valid data kinds are:
specifyValidCodeRange in interface SourcePackageessenceKind - Data kind for the track to be added.trackID - Track id for the track to be added.editRate - Edit rate for the track to be added.startOffset - Start offset for the track to be added.length - Duration of the source clip in the track.NullPointerException - One or both of the edit rate and/or essence kind arguments
is/are null.BadLengthException - The given length for the new source clip is negative.TrackExistsException - The given track id matches that of a track already present
in this source package.public List<FindSourceInformation> searchSource(int trackID, long offset, PackageKind packageKind, CriteriaType mediaCriteria, OperationChoice operationChoice) throws NullPointerException, InvalidPackageTypeException, TraversalNotPossibleException
SearchSourceReturns the source information for a track in a material package or source package. The method follows the source clip references in the specified track until it encounters the kind of package specified in the package kind parameter.
This function cannot be used on a composition package and is not intended to be called iteratively.
searchSource in interface SearchSourcetrackID - Track to find source information for.offset - Offset into the track.packageKind - Kind of package to search for.mediaCriteria - Media criteria to match in the search.operationChoice - Operation choice.NullPointerException - One or more of the arguments is null.InvalidPackageTypeException - The given package type is not valid.TraversalNotPossibleException - A package of the given kind
cannot be found.public SourcePackage clone()
InterchangeObjectCreate a cloned copy of this interchange object.
clone in interface MediaEntityclone in interface InterchangeObjectclone in interface Packageclone in interface SourcePackageclone in class PackageImpl(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.