AV module

PlanarVideoPacket

Video packet for planar formats.

PlanarVideoPacket

#include <icy/av/packet.h>

Inherits: VideoPacket

Video packet for planar formats.

Parameters

  • data Array of per-plane data pointers (up to 4 planes).

  • linesize Array of per-plane byte strides.

  • pixelFmt The pixel format name (e.g. "yuv420p").

  • width The frame width in pixels.

  • height The frame height in pixels.

  • time The timestamp in microseconds.

Public Attributes

ReturnNameDescription
uint8_t *buffer
intlinesize
std::stringpixelFmt
boolowns_buffer
AVFrame *avframeNon-owning pointer to the decoded AVFrame from FFmpeg. Set by VideoDecoder.

buffer

uint8_t * buffer = {nullptr}

linesize

int linesize = {0}

pixelFmt

std::string pixelFmt

owns_buffer

bool owns_buffer = false

avframe

AVFrame * avframe = nullptr

Non-owning pointer to the decoded AVFrame from FFmpeg. Set by VideoDecoder.

Public Methods

ReturnNameDescription
PlanarVideoPacketConstruct a planar video packet, copying the plane pointers (not the pixel data).
PlanarVideoPacketCopy 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.

PlanarVideoPacket

PlanarVideoPacket(uint8_t * data, const int linesize, const std::string & pixelFmt, int width, int height, int64_t time)

Construct a planar video packet, copying the plane pointers (not the pixel data).

Parameters

  • data Array of up to 4 per-plane data pointers.

  • linesize Array of per-plane byte strides.

  • pixelFmt The pixel format string (e.g. "yuv420p").

  • width Frame width in pixels.

  • height Frame height in pixels.

  • time Presentation timestamp in microseconds.


PlanarVideoPacket

PlanarVideoPacket(const PlanarVideoPacket & 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.