Video Effects SDK 2.6.0.118490
AI-powered SDK for real-time video enhancement.
Loading...
Searching...
No Matches
tsvb::IFrame Class Referenceabstract

Video frame. More...

#include <vb_sdk/frame.h>

Inheritance diagram for tsvb::IFrame:
[legend]

Public Member Functions

virtual int frameFormat () const =0
 Returns the format of data, one of FrameFormat values.
virtual unsigned int width () const =0
 Returns the number of pixels in horizontal direction.
virtual unsigned int height () const =0
 Returns the number of pixels in vertical direction.
virtual Rotation rotation () const =0
 Returns rotation of the frame content.
virtual void setRotation (Rotation rotation)=0
 Sets rotation of the frame content.
virtual ColorRange colorRange () const =0
 Returns the range of the Y'CbCr values. See setColorRange().
virtual void setColorRange (ColorRange range)=0
 Sets the range of the Y'CbCr values of an NV12 frame.
virtual ColorMatrix colorMatrix () const =0
 Returns the matrix of the Y'CbCr values. See setColorMatrix().
virtual void setColorMatrix (ColorMatrix matrix)=0
 Sets the matrix that turns the Y'CbCr values of an NV12 frame into R'G'B'.
virtual ILockedFrameData * lock (int frameLock)=0
 Gets access to the frame data in process memory.
virtual void * getInterface (InterfaceTypeID interfaceTypeID)=0
 Returns a platform-specific interface.
Public Member Functions inherited from tsvb::IRelease
virtual void release ()=0
 Releases the memory that was allocated for the object.

Detailed Description

Video frame.

Create frames with IFrameFactory.

Not thread-safe: don't use a frame from several threads at once.

Member Function Documentation

◆ colorMatrix()

virtual ColorMatrix tsvb::IFrame::colorMatrix ( ) const
pure virtual

Returns the matrix of the Y'CbCr values. See setColorMatrix().

◆ colorRange()

virtual ColorRange tsvb::IFrame::colorRange ( ) const
pure virtual

Returns the range of the Y'CbCr values. See setColorRange().

◆ frameFormat()

virtual int tsvb::IFrame::frameFormat ( ) const
pure virtual

Returns the format of data, one of FrameFormat values.

◆ getInterface()

virtual void * tsvb::IFrame::getInterface ( InterfaceTypeID interfaceTypeID)
pure virtual

Returns a platform-specific interface.

IFrame supports IAppleCompatFrame on Apple platforms, pass InterfaceTypeID::appleCompatFrame to get it. Cast the returned pointer with reinterpret_cast. The returned object is owned by the frame, don't release it.

Parameters
interfaceTypeIDSee InterfaceTypeID.
Returns
Pointer to the interface, or nullptr if it is not supported.

◆ height()

virtual unsigned int tsvb::IFrame::height ( ) const
pure virtual

Returns the number of pixels in vertical direction.

◆ lock()

virtual ILockedFrameData * tsvb::IFrame::lock ( int frameLock)
pure virtual

Gets access to the frame data in process memory.

Don't use the IFrame until the returned ILockedFrameData is released. With FrameLock::write or FrameLock::readWrite, may block for a while if the frame is in use by a pipeline.

Parameters
frameLockOne of FrameLock values: FrameLock::read, FrameLock::write or FrameLock::readWrite.
Returns
An instance of ILockedFrameData, or nullptr on failure. The caller is responsible for releasing it.
Warning
On Apple platforms, don't lock for writing from a handler added with addCompletedHandler: or addScheduledHandler: of an MTLCommandBuffer: the lock may wait for a pipeline's GPU work, and Metal may run the handlers of all command queues one at a time.

◆ rotation()

virtual Rotation tsvb::IFrame::rotation ( ) const
pure virtual

Returns rotation of the frame content.

◆ setColorMatrix()

virtual void tsvb::IFrame::setColorMatrix ( ColorMatrix matrix)
pure virtual

Sets the matrix that turns the Y'CbCr values of an NV12 frame into R'G'B'.

BT.601 by default. For a CVPixelBuffer frame see IAppleCompatFrameFactory::createFrameWithCVPixelBuffer().

Parameters
matrixOne of ColorMatrix values.

◆ setColorRange()

virtual void tsvb::IFrame::setColorRange ( ColorRange range)
pure virtual

Sets the range of the Y'CbCr values of an NV12 frame.

Video range by default. For a CVPixelBuffer frame see IAppleCompatFrameFactory::createFrameWithCVPixelBuffer().

Parameters
rangeOne of ColorRange values.

◆ setRotation()

virtual void tsvb::IFrame::setRotation ( Rotation rotation)
pure virtual

Sets rotation of the frame content.

Parameters
rotationOne of Rotation values.

◆ width()

virtual unsigned int tsvb::IFrame::width ( ) const
pure virtual

Returns the number of pixels in horizontal direction.


The documentation for this class was generated from the following file: