Media Authoring
with Java API

tv.amwa.maj.entity
Class Pulldown

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.Component
          extended by tv.amwa.maj.entity.Segment
              extended by tv.amwa.maj.entity.Pulldown
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, Component, InterchangeObject, Pulldown, Segment, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=3072,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="Pulldown",
          description="The Pulldown class converts between film frame rates and videotape frame rates.")
public class Pulldown
extends Segment
implements Pulldown, Serializable, Cloneable, MAJCommon

Implements the representation of a conversion between film frame rates and videotape frame rates. This class provides a mechanism to convert essence to and from video and film rates and describe the mechanism that was used to convert the essence.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class Pulldown.InputSegmentXMLHandler
           
static class Pulldown.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.Segment
Segment.SegmentXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.Component
Component.ComponentAttributesXMLHandler, Component.ComponentUserCommentsXMLHandler, Component.ComponentXMLHandler, Component.KLVDataXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String PULLDOWN_TAG
           
 
Fields inherited from class tv.amwa.maj.entity.Component
COMPONENT_ITEM
 
Constructor Summary
Pulldown(DataDefinition dataDefinition, Segment inputSegment, PulldownKindType pulldownKind, PulldownDirectionType pulldownDirection, int phaseFrame)
          Creates and initializes a new pulldown object, which converts between film frame rates and videotape frame rates
 
Method Summary
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 Pulldown clone()
          Creates a cloned copy of this entity.
 boolean equals(Object o)
          Tests to see if the given object is equal to this interchange object.
 Segment getInputSegment()
          Returns the input segment of this pulldown, which is either a source clip or timecode.
 int getPhaseFrame()
          Returns the phase frame property of this pulldown, which specifies the phase within the repeating pulldown pattern of the first frame after the pulldown conversion.
 PulldownDirectionType getPulldownDirection()
          Returns the pulldown direction of this pulldown, which specifies whether the pulldown is converting from tape to film speed or from film to tape speed.
 PulldownKindType getPulldownKind()
          Returns the pulldown kind of this pulldown, which specifies whether the pulldown is converting from nominally 30 Hz or 25 Hz video frame rate and whether frames are dropped or the video is played at another speed.
 int hashCode()
          Returns a hash code value for this interchange object.
 TimecodeValue segmentOffsetToTC(long offset)
          Converts the given segment offset to a timecode value.
 long segmentTCToOffset(TimecodeValue timecode, Rational editrate)
          Converts the given timecode and edit rate to a segment offset value.
 void setInputSegment(Segment inputSegment)
          Sets the input segment for this pulldown, which is either a source clip or timecode.
 void setPhaseFrame(int phaseFrame)
          Sets the phase frame property of the pulldown, which specifies the phase within the repeating pulldown pattern of the first frame after the pulldown conversion.
 void setPropertiesFromInterface(Pulldown castFrom)
           
 void setPulldownDirection(PulldownDirectionType pulldownDirection)
          Sets the pulldown direction of the pulldown, which specifies whether the pulldown is converting from tape to film speed or from film to tape speed.
 void setPulldownKind(PulldownKindType pulldownKind)
          Sets the pulldown kind of this pulldown, which specifies whether the pulldown is converting from nominally 30 Hz or 25 Hz video frame rate and whether frames are dropped or the video is played at another speed.
 
Methods inherited from class tv.amwa.maj.entity.Segment
setPropertiesFromInterface
 
Methods inherited from class tv.amwa.maj.entity.Component
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, countAttributes, countComments, countKLVData, getAttributes, getComments, getDataDefinition, getKLVData, getLength, getLengthPresent, removeAttribute, removeComment, removeKLVData, setDataDefinition, setLength, setLengthPresent, setPropertiesFromInterface
 
Methods inherited from class tv.amwa.maj.entity.InterchangeObject
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.Component
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, countAttributes, countComments, countKLVData, getAttributes, getComments, getDataDefinition, getKLVData, getLength, removeAttribute, removeComment, removeKLVData, setDataDefinition, setLength
 
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue
 
Methods inherited from interface tv.amwa.maj.entity.MAJCommon
toString
 

Field Detail

PULLDOWN_TAG

public static final String PULLDOWN_TAG
See Also:
Constant Field Values
Constructor Detail

Pulldown

public Pulldown(DataDefinition dataDefinition,
                Segment inputSegment,
                PulldownKindType pulldownKind,
                PulldownDirectionType pulldownDirection,
                @PhaseFrameType
                int phaseFrame)
         throws NullPointerException

Creates and initializes a new pulldown object, which converts between film frame rates and videotape frame rates

Parameters:
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.
Throws:
NullPointerException - One or more of the arguments is null and all arguments are required.
Method Detail

setPropertiesFromInterface

public final void setPropertiesFromInterface(Pulldown castFrom)
See Also:
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)

getInputSegment

@AAFProperty(uuid1=100729092,
             uuid2=519,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="InputSegment",
             typeName="StrongReference to Segment",
             optional=false,
             uniqueIdentifier=false,
             pid=3329)
public Segment getInputSegment()
Description copied from interface: Pulldown

Returns the input segment of this pulldown, which is either a source clip or timecode. The length of the source clip or timecode is in the edit units determined by the properties pulldown kind and pulldown direction.

Specified by:
getInputSegment in interface Pulldown
Returns:
Input segment of this pulldown.

setInputSegment

public void setInputSegment(Segment inputSegment)
                     throws NullPointerException,
                            IllegalArgumentException
Description copied from interface: Pulldown

Sets the input segment for this pulldown, which is either a source clip or timecode.

The length of the source clip or timecode is in the edit units determined by the properties pulldown kind and pulldown direction.

Specified by:
setInputSegment in interface Pulldown
Parameters:
inputSegment - Input segment for the pulldown.
Throws:
NullPointerException - The given input segment is null.
IllegalArgumentException - The given input segment must be either a source clip or a timecode.

getPhaseFrame

@AAFProperty(uuid1=88084481,
             uuid2=768,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="PhaseFrame",
             typeName="PhaseFrameType",
             optional=false,
             uniqueIdentifier=false,
             pid=3332)
public int getPhaseFrame()
Description copied from interface: Pulldown

Returns the phase frame property of this pulldown, which specifies the phase within the repeating pulldown pattern of the first frame after the pulldown conversion. A value of zero specifies that the pulldown object starts at the beginning of the pattern.

Specified by:
getPhaseFrame in interface Pulldown
Returns:
Phase frame property of this pulldown.

setPhaseFrame

public void setPhaseFrame(int phaseFrame)
Description copied from interface: Pulldown

Sets the phase frame property of the pulldown, which specifies the phase within the repeating pulldown pattern of the first frame after the pulldown conversion. A value of zero specifies that the pulldown object starts at the beginning of the pattern.

Specified by:
setPhaseFrame in interface Pulldown
Parameters:
phaseFrame - Phase frame property for this pulldown.

getPulldownDirection

@AAFProperty(uuid1=88084481,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="PulldownDirection",
             typeName="PulldownDirectionType",
             optional=false,
             uniqueIdentifier=false,
             pid=3331)
public PulldownDirectionType getPulldownDirection()
Description copied from interface: Pulldown

Returns the pulldown direction of this pulldown, which specifies whether the pulldown is converting from tape to film speed or from film to tape speed.

Specified by:
getPulldownDirection in interface Pulldown
Returns:
Pulldown direction field of the pulldown.

See Also:
PulldownDirectionType, TapeDescriptor, FilmDescriptor

setPulldownDirection

public void setPulldownDirection(PulldownDirectionType pulldownDirection)
                          throws NullPointerException
Description copied from interface: Pulldown

Sets the pulldown direction of the pulldown, which specifies whether the pulldown is converting from tape to film speed or from film to tape speed.

Specified by:
setPulldownDirection in interface Pulldown
Parameters:
pulldownDirection - Pulldown direction of this pulldown.
Throws:
NullPointerException - The given pulldown direction is null.
See Also:
PulldownDirectionType, TapeDescriptor, FilmDescriptor

getPulldownKind

@AAFProperty(uuid1=88084481,
             uuid2=512,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="PulldownKind",
             typeName="PulldownKindType",
             optional=false,
             uniqueIdentifier=false,
             pid=3330)
public PulldownKindType getPulldownKind()
Description copied from interface: Pulldown

Returns the pulldown kind of this pulldown, which specifies whether the pulldown is converting from nominally 30 Hz or 25 Hz video frame rate and whether frames are dropped or the video is played at another speed.

Specified by:
getPulldownKind in interface Pulldown
Returns:
Pulldown kind of this pulldown.
See Also:
PulldownKindType

setPulldownKind

public void setPulldownKind(PulldownKindType pulldownKind)
                     throws NullPointerException
Description copied from interface: Pulldown

Sets the pulldown kind of this pulldown, which specifies whether the pulldown is converting from nominally 30 Hz or 25 Hz video frame rate and whether frames are dropped or the video is played at another speed.

Specified by:
setPulldownKind in interface Pulldown
Parameters:
pulldownKind - Pulldown kind of this pulldown.
Throws:
NullPointerException - The given pulldown kind is null.
See Also:
PulldownKindType

equals

public boolean equals(Object o)
Description copied from interface: MAJCommon

Tests to see if the given object is equal to this interchange object. To be equal, the given value must be not null, share the same interface to its value and each of the properties of the value must each be equal.

Specified by:
equals in interface MAJCommon
Overrides:
equals in class Component
Parameters:
o - Object to test for equality with.
Returns:
Is the given object equals to this value?
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from interface: MAJCommon

Returns a hash code value for this interchange object.

Specified by:
hashCode in interface MAJCommon
Overrides:
hashCode in class Component
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

clone

public Pulldown clone()
Description copied from interface: MAJCommon

Creates a cloned copy of this entity. The clone will be initialized to have the same value as this value but exists independently from then on. Changes to this value will not effect the clone and changes to the clone will not effect this. MAJ API clones are true deep clones with no shared references to areas of memory within the original.

This method does not throw a CloneNotSupportedException as all entity values must implement the Cloneable interface. If a cloning error does occur, a null value will be returned but this is very unlikely to happen.

Specified by:
clone in interface MAJCommon
Overrides:
clone in class Segment
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

appendXMLChildren

public void appendXMLChildren(Node parent)
Description copied from interface: XMLSerializable

Append child elements to the given parent node to serialize the value of an object to an XML fragment. Methods of the XMLBuilder class are provided to help with this process.

Specified by:
appendXMLChildren in interface XMLSerializable
Overrides:
appendXMLChildren in class Component
Parameters:
parent - XML parent element to append child nodes to.

segmentOffsetToTC

public TimecodeValue segmentOffsetToTC(long offset)
                                throws TimecodeNotFoundException
Description copied from interface: Segment

Converts the given segment offset to a timecode value.

Specified by:
segmentOffsetToTC in interface Segment
Overrides:
segmentOffsetToTC in class Segment
Parameters:
offset - Segment offset to be converted to a timecode.
Returns:
Converted timecode value.
Throws:
TimecodeNotFoundException - The given offset is not available as a timecode value in this segment.
See Also:
Segment.segmentTCToOffset(TimecodeValue, Rational)

segmentTCToOffset

public long segmentTCToOffset(TimecodeValue timecode,
                              Rational editrate)
                       throws NullPointerException,
                              TimecodeNotFoundException
Description copied from interface: Segment

Converts the given timecode and edit rate to a segment offset value.

Specified by:
segmentTCToOffset in interface Segment
Overrides:
segmentTCToOffset in class Segment
Parameters:
timecode - Timecode to be converted to an offset.
editrate - Edit rate of the given timecode.
Returns:
Frame offset into the segment.
Throws:
NullPointerException - One or both of the given timecode and/or edit rate is/are null.
TimecodeNotFoundException - The given timecode is not available in this segment.
See Also:
Segment.segmentOffsetToTC(long)

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.