AAFA Developer Support

Public Member Functions
IAAFTypeDefStream Interface Reference

AAFTypeDefStream is DEPRECATED, please use AAFTypeDefStream3. More...

List of all members.

Public Member Functions

HRESULT GetSize ([in] IAAFPropertyValue *pStreamPropertyValue,[out] aafInt64 *pSize)
 Returns number of bytes contained in the referenced property value.
HRESULT SetSize ([in] IAAFPropertyValue *pStreamPropertyValue,[in] aafInt64 newSize)
 Set the number of bytes contained in the give stream property value to newElementCount Succeeds if:
HRESULT GetPosition ([in] IAAFPropertyValue *pStreamPropertyValue,[out] aafInt64 *pPosition)
 Returns the byte position of the current element in the stream.
HRESULT SetPosition ([in] IAAFPropertyValue *pStreamPropertyValue,[in] aafInt64 newPosition)
 Make the current byte position to the one at newPosition in the stream property value.
HRESULT Read ([in] IAAFPropertyValue *pStreamPropertyValue,[in] aafUInt32 dataSize,[out, size_is(dataSize), length_is(*bytesRead)] aafMemPtr_t pData,[out, ref] aafUInt32 *bytesRead)
 Sequential access.
HRESULT Write ([in] IAAFPropertyValue *pStreamPropertyValue,[in] aafUInt32 dataSize,[in, ref, size_is(dataSize)] aafMemPtr_t pData)
 Sequential access.
HRESULT Append ([in] IAAFPropertyValue *pStreamPropertyValue,[in] aafUInt32 dataSize,[in, ref, size_is(dataSize)] aafMemPtr_t pData)
 Extending the stream.
HRESULT HasStoredByteOrder ([in] IAAFPropertyValue *pStreamPropertyValue,[out] aafBoolean_t *pHasByteOrder)
 Returns kAAFTrue if the stream has a stored byte order or kAAFFalse otherwise.
HRESULT GetStoredByteOrder ([in] IAAFPropertyValue *pStreamPropertyValue,[out] eAAFByteOrder_t *pByteOrder)
 Access byte order of the stream.
HRESULT SetStoredByteOrder ([in] IAAFPropertyValue *pStreamPropertyValue,[in] eAAFByteOrder_t byteOrder)
 Sets the byte order to be associated with this stream.
HRESULT ClearStoredByteOrder ([in] IAAFPropertyValue *pStreamPropertyValue)
 Clears the byte order to be associated with this stream.
HRESULT ReadElements ([in] IAAFPropertyValue *pStreamPropertyValue,[in] IAAFTypeDef *pElementType,[in] aafUInt32 dataSize,[out, size_is(dataSize), length_is(*pBytesRead)] aafMemPtr_t pData,[out, ref] aafUInt32 *pBytesRead)
 Access in typed chunks of Elements.
HRESULT WriteElements ([in] IAAFPropertyValue *pStreamPropertyValue,[in] IAAFTypeDef *pElementType,[in] aafUInt32 dataSize,[in, ref, size_is(dataSize)] aafMemPtr_t pData)
 Access in typed chunks of Elements.
HRESULT AppendElements ([in] IAAFPropertyValue *pStreamPropertyValue,[in] IAAFTypeDef *pElementType,[in] aafUInt32 dataSize,[in, ref, size_is(dataSize)] aafMemPtr_t pData)
 Extend in chunks of typed Elements")

Detailed Description

AAFTypeDefStream is DEPRECATED, please use AAFTypeDefStream3.

This interface is used to define Stream types used in AAF persistent objects. Streams are conceptually similar to variably-sized arrays except that they are intended to be used for very large pieces of data (such as essence). Note: All reads/and writes advance the current position.

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

Objects that implement IAAFTypeDefStream also implement the following interfaces:

Definition at line 32472 of file AAF.idl.


Member Function Documentation

HRESULT IAAFTypeDefStream::Append ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] aafUInt32  dataSize,
[in, ref, size_is(dataSize)] aafMemPtr_t  pData 
)

Extending the stream.

Copies the data in the given buffer into the stream at the end of the stream.

Succeeds if all of the following are true:

  • the pStreamPropertyValue pointer is valid.
  • the pData pointer is valid.
  • the indicated bytes could be appended to the stream.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • either pStreamPropertyValue or pData arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value to modify
dataSize[in] number of bytes to write (must be equal to the element type length)
pData[in, ref, size_is(dataSize)] buffer into which should contain one element to be written to the stream
HRESULT IAAFTypeDefStream::AppendElements ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] IAAFTypeDef pElementType,
[in] aafUInt32  dataSize,
[in, ref, size_is(dataSize)] aafMemPtr_t  pData 
)

Extend in chunks of typed Elements")

Access in typed chunks of Elements. Copies the data in the given buffer onto the end of the stream. Requires that any structures declared within element typedef have had their offsets registered with that type..

Succeeds if all of the following are true:

  • the pStreamPropertyValue pointer is valid.
  • the pElementType pointer is valid.
  • the pData pointer is valid.
  • dataSize indicates pData is large enough to hold the data.
  • compile-time struct has had its member offests registered.
  • the indicated elements exist in this stream type def.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • either pStreamPropertyValue or pElementType or pData arg is NULL.

AAFRESULT_INVALID_PARAM

  • dataSize indicates pData is an even multiple of the given element type size.

AAFRESULT_NOT_REGISTERED

  • struct offsets have not yet been registered for the element typedef.
Parameters:
pStreamPropertyValue[in] stream property value to modify
pElementType[in] the type definition of the elements to read
dataSize[in] number of bytes to write (must be evenly divisible by the element type length)
pData[in, ref, size_is(dataSize)] buffer into which elements from the stream should be written
HRESULT IAAFTypeDefStream::ClearStoredByteOrder ( [in] IAAFPropertyValue pStreamPropertyValue)

Clears the byte order to be associated with this stream.

Note: the stream must be empty.

Succeeds if:

  • Initialize() has already been called on this object.
  • pStreamPropertyValue is a valid pointer.
  • stream is empty.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • If pStreamPropertyValue arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value
HRESULT IAAFTypeDefStream::GetPosition ( [in] IAAFPropertyValue pStreamPropertyValue,
[out] aafInt64 *  pPosition 
)

Returns the byte position of the current element in the stream.

Succeeds if:

  • Initialize() has already been called on this object.
  • pStreamPropertyValue is a valid pointer.
  • pPosition is a valid pointer.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • Either pStreamPropertyValue or pPosition arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value
pPosition[out] current byte position in the specified stream property value
HRESULT IAAFTypeDefStream::GetSize ( [in] IAAFPropertyValue pStreamPropertyValue,
[out] aafInt64 *  pSize 
)

Returns number of bytes contained in the referenced property value.

Succeeds if:

  • Initialize() has already been called on this object.
  • pStreamPropertyValue is a valid pointer.
  • pSize is a valid pointer.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • Either pStreamPropertyValue or pSize arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value
pSize[out] count of bytes in the specified stream property value
HRESULT IAAFTypeDefStream::GetStoredByteOrder ( [in] IAAFPropertyValue pStreamPropertyValue,
[out] eAAFByteOrder_t *  pByteOrder 
)

Access byte order of the stream.

Succeeds if:

  • Initialize() has already been called on this object.
  • pStreamPropertyValue is a valid pointer.
  • pByteOrder is a valid pointer.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • Either pStreamPropertyValue or pByteOrder arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value
pByteOrder[out] Pointer to variable where byte order is to be copied
HRESULT IAAFTypeDefStream::HasStoredByteOrder ( [in] IAAFPropertyValue pStreamPropertyValue,
[out] aafBoolean_t *  pHasByteOrder 
)

Returns kAAFTrue if the stream has a stored byte order or kAAFFalse otherwise.

Succeeds if:

  • Initialize() has already been called on this object.
  • pStreamPropertyValue is a valid pointer.
  • pHasByteOrder is a valid pointer.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • Either pStreamPropertyValue or pHasByteOrder arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value
pHasByteOrder[out] kAAFTrue if this stream has a stored byte order
HRESULT IAAFTypeDefStream::Read ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] aafUInt32  dataSize,
[out, size_is(dataSize), length_is(*bytesRead)] aafMemPtr_t  pData,
[out, ref] aafUInt32 *  bytesRead 
)

Sequential access.

Copies the data at the position of the stream to the given buffer.

Succeeds if all of the following are true:

  • the pStreamPropertyValue pointer is valid.
  • the pData pointer is valid.
  • the indicated bytes exist in the stream.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • either pStreamPropertyValue or pData arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value to read
dataSize[in] number of bytes to read
pData[out, size_is(dataSize), length_is(*bytesRead)] buffer into which one element from the stream should be written
bytesRead[out,ref] number of bytes actually read (will be either dataSize or 0 if there is in error)
HRESULT IAAFTypeDefStream::ReadElements ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] IAAFTypeDef pElementType,
[in] aafUInt32  dataSize,
[out, size_is(dataSize), length_is(*pBytesRead)] aafMemPtr_t  pData,
[out, ref] aafUInt32 *  pBytesRead 
)

Access in typed chunks of Elements.

Copies the data at the current position of the stream to the given buffer. Requires that any structures declared within element typedef have had their offsets registered with that type.

Succeeds if all of the following are true:

  • the pStreamPropertyValue pointer is valid.
  • the pElementType pointer is valid.
  • the pData pointer is valid.
  • dataSize indicates pData is large enough to hold the data.
  • compile-time struct has had its member offests registered.
  • the indicated elements exist in this stream type def.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • either pStreamPropertyValue or pElementType or pBytesRead or pData arg is NULL.

AAFRESULT_INVALID_PARAM

  • dataSize indicates pData is too small.

AAFRESULT_NOT_REGISTERED

  • struct offsets have not yet been registered for element typedef.

AAFRESULT_INVALID_PARAM

  • there are not dataSize bytes left in the stream.
Parameters:
pStreamPropertyValue[in] stream property value to read
pElementType[in] the type definition of the elements to read
dataSize[in] number of bytes to read (must be evenly divisible by the element type length)
pData[out, size_is(dataSize), length_is(*pBytesRead)] buffer into which elements from the stream should be written
pBytesRead[out,ref] number of bytes actually read (will be either dataSize or 0 if there is in error)
HRESULT IAAFTypeDefStream::SetPosition ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] aafInt64  newPosition 
)

Make the current byte position to the one at newPosition in the stream property value.

Succeeds if:

  • pStreamPropertyValue is a valid pointer.
  • the new position is valid

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • If pStreamPropertyValue arg is NULL.

AAFRESULT_INVALID_PARAM

  • newPosition is outside the bounds of the stream.
Parameters:
pStreamPropertyValue[in] stream property value
newPosition[in] the new position in the specified stream property value
HRESULT IAAFTypeDefStream::SetSize ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] aafInt64  newSize 
)

Set the number of bytes contained in the give stream property value to newElementCount Succeeds if:

  • Initialize() has already been called on this object.
  • pStreamPropertyValue is a valid pointer.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • If pStreamPropertyValue arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value
newSize[in] new count of bytes in the specified stream property value
HRESULT IAAFTypeDefStream::SetStoredByteOrder ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] eAAFByteOrder_t  byteOrder 
)

Sets the byte order to be associated with this stream.

Note: the stream must be empty.

Succeeds if:

  • Initialize() has already been called on this object.
  • pStreamPropertyValue is a valid pointer.
  • stream is empty.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • If pStreamPropertyValue arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value
byteOrder[in] byte order is to be stored with the stream
HRESULT IAAFTypeDefStream::Write ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] aafUInt32  dataSize,
[in, ref, size_is(dataSize)] aafMemPtr_t  pData 
)

Sequential access.

Copies the data in the given buffer into the stream at the current position of the stream..

Succeeds if all of the following are true:

  • the pStreamPropertyValue pointer is valid.
  • the pData pointer is valid.
  • the indicated bytes could be written to the stream.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • Either pStreamPropertyValue or pData arg is NULL.
Parameters:
pStreamPropertyValue[in] stream property value to modify
dataSize[in] number of bytes to write
pData[in, ref, size_is(dataSize)] buffer into which should contain one element to be written to the stream
HRESULT IAAFTypeDefStream::WriteElements ( [in] IAAFPropertyValue pStreamPropertyValue,
[in] IAAFTypeDef pElementType,
[in] aafUInt32  dataSize,
[in, ref, size_is(dataSize)] aafMemPtr_t  pData 
)

Access in typed chunks of Elements.

Copies the data in the given buffer into the stream at the current position of the stream. Requires that any structures declared within element typedef have had their offsets registered with that type..

Succeeds if all of the following are true:

  • the pStreamPropertyValue pointer is valid.
  • the pElementType pointer is valid.
  • the pData pointer is valid.
  • dataSize indicates pData is large enough to hold the data.
  • compile-time struct has had its member offests registered.
  • the indicated elements exist in this stream type def.

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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • either pStreamPropertyValue or pElementType or pData arg is NULL.

AAFRESULT_INVALID_PARAM

  • dataSize indicates pData is an even multiple of the given element type size.

AAFRESULT_NOT_REGISTERED

  • struct offsets have not yet been registered for the element typedef.
Parameters:
pStreamPropertyValue[in] stream property value to modify
pElementType[in] the type definition of the elements to read
dataSize[in] number of bytes to write (must be evenly divisible by the element type length)
pData[in, ref, size_is(dataSize)] buffer into which elements from the stream should be written

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