#include "Atomix.h"
#include "BltDefs.h"
#include "BltTypes.h"
#include "BltErrors.h"
#include "BltMedia.h"
#include "BltTime.h"
Go to the source code of this file.
Defines | |
| #define | BLT_MEDIA_PACKET_FLAG_START_OF_STREAM 0x01 |
| This flag indicates that this packet contains the start of a stream (the first byte of the payload must be the start of the stream, or the payload must be empty). | |
| #define | BLT_MEDIA_PACKET_FLAG_END_OF_STREAM 0x02 |
| This flag indicates that this packet contains the end of a stream (the last byte of the payload must be the end of the stream, or the payload must be empty). | |
| #define | BLT_MEDIA_PACKET_FLAG_STREAM_DISCONTINUITY 0x04 |
| This flag indicates that there has been a discontinuity in the stream (packet loss, or seek). | |
| #define | BLT_MEDIA_PACKET_FLAG_STREAM_METADATA 0x08 |
| This flag indicates that the payload of the packet represents stream metadata (such as a stream header). | |
Typedefs | |
| typedef struct BLT_MediaPacket | BLT_MediaPacket |
| Media Packet object. | |
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. | |
| typedef struct BLT_MediaPacket BLT_MediaPacket |
Media Packet object.
A media packet encapsulates a payload of media data and a data type. The object manages an internal memory buffer. The payload is a portion of the internal buffer.