AV module

PlanarAudioPacket

Audio packet for planar formats.

PlanarAudioPacket

#include <icy/av/packet.h>

Inherits: AudioPacket

Audio packet for planar formats.

Parameters

  • data Array of per-plane sample buffers (one per channel).

  • channels The number of audio channels.

  • numSamples The number of samples per channel.

  • sampleFmt The sample format name (e.g. "fltp").

  • time The timestamp in microseconds.

Public Attributes

ReturnNameDescription
uint8_t *buffer
intlinesize
intchannels
std::stringsampleFmt
boolowns_buffer

buffer

uint8_t * buffer = {nullptr}

linesize

int linesize = 0

channels

int channels = 0

sampleFmt

std::string sampleFmt

owns_buffer

bool owns_buffer = false

Public Methods

ReturnNameDescription
PlanarAudioPacketConstruct a planar audio packet, copying the plane pointers (not the sample data).
PlanarAudioPacketCopy constructor. Performs a deep copy of the owned buffer if owns_buffer is set.
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.

PlanarAudioPacket

PlanarAudioPacket(uint8_t * data, int channels, size_t numSamples, const std::string & sampleFmt, int64_t time)

Construct a planar audio packet, copying the plane pointers (not the sample data).

Parameters

  • data Array of up to 4 per-channel sample buffers.

  • channels Number of audio channels.

  • numSamples Number of samples per channel.

  • sampleFmt The sample format string (e.g. "fltp").

  • time Presentation timestamp in microseconds.


PlanarAudioPacket

PlanarAudioPacket(const PlanarAudioPacket & r)

Copy constructor. Performs a deep copy of the owned buffer if owns_buffer is set.


clone

virtual const inline

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

Returns

A heap-allocated deep 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.