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>
Name | |
---|---|
AlignedFrame() =default | |
~AlignedFrame() =default | |
AlignedFrame(AlignedFrame const & ) =delete | |
AlignedFrame & | operator=(AlignedFrame const & ) =delete |
std::shared_ptr< AlignedFrame > | makeShallowCopy() const Make a shallow copy of this AlignedFrame (video and audio pointers will point to the same video and audio memory buffers as in the frame copied from) |
Name | |
---|---|
int64_t | mCaptureTimestamp |
int64_t | mRenderingTimestamp |
std::shared_ptr< DeviceMemory > | mVideoFrame |
PixelFormat | mPixelFormat |
uint32_t | mFrameRateN |
uint32_t | mFrameRateD |
uint32_t | mWidth |
uint32_t | mHeight |
AlignedAudioFramePtr | mAudioFrame |
uint32_t | mAudioSamplingFrequency |
AlignedFrame() =default
~AlignedFrame() =default
AlignedFrame(
AlignedFrame const &
) =delete
AlignedFrame & operator=(
AlignedFrame const &
) =delete
std::shared_ptr< AlignedFrame > makeShallowCopy() const
Make a shallow copy of this AlignedFrame (video and audio pointers will point to the same video and audio memory buffers as in the frame copied from)
Return: A pointer to a new frame, which is a shallow copy of the old one, pointing to the same video and audio memory buffers
int64_t mCaptureTimestamp = 0;
The TAI timestamp in microseconds since the TAI epoch when this frame was captured by the ingest
int64_t mRenderingTimestamp = 0;
The TAI timestamp in microseconds since the TAI epoch when this frame should be delivered to the rendering engine
std::shared_ptr< DeviceMemory > mVideoFrame = nullptr;
PixelFormat mPixelFormat = PixelFormat::kUnknown;
uint32_t mFrameRateN = 0;
uint32_t mFrameRateD = 0;
uint32_t mWidth = 0;
uint32_t mHeight = 0;
AlignedAudioFramePtr mAudioFrame = nullptr;
uint32_t mAudioSamplingFrequency = 0;
Updated on 2024-04-08 at 15:15:27 +0200