Media Authoring
with Java API

tv.amwa.maj.iface
Interface OperationGroup

All Superinterfaces:
Component, InterchangeObject, Segment
All Known Implementing Classes:
OperationGroup

public interface OperationGroup
extends Segment

Specifies a container with an ordered set of segments and an operation that is performed on these segments.

In an operation group that is itself in a transition, the input segments are provided by the transition and so the optional input segments property shall be omitted.

Author:
Richard Cartwright
See Also:
makeOperationGroup(), OperationDefinition, CompositionMob

Method Summary
 void addParameter(Parameter parameter)
          Adds a new parameter to the collection of parameters of this operation group, which specify control values for the operation.
 void appendInputSegment(Segment segment)
          Appends an input segment to the list of input segments of this operation group.
 int countParameters()
          Returns the number of parameters in the collection of parameters of this operation group, which specify control values for the operation.
 int countSourceSegments()
          Returns the number of media sources for this operation group, which is the size of the list of input segments for this operation.
 int getBypassOverride()
          Returns the optional bypass override index of this operation group, which specifies the array index (1-based) of the input segment which is the primary input.
 Segment getInputSegmentAt(int index)
          Given an index, returns the corresponding input segment from this list of input segments of this operation group.
 OperationDefinition getOperationDefinition()
          Returns the operation definition for this operation group, which identifies the kind of operation.
 List<? extends Parameter> getParameters()
          Returns the list of parameters of this operation group, which specify control values for the operation.
 SourceReferenceSegment getRendering()
          Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation.
 void insertInputSegmentAt(int index, Segment segment)
          Inserts an input segment into the list of input segments of this operation group at the given index.
 boolean isTimeWarp()
          Returns true if an operation group represents a time warping effect.
 boolean isValidTransitionOperation()
          Returns true if this operation group can be used in a transition; otherwise returns false.
 Parameter lookupParameter(AUID argumentId)
          Given an argument id, returns the corresponding parameter slot from the collection of parameters of this operation group.
 void prependInputSegment(Segment segment)
          Prepends an input segment to the list of input segments of this operation group.
 void removeInputSegmentAt(int index)
          Removes the segment at the given index from the list of input segments of the operation group.
 void setBypassOverride(Integer bypassOverride)
          Sets the optional bypass override property on the given operation group object, which specifies the array index (1-based) of the input segment which is the primary input.
 void setOperationDefinition(OperationDefinition operationDefinition)
          Sets the operation definition for the operation group, which identifies the kind of operation.
 void setRendering(SourceReferenceSegment sourceReference)
          Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation.
 
Methods inherited from interface tv.amwa.maj.iface.Segment
segmentOffsetToTC, segmentTCToOffset
 
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

getOperationDefinition

OperationDefinition getOperationDefinition()

Returns the operation definition for this operation group, which identifies the kind of operation.

Returns:
Operation definition for this operation group.

setOperationDefinition

void setOperationDefinition(OperationDefinition operationDefinition)
                            throws NullPointerException

Sets the operation definition for the operation group, which identifies the kind of operation.

Parameters:
operationDefinition - Operation definition for the operation group.
Throws:
NullPointerException - The given operation definition is null.

getRendering

SourceReferenceSegment getRendering()
                                    throws PropertyNotPresentException

Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation. Working and final renderings are handled by using an essence group as the segment.

Returns:
Segment that represents the optional rendering of this operation group.
Throws:
PropertyNotPresentException - The optional rendering property is not present for this operation group.
See Also:
SourceClip

setRendering

void setRendering(SourceReferenceSegment sourceReference)

Returns the segment that represents the optional rendering of this operation group, which specifies a rendered or precomputed version of the operation. Multiple renderings may exist if the source clip refers to a master mob that contains an essence group.

Parameters:
sourceReference - Segment containing a representation of the rendering.
See Also:
SourceClip

getBypassOverride

@UInt32
int getBypassOverride()
                      throws PropertyNotPresentException

Returns the optional bypass override index of this operation group, which specifies the array index (1-based) of the input segment which is the primary input. This overrides any bypass specified by the operation definition. This is an optional property.

Returns:
Optional bypass override index of the operation group.
Throws:
PropertyNotPresentException - The optional bypass override property is not set for the operation group.
See Also:
OperationDefinition.getBypass(), getOperationDefinition()

setBypassOverride

void setBypassOverride(@UInt32
                       Integer bypassOverride)
                       throws IllegalArgumentException

Sets the optional bypass override property on the given operation group object, which specifies the array index (1-based) of the input segment which is the primary input. This overrides any bypass specified by the operation definition. Set this optional property to null to omit it.

Parameters:
bypassOverride - Bypass override property of this operation group.
Throws:
IllegalArgumentException - The bypass override property must be a 1-based index value.

countParameters

@UInt32
int countParameters()

Returns the number of parameters in the collection of parameters of this operation group, which specify control values for the operation. This is an optional property and this method returns 0 when the property is not present.

Returns:
Number of parameters in the collection of parameters of this operation group.

addParameter

void addParameter(Parameter parameter)
                  throws DuplicateParameterException,
                         NullPointerException

Adds a new parameter to the collection of parameters of this operation group, which specify control values for the operation. This is an optional property that becomes present when this method is called.

Parameters:
parameter - Parameter to add to the collection of parameters of this operation group.
Throws:
DuplicateParameterException - The given parameter has the same identifier as one that is already present in this operation group.
NullPointerException - The given parameter is null.

getParameters

List<? extends Parameter> getParameters()

Returns the list of parameters of this operation group, which specify control values for the operation. This is an optional property that returns an empty list when not present.

Returns:
Shallow copy of the collection of parameters of this operation group.

lookupParameter

Parameter lookupParameter(@ArgIDType
                          AUID argumentId)
                          throws ParameterNotFoundException,
                                 NullPointerException

Given an argument id, returns the corresponding parameter slot from the collection of parameters of this operation group.

Parameters:
argumentId - Argument id to look up in the collection of parameters of this operation group.
Returns:
Matching parameter from the operation group.
Throws:
ParameterNotFoundException - The given argument identifier does not match that of a parameter in the set of parameters for this operation group.
NullPointerException - The given argument identifier is null.

countSourceSegments

@UInt32
int countSourceSegments()

Returns the number of media sources for this operation group, which is the size of the list of input segments for this operation. The input segments list is an optional property and 0 will be returned if the property is omitted.

Returns:
Number of media sources for this operation group.

appendInputSegment

void appendInputSegment(Segment segment)
                        throws NullPointerException

Appends an input segment to the list of input segments of this operation group. The list is an optional property that will become present if a segment is appended.

Parameters:
segment - Segment to append to the list of input segments of this operation group.
Throws:
NullPointerException - The given segment to append is null.

prependInputSegment

void prependInputSegment(Segment segment)
                         throws NullPointerException

Prepends an input segment to the list of input segments of this operation group. The list is an optional property that will become present if a segment is prepended.

Parameters:
segment - Input segment to add to the beginning of the list of input segments.
Throws:
NullPointerException - The given segment to prepend is null.

insertInputSegmentAt

void insertInputSegmentAt(@UInt32
                          int index,
                          Segment segment)
                          throws IndexOutOfBoundsException,
                                 NullPointerException

Inserts an input segment into the list of input segments of this operation group at the given index. The existing segments at the given and higher indices are moved up by one to make room. This is an optional property that will become present if a segment is inserted at index 0.

Parameters:
index - 0-based index where input segment is to be inserted.
segment - Input segment to insert at the given index.
Throws:
IndexOutOfBoundsException - The index value is outside the acceptable range for the list of input segments.
NullPointerException - The given segment to insert is null.

getInputSegmentAt

Segment getInputSegmentAt(@UInt32
                          int index)
                          throws IndexOutOfBoundsException

Given an index, returns the corresponding input segment from this list of input segments of this operation group. This is an optional property and this method will always throw an IndexOutOfBoundsException if the property is omitted.

Parameters:
index - 0-based index into the list of input segments of this operation group.
Returns:
Input segment at the given index.
Throws:
IndexOutOfBoundsException - The index is outside the acceptable range for the list of input segments.

removeInputSegmentAt

void removeInputSegmentAt(@UInt32
                          int index)
                          throws IndexOutOfBoundsException

Removes the segment at the given index from the list of input segments of the operation group. Existing segments at higher indices are moved down by one to accommodate. This is an optional property and this method will always throw an IndexOutOfBoundsException if the property is omitted. Removing the last input segment from the list will omit this property.

Parameters:
index - 0-based index into the list of input segments of this operation group.
Throws:
IndexOutOfBoundsException - The index is outside the acceptable range for the list of input segments.

isValidTransitionOperation

@Bool
boolean isValidTransitionOperation()

Returns true if this operation group can be used in a transition; otherwise returns false. An operation group can be used in a transition if its operation has exactly 2 inputs and the operation has a level parameter.

Returns:
Can the operation group be used in a transition?
See Also:
Transition.setOperationGroup(OperationGroup)

isTimeWarp

@Bool
boolean isTimeWarp()

Returns true if an operation group represents a time warping effect.

Returns:
Does this operation group have an operation that warps time?
See Also:
getOperationDefinition(), OperationDefinition.isTimeWarp()

Media Authoring
with Java API

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