Media_packet


Functions

BLT_Result BLT_MediaPacket_AddReference (BLT_MediaPacket *packet)
 Increase the reference counter of a packet.
BLT_Result BLT_MediaPacket_Release (BLT_MediaPacket *packet)
 Release a packet (decrement the reference counter).
BLT_Any BLT_MediaPacket_GetPayloadBuffer (BLT_MediaPacket *packet)
 Returns a pointer to the packet's payload buffer.
BLT_Result BLT_MediaPacket_SetPayloadWindow (BLT_MediaPacket *packet, BLT_Offset offset, BLT_Size size)
 Sets the packet's payload buffer to be a subset (window) of the actual memory buffer manages by the packet.
BLT_Size BLT_MediaPacket_GetPayloadSize (BLT_MediaPacket *packet)
 Returns the size of the packet's payload.
BLT_Result BLT_MediaPacket_SetPayloadSize (BLT_MediaPacket *packet, BLT_Size size)
 Sets the size of the packet's payload.
BLT_Size BLT_MediaPacket_GetAllocatedSize (BLT_MediaPacket *packet)
 Returns the size of the internal buffer (not the payload size).
BLT_Result BLT_MediaPacket_SetAllocatedSize (BLT_MediaPacket *packet, BLT_Size size)
 Sets the minimum size of the internal buffer.
BLT_Offset BLT_MediaPacket_GetPayloadOffset (BLT_MediaPacket *packet)
 Returns the offset of the payload from the beginning of the internal buffer.
BLT_Result BLT_MediaPacket_SetPayloadOffset (BLT_MediaPacket *packet, BLT_Offset offset)
 Sets the offset of the payload.
BLT_Result BLT_MediaPacket_GetMediaType (BLT_MediaPacket *packet, const BLT_MediaType **type)
 Returns the type of the media data in this packet.
BLT_Result BLT_MediaPacket_SetMediaType (BLT_MediaPacket *packet, const BLT_MediaType *type)
 Sets the type of the media data in this packet.
BLT_Result BLT_MediaPacket_SetTimeStamp (BLT_MediaPacket *packet, BLT_TimeStamp time_stamp)
 Sets the timestamp associated with this media packet.
BLT_TimeStamp BLT_MediaPacket_GetTimeStamp (BLT_MediaPacket *packet)
 Returns the time stamp associated with this media packet.
BLT_Time BLT_MediaPacket_GetDuration (BLT_MediaPacket *packet)
 Returns the duration of the media data in this packet.
BLT_Result BLT_MediaPacket_SetDuration (BLT_MediaPacket *packet, BLT_Time duration)
 Sets the duration of the media data in this packet.
BLT_Result BLT_MediaPacket_SetFlags (BLT_MediaPacket *packet, BLT_Flags flags)
 Sets to 1 some flags associated with this packet.
BLT_Result BLT_MediaPacket_ClearFlags (BLT_MediaPacket *packet, BLT_Flags flags)
 Clears (sets to 0) some flags associated with this packet.
BLT_Result BLT_MediaPacket_ResetFlags (BLT_MediaPacket *packet)
 Reset the flags associated with this packet.
BLT_Flags BLT_MediaPacket_GetFlags (BLT_MediaPacket *packet)
 Returns the flags associated with this packet.

Function Documentation

BLT_Result BLT_MediaPacket_ClearFlags ( BLT_MediaPacket packet,
BLT_Flags  flags 
)

Clears (sets to 0) some flags associated with this packet.

Parameters:
flags Flags to clear. All the bits set to 1 in this parameter value will clear (set to 0) the corresponding flag in the packet. All the bits set to zero will leave the corresponding packet flag unchanged.
See also:
Media Packet Flags

BLT_Time BLT_MediaPacket_GetDuration ( BLT_MediaPacket packet  ) 

Returns the duration of the media data in this packet.

The duration has a zero value if the duration of the data in this packet is not known or cannot be established.

BLT_Flags BLT_MediaPacket_GetFlags ( BLT_MediaPacket packet  ) 

Returns the flags associated with this packet.

See also:
Media Packet Flags

BLT_Result BLT_MediaPacket_GetMediaType ( BLT_MediaPacket packet,
const BLT_MediaType **  type 
)

Returns the type of the media data in this packet.

Parameters:
type Pointer to a pointer that will, upon return, point to a BLT_MediaType structure representing the type information.

BLT_Result BLT_MediaPacket_ResetFlags ( BLT_MediaPacket packet  ) 

Reset the flags associated with this packet.

All the packet flags will be set to 0.

See also:
Media Packet Flags

BLT_Result BLT_MediaPacket_SetAllocatedSize ( BLT_MediaPacket packet,
BLT_Size  size 
)

Sets the minimum size of the internal buffer.

Parameters:
size Size of the internal buffer.

BLT_Result BLT_MediaPacket_SetDuration ( BLT_MediaPacket packet,
BLT_Time  duration 
)

Sets the duration of the media data in this packet.

Parameters:
duration Duration of the media data.

BLT_Result BLT_MediaPacket_SetFlags ( BLT_MediaPacket packet,
BLT_Flags  flags 
)

Sets to 1 some flags associated with this packet.

Parameters:
flags Flags to set. All the bits set to 1 in this parameter value will set the corresponding flag in the packet to 1. All the bits set to zero will leave the corresponding packet flag unchanged.
See also:
Media Packet Flags

BLT_Result BLT_MediaPacket_SetMediaType ( BLT_MediaPacket packet,
const BLT_MediaType *  type 
)

Sets the type of the media data in this packet.

This method makes an internal copy of the media type structure.

Parameters:
type Pointer to a BLT_MediaType structure representing the type information.

BLT_Result BLT_MediaPacket_SetPayloadOffset ( BLT_MediaPacket packet,
BLT_Offset  offset 
)

Sets the offset of the payload.

Parameters:
offset Offset in bytes of the payload from the beginning of the internal buffer.

BLT_Result BLT_MediaPacket_SetPayloadSize ( BLT_MediaPacket packet,
BLT_Size  size 
)

Sets the size of the packet's payload.

Parameters:
size Size in bytes of the payload. The internal buffer may be reallocated if the current buffer is too small to accomodate the requested size.

BLT_Result BLT_MediaPacket_SetPayloadWindow ( BLT_MediaPacket packet,
BLT_Offset  offset,
BLT_Size  size 
)

Sets the packet's payload buffer to be a subset (window) of the actual memory buffer manages by the packet.

Parameters:
offset Offset in bytes from the beginning of the internal buffer to the packet's payload.
size Size in bytes of the packet's payload.

BLT_Result BLT_MediaPacket_SetTimeStamp ( BLT_MediaPacket packet,
BLT_TimeStamp  time_stamp 
)

Sets the timestamp associated with this media packet.

Parameters:
time_stamp Time stamp to associate with the packet.