AV module

MediaPacket

Timestamped media packet carrying raw audio or video data.

MediaPacket

#include <icy/av/packet.h>

Inherits: RawPacket Subclassed by: AudioPacket, VideoPacket

Timestamped media packet carrying raw audio or video data.

Public Attributes

ReturnNameDescription
int64_ttimePresentation timestamp in microseconds.

time

int64_t time

Presentation timestamp in microseconds.

Public Methods

ReturnNameDescription
MediaPacket inlineConstruct with a non-owning or owning mutable buffer.
MediaPacket inlineConstruct with const data (copied, owning).
MediaPacket inlineCopy constructor.
std::unique_ptr< IPacket >clone virtual const inline#### Returns
const char *className virtual const inlineReturns the class name of this packet type for logging and diagnostics.

MediaPacket

inline

inline MediaPacket(uint8_t * data, size_t size, int64_t time)

Construct with a non-owning or owning mutable buffer.

Parameters

  • data Pointer to the raw data buffer (may be null).

  • size Size of the buffer in bytes.

  • time Presentation timestamp in microseconds.


MediaPacket

inline

inline MediaPacket(const uint8_t * data, size_t size, int64_t time)

Construct with const data (copied, owning).

Parameters

  • data Pointer to the const raw data buffer (data is copied).

  • size Size of the buffer in bytes.

  • time Presentation timestamp in microseconds.


MediaPacket

inline

inline MediaPacket(const MediaPacket & r)

Copy constructor.


clone

virtual const inline

virtual inline std::unique_ptr< IPacket > clone() const

Returns

A heap-allocated copy of this packet.


className

virtual const inline

virtual inline const char * className() const

Returns the class name of this packet type for logging and diagnostics.