Media Authoring
with Java API

tv.amwa.maj.iface
Interface Segment

All Superinterfaces:
Component, InterchangeObject
All Known Subinterfaces:
CommentMarker, DescriptiveClip, DescriptiveMarker, EdgecodeSegment, EssenceGroup, Event, Filler, GPITrigger, HTMLClip, NestedScope, OperationGroup, Pulldown, ScopeReference, Selector, Sequence, SourceClip, SourceReferenceSegment, TextClip, TimecodeSegment, TimecodeStream, TimecodeStream12M
All Known Implementing Classes:
CommentMarker, DescriptiveClip, DescriptiveMarker, EdgecodeSegment, EssenceGroup, Event, Filler, GPITrigger, HTMLClip, NestedScope, OperationGroup, Pulldown, ScopeReference, Segment, Selector, Sequence, SourceClip, SourceReferenceSegment, TextClip, TimecodeSegment, TimecodeStream, TimecodeStream12M

public interface Segment
extends Component

Specifies a component that is independent of any surrounding object. Contrast this to a transition which is a component that depends on other components to establish its value.

Author:
Richard Cartwright
See Also:
MobSlot.getSegment()

Method Summary
 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.
 
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
 

Method Detail

segmentOffsetToTC

TimecodeValue segmentOffsetToTC(@PositionType
                                long offset)
                                throws TimecodeNotFoundException

Converts the given segment offset to a timecode value.

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:
segmentTCToOffset(TimecodeValue, Rational)

segmentTCToOffset

@FrameOffset
long segmentTCToOffset(TimecodeValue timecode,
                                   Rational editRate)
                       throws NullPointerException,
                              TimecodeNotFoundException,
                              BadSampleOffsetException

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

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.
BadSampleOffsetException - The given timecode is outside the bounds of the timecode values represented by this segment.
See Also:
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.