AlignedFrame

AlignedFrame

A frame of aligned data that is passed to the rendering engine from the MediaReceiver. A DataFrame contains a time stamped frame of media, which might be video, audio and auxiliary data such as subtitles. A single DataFrame can contain one or multiple types of media. Which media types are included can be probed by nullptr-checking/size checking the data members. The struct has ownership of all data pointers included. The struct includes all logic for freeing the resources held by this struct and the user should therefore just make sure the struct itself is deallocated to ensure all resources are freed.

#include <AlignedFrame.h>

Public Types

Name
enum classCompressedVideoFormat { kAvc, kHevc}
enum classPixelFormat { kUnknown, kNv12, kP016, kUyvy, kRgba, kRgba64Le}
typedef std::array< float, 16 >AudioSampleRow
One audio sample in 16 channels.

Public Functions

Name
AlignedFrame() =default
~AlignedFrame() =default
AlignedFrame(AlignedFrame const & ) =delete
AlignedFrame &operator=(AlignedFrame const & ) =delete

Public Attributes

Name
int64_tmCaptureTimestamp
int64_tmRenderingTimestamp
std::shared_ptr< DeviceMemory >mVideoFrame
PixelFormatmPixelFormat
uint32_tmFrameRateN
uint32_tmFrameRateD
uint32_tmWidth
uint32_tmHeight
std::vector< AudioSampleRow >mAudioData
uint32_tmAudioChannels
uint32_tmAudioSamplingFrequency

Public Types Documentation

enum CompressedVideoFormat

EnumeratorValueDescription
kAvc
kHevc

enum PixelFormat

EnumeratorValueDescription
kUnknown
kNv12
kP016
kUyvy
kRgba
kRgba64Le

typedef AudioSampleRow

typedef std::array<float, 16> AlignedFrame::AudioSampleRow;

One audio sample in 16 channels.

Public Functions Documentation

function AlignedFrame

AlignedFrame() =default

function ~AlignedFrame

~AlignedFrame() =default

function AlignedFrame

AlignedFrame(
    AlignedFrame const & 
) =delete

function operator=

AlignedFrame & operator=(
    AlignedFrame const & 
) =delete

Public Attributes Documentation

variable mCaptureTimestamp

int64_t mCaptureTimestamp = 0;

The TAI timestamp in microseconds since the TAI epoch when this frame was captured by the ingest

variable mRenderingTimestamp

int64_t mRenderingTimestamp = 0;

The TAI timestamp in microseconds since the TAI epoch when this frame should be delivered to the rendering engine

variable mVideoFrame

std::shared_ptr< DeviceMemory > mVideoFrame = nullptr;

variable mPixelFormat

PixelFormat mPixelFormat = PixelFormat::kUnknown;

variable mFrameRateN

uint32_t mFrameRateN = 0;

variable mFrameRateD

uint32_t mFrameRateD = 0;

variable mWidth

uint32_t mWidth = 0;

variable mHeight

uint32_t mHeight = 0;

variable mAudioData

std::vector< AudioSampleRow > mAudioData;

variable mAudioChannels

uint32_t mAudioChannels = 0;

variable mAudioSamplingFrequency

uint32_t mAudioSamplingFrequency = 0;

Updated on 2022-11-17 at 15:40:06 +0100