AAFA Developer Support

Public Member Functions
IAAFComponent2 Interface Reference

The component class represents an essence element. More...

List of all members.

Public Member Functions

HRESULT SetLength ([in] aafLength_constref length)
 Sets the length property value on this component object.
HRESULT GetLength ([retval][out] aafLength_t *pLength)
 Gets the duration in edit units of this component.
HRESULT SetDataDef ([in] IAAFDataDef *pDataDef)
 Sets the data definition property AUID on this component.
HRESULT GetDataDef ([out, retval] IAAFDataDef **ppDatadef)
 Returns data definition object.
HRESULT AppendKLVData ([in] IAAFKLVData *pData)
 Appends a pre-existing KLV Data object to the specified component.
HRESULT CountKLVData ([out] aafUInt32 *pNumData)
 Return total number of KLV data objects attached to this component.
HRESULT GetKLVData ([out] IEnumAAFKLVData **ppEnum)
 Return the enumeration for all KLV data objects on this component.
HRESULT RemoveKLVData ([in] IAAFKLVData *pData)
 Removes the given KLV data object from this component.
HRESULT AppendComment ([in] aafCharacter_constptr pName,[in] aafCharacter_constptr pValue)
 Append an attribute name/value pair to the attribute list.
HRESULT CountComments ([out] aafUInt32 *pNumComments)
 Return the number of comments contained in this component.
HRESULT GetComments ([out] IEnumAAFTaggedValues **ppEnum)
 Return a comment enumerator for this component.
HRESULT RemoveComment ([in] IAAFTaggedValue *pComment)
 Remove a component comment (tagged value).
HRESULT AppendAttribute ([in] aafCharacter_constptr pName,[in] aafCharacter_constptr pValue)
 Append an attribute name/value pair to the attribute list.
HRESULT CountAttributes ([out] aafUInt32 *pNumAttributes)
 Return the number of attributes contained in this component.
HRESULT GetAttributes ([out] IEnumAAFTaggedValues **ppEnum)
 Return an attribute enumerator for this component.
HRESULT RemoveAttribute ([in] IAAFTaggedValue *pAttribute)
 Remove a component attribute (tagged value).

Detailed Description

The component class represents an essence element.

A Component is an abastract class with two subclasses: Segment and Transition. The GetLength and SetLength only aplies to time-varying media and it is an optional property. Non time-varying objects DO NOT support this property.

In addition to the specific error results listed for each method, all methods in this interface may also return one of the following values:

AAFRESULT_NOMEMORY

AAFRESULT_NOT_INITIALIZED

Objects that implement IAAFComponent2 also implement the following interfaces:

Definition at line 40711 of file AAF.idl.


Member Function Documentation

HRESULT IAAFComponent2::AppendAttribute ( [in] aafCharacter_constptr  pName,
[in] aafCharacter_constptr  pValue 
)

Append an attribute name/value pair to the attribute list.

Creates a new tagged value, initializes it with the specified attribute name/value pair, and appends it to the attribute list.

Succeeds if:

  • pName and pValue are valid pointers.

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pName or pValue is null.
Parameters:
pName[in] The attribute name.
pValue[in] The attribute value.
HRESULT IAAFComponent2::AppendComment ( [in] aafCharacter_constptr  pName,
[in] aafCharacter_constptr  pValue 
)

Append an attribute name/value pair to the attribute list.

Creates a new tagged value, initializes it with the specified comment name/value pair, and appends it to the comment list.

Succeeds if:

  • pName and pValue are valid pointers.

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pName or pValue is null.
Parameters:
pName[in] The attribute name.
pValue[in] The attribute value.
HRESULT IAAFComponent2::AppendKLVData ( [in] IAAFKLVData pData)

Appends a pre-existing KLV Data object to the specified component.

Succeeds if all of the following are true:

  • the pKLV pointer is valid.

If this method fails no state will be changed.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • the pData arg is NULL.
Parameters:
pData[in] KLV object
HRESULT IAAFComponent2::CountAttributes ( [out] aafUInt32 *  pNumAttributes)

Return the number of attributes contained in this component.

Succeeds if:

  • pNumAttributes is a valid pointer

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pNumAttributes is null.
Parameters:
pNumAttributes[out] Pointer to attribute count.
HRESULT IAAFComponent2::CountComments ( [out] aafUInt32 *  pNumComments)

Return the number of comments contained in this component.

Succeeds if:

  • pNumComments is a valid pointer

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pNumComments is null.
Parameters:
pNumComments[out] Pointer to comment count.
HRESULT IAAFComponent2::CountKLVData ( [out] aafUInt32 *  pNumData)

Return total number of KLV data objects attached to this component.

Succeeds if all of the following are true:

  • the pNumData pointer is valid.

If this method fails nothing will be written to *pNumComments.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • pNumData arg is NULL.
Parameters:
pNumData[out] Number of KLV data objects
HRESULT IAAFComponent2::GetAttributes ( [out] IEnumAAFTaggedValues **  ppEnum)

Return an attribute enumerator for this component.

Creates an enumerator for this component's attributes. The new enumerator is AddRef()ed before it is returned.

Succeeds if:

  • pName and pValue are valid pointers.

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pEnum was null.
Parameters:
ppEnum[out] Pointer to the new enumerator object created by this method.
HRESULT IAAFComponent2::GetComments ( [out] IEnumAAFTaggedValues **  ppEnum)

Return a comment enumerator for this component.

Creates an enumerator for this component's comments. The new enumerator is AddRef()ed before it is returned.

Succeeds if:

  • pName and pValue are valid pointers.

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pEnum was null.
Parameters:
ppEnum[out] Pointer to the new enumerator object created by this method.
HRESULT IAAFComponent2::GetDataDef ( [out, retval] IAAFDataDef **  ppDatadef)

Returns data definition object.

Succeeds if all of the following are true:

  • the ppDatadef pointer is valid.

If this method fails nothing will be written to *ppDatadef.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • ppDatadef arg is NULL.
Parameters:
ppDatadef[out, retval] DataDef of this object
HRESULT IAAFComponent2::GetKLVData ( [out] IEnumAAFKLVData **  ppEnum)

Return the enumeration for all KLV data objects on this component.

The returned enumerator is AddRef()ed before it is returned. The enumerator is implemented as a EnumAAFKLVData.

Succeeds if all of the following are true:

  • the ppEnum pointer is valid.

If this method fails nothing will be written to *ppEnum.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • ppEnum is null.
Parameters:
ppEnum[out] KLV data objects
HRESULT IAAFComponent2::GetLength ( [out] aafLength_t *  pLength)

Gets the duration in edit units of this component.

Succeeds if all of the following are true:

  • the pLength pointer is valid.
  • the optional length property is present for this object.

This method deals with an optional property, which will only be present for time-varying media.

If this method fails nothing will be written to *pLength.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • pLength arg is NULL.

AAFRESULT_BAD_PROP

  • the optional length property is not present for this object.
Parameters:
pLength[retval][out] Length of this component
HRESULT IAAFComponent2::RemoveAttribute ( [in] IAAFTaggedValue pAttribute)

Remove a component attribute (tagged value).

Succeeds if:

  • pName and pValue are valid pointers.

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pName or pValue is null.
Parameters:
pAttribute[in] Pointer to the tagged value attribute.
HRESULT IAAFComponent2::RemoveComment ( [in] IAAFTaggedValue pComment)

Remove a component comment (tagged value).

Succeeds if:

  • pName and pValue are valid pointers.

Return codes:

AAFRESULT_SUCCESS

AAFRESULT_NULL_PARAM

  • pName or pValue is null.
Parameters:
pComment[in] Pointer to the tagged value comment.
HRESULT IAAFComponent2::RemoveKLVData ( [in] IAAFKLVData pData)

Removes the given KLV data object from this component.

Succeeds if all of the following are true:

  • the pData pointer is valid.
  • the given KLV data object is present in the component.

If this method fails no state will be changed.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • pData is null.

AAFRESULT_OBJECT_NOT_FOUND

  • the given KLV data object is not in this component.
Parameters:
pData[in] KLV data object to remove
HRESULT IAAFComponent2::SetDataDef ( [in] IAAFDataDef pDataDef)

Sets the data definition property AUID on this component.

If this method fails the Data Definition property will not be changed.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • pDataDef arg is NULL.
Parameters:
pDataDef[in] DataDef of this object
HRESULT IAAFComponent2::SetLength ( [in] aafLength_constref  length)

Sets the length property value on this component object.

Succeeds if all of the following are true:

  • the optional length property is present for this object.

This method deals with an optional property, which will only be present for time-varying media.

If this method fails the length property will not be changed.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_BAD_PROP

  • the optional length property is not present for this object.
Parameters:
length[in] The duration in edit units of this component

Generated on Wed Jul 4 2012 22:13:26 for AAF COM API by doxygen 1.7.4