Murl::Util::EvictableVideoSurface Class Reference

The evictable video surface class, see IVideoSurface. More...

#include "murl_util_evictable_video_surface.h"

Inheritance diagram for Murl::Util::EvictableVideoSurface:

Public Member Functions

 EvictableVideoSurface (UInt32 pixelSizeX, UInt32 pixelSizeY)
 Constructor creating a surface of specified dimension. More...
 
 EvictableVideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY)
 Constructor creating a surface of specified pixel format and dimension. More...
 
 ~EvictableVideoSurface () override
 The destructor.
 
const MutableDataGetMutablePixels () override
 Implementation of IVideoSurface::GetMutablePixels(). More...
 
Bool Evict () override
 Implementation of IVideoSurface::Evict(). More...
 
Bool Restore () override
 Implementation of IVideoSurface::Restore(). More...
 
Bool FlipX () override
 Implementation of IVideoSurface::FlipX(). More...
 
Bool FlipY () override
 Implementation of IVideoSurface::FlipY(). More...
 
Bool Blit (const IVideoSurface *source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY) override
 Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY). More...
 
Bool BlitScaled (const IVideoSurface *source, const IVideoScaler *scaler=nullptr, Real gamma=1.0f) override
 Implementation of IVideoSurface::BlitScaled(). More...
 
Bool Clear (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &clearColor) override
 Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor). More...
 
Bool GaussBlur (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength) override
 Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength). More...
 
Bool Dither (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits) override
 Implementation of IVideoSurface::Dither(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits). More...
 
Bool ApplyMatteFringe (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 matteFringe, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteFringe(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 matteFringe, Real matteThreshold = 0). More...
 
Bool ApplyMatteColor (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &matteColor, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteColor(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0). More...
 
Bool RenderText (const IFont *font, const String &text, const Color &textColor, const Color &backgroundColor, Bool clearSurface, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, IEnums::TextAlignmentX alignX, IEnums::TextAlignmentY alignY) override
 Implementation of IVideoSurface::RenderText(). More...
 
- Public Member Functions inherited from Murl::Util::VideoSurface
 VideoSurface ()
 The default constructor. More...
 
 VideoSurface (UInt32 pixelSizeX, UInt32 pixelSizeY)
 Constructor creating a surface of specified dimension. More...
 
 VideoSurface (UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine)
 Constructor creating a surface of specified dimension, with given line pitch. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY)
 Constructor creating a surface of specified pixel format and dimension. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine)
 Constructor creating a surface of specified pixel format and dimension, with given line pitch. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, MutableData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine, MutableData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const ConstData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
 VideoSurface (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 bytesPerLine, const ConstData &sourceData)
 Constructor creating a surface of specified pixel format and dimension with given source data. More...
 
 ~VideoSurface () override
 The destructor.
 
IVideoSurfaceClone (IEnums::PixelFormat pixelFormat) const override
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat). More...
 
IVideoSurfaceClone (UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=nullptr, Real gamma=1.0f) const override
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, const IVideoScaler* scaler = 0). More...
 
IVideoSurfaceClone (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler *scaler=nullptr, Real gamma=1.0f) const override
 Implementation of IVideoSurface::Clone(IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY, const IVideoScaler* scaler). More...
 
IVideoSurfaceCloneRotated (IEnums::Orientation orientation) const override
 Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation). More...
 
IVideoSurfaceCloneRotated (IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat) const override
 Implementation of IVideoSurface::CloneRotated(IEnums::Orientation orientation, IEnums::PixelFormat pixelFormat). More...
 
IVideoSurfaceCloneFrame (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY) const override
 Implementation of IVideoSurface::CloneFrame(). More...
 
UInt32 GetPixelSizeX () const override
 Implementation of IVideoSurface::GetPixelSizeX(). More...
 
UInt32 GetPixelSizeY () const override
 Implementation of IVideoSurface::GetPixelSizeY(). More...
 
UInt32 GetBytesPerPixel () const override
 Implementation of IVideoSurface::GetBytesPerPixel(). More...
 
UInt32 GetBytesPerLine () const override
 Implementation of IVideoSurface::GetBytesPerLine(). More...
 
IEnums::PixelFormat GetPixelFormat () const override
 Implementation of IVideoSurface::GetPixelFormat(). More...
 
const ConstDataGetPixels () const override
 Implementation of IVideoSurface::GetPixels(). More...
 
const MutableDataGetMutablePixels () override
 Implementation of IVideoSurface::GetMutablePixels(). More...
 
Color GetPixel (SInt32 positionX, SInt32 positionY) const override
 Implementation of IVideoSurface::GetPixel(). More...
 
Bool SetPixel (SInt32 positionX, SInt32 positionY, const Color &color) override
 Implementation of IVideoSurface::SetPixel(). More...
 
Bool FlipX () override
 Implementation of IVideoSurface::FlipX(). More...
 
Bool FlipY () override
 Implementation of IVideoSurface::FlipY(). More...
 
Bool Blit (const IVideoSurface *source, SInt32 destPositionX, SInt32 destPositionY) override
 Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 destPositionX, SInt32 destPositionY). More...
 
Bool Blit (const IVideoSurface *source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY) override
 Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY). More...
 
Bool BlitScaled (const IVideoSurface *source, const IVideoScaler *scaler=nullptr, Real gamma=1.0f) override
 Implementation of IVideoSurface::BlitScaled(). More...
 
Bool Clear (const Color &clearColor) override
 Implementation of IVideoSurface::Clear(const Color& clearColor). More...
 
Bool Clear (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &clearColor) override
 Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor). More...
 
Bool GaussBlur (Real strength) override
 Implementation of IVideoSurface::GaussBlur(Real strength). More...
 
Bool GaussBlur (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength) override
 Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength). More...
 
Bool Dither (UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits) override
 Implementation of IVideoSurface::Dither(UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits). More...
 
Bool Dither (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits) override
 Implementation of IVideoSurface::Dither(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits). More...
 
Bool ApplyMatteFringe (UInt32 matteFringe, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteFringe(const Color& matteColor, Real matteThreshold = 0). More...
 
Bool ApplyMatteFringe (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 matteFringe, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteFringe(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0). More...
 
Bool ApplyMatteColor (const Color &matteColor, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteColor(const Color& matteColor, Real matteThreshold = 0). More...
 
Bool ApplyMatteColor (SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color &matteColor, Real matteThreshold=0) override
 Implementation of IVideoSurface::ApplyMatteColor(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0). More...
 
Bool RenderText (const IFont *font, const String &text, const Color &textColor, const Color &backgroundColor, Bool clearSurface, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, IEnums::TextAlignmentX alignX, IEnums::TextAlignmentY alignY) override
 Implementation of IVideoSurface::RenderText(). More...
 
Bool IsColumnEmpty (UInt32 column, Real threshold) const override
 Implementation of IVideoSurface::IsColumnEmpty(). More...
 
Bool IsRowEmpty (UInt32 row, Real threshold) const override
 Implementation of IVideoSurface::IsRowEmpty(). More...
 
SInt32 ClipSizeXRight (SInt32 positionX, SInt32 sizeX) const override
 Implementation of IVideoSurface::ClipSizeXRight(). More...
 
SInt32 ClipSizeYBottom (SInt32 positionY, SInt32 sizeY) const override
 Implementation of IVideoSurface::ClipSizeYBottom(). More...
 
Bool Evict () override
 Implementation of IVideoSurface::Evict(). More...
 
Bool Restore () override
 Implementation of IVideoSurface::Restore(). More...
 
void CollectObjectStatistics (IObjectStatistics *stat) const override
 Implementation of IStatisticsObject::CollectObjectStatistics(). More...
 
- Public Member Functions inherited from Murl::IVideoSurface
 ~IVideoSurface () override
 The destructor.
 
- Public Member Functions inherited from Murl::NonCopyable
 NonCopyable ()=default
 The default constructor.
 

Additional Inherited Members

- Protected Attributes inherited from Murl::Util::VideoSurface
UInt32 mSizeX
 The pixel width.
 
UInt32 mSizeY
 The pixel height.
 
IEnums::PixelFormat mPixelFormat
 The pixel format.
 
UInt32 mBytesPerLine
 The number of bytes per line.
 
Data mData
 The own surface data, if specified via constructor.
 
ConstData mConstData
 The actually visible constant surface data store.
 
MutableData mMutableData
 The actually visible mutable surface data store, if possible.
 

Detailed Description

The evictable video surface class, see IVideoSurface.

Constructor & Destructor Documentation

◆ EvictableVideoSurface() [1/2]

Murl::Util::EvictableVideoSurface::EvictableVideoSurface ( UInt32  pixelSizeX,
UInt32  pixelSizeY 
)

Constructor creating a surface of specified dimension.

Creates a surface with pixel format IEnums::PIXEL_FORMAT_R8_G8_B8_A8.

Parameters
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.

◆ EvictableVideoSurface() [2/2]

Murl::Util::EvictableVideoSurface::EvictableVideoSurface ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY 
)

Constructor creating a surface of specified pixel format and dimension.

Parameters
pixelFormatThe pixel format.
pixelSizeXThe number of horizontal pixels.
pixelSizeYThe number of vertical pixels.

Member Function Documentation

◆ GetMutablePixels()

const MutableData& Murl::Util::EvictableVideoSurface::GetMutablePixels ( )
overridevirtual

Implementation of IVideoSurface::GetMutablePixels().

Returns
The mutable data object which is holding the pixels.

Implements Murl::IVideoSurface.

◆ Evict()

Bool Murl::Util::EvictableVideoSurface::Evict ( )
overridevirtual

Implementation of IVideoSurface::Evict().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Restore()

Bool Murl::Util::EvictableVideoSurface::Restore ( )
overridevirtual

Implementation of IVideoSurface::Restore().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ FlipX()

Bool Murl::Util::EvictableVideoSurface::FlipX ( )
overridevirtual

Implementation of IVideoSurface::FlipX().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ FlipY()

Bool Murl::Util::EvictableVideoSurface::FlipY ( )
overridevirtual

Implementation of IVideoSurface::FlipY().

Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Blit()

Bool Murl::Util::EvictableVideoSurface::Blit ( const IVideoSurface source,
SInt32  sourcePositionX,
SInt32  sourcePositionY,
SInt32  destPositionX,
SInt32  destPositionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY 
)
overridevirtual

Implementation of IVideoSurface::Blit(const IVideoSurface* source, SInt32 sourcePositionX, SInt32 sourcePositionY, SInt32 destPositionX, SInt32 destPositionY, UInt32 pixelSizeX, UInt32 pixelSizeY).

Parameters
sourceThe source surface.
sourcePositionXThe source x-position.
sourcePositionYThe source y-position.
destPositionXThe destination x-position.
destPositionYThe destination y-position.
pixelSizeXThe number of horizontal pixels to copy.
pixelSizeYThe number of vertical pixels to copy.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ BlitScaled()

Bool Murl::Util::EvictableVideoSurface::BlitScaled ( const IVideoSurface source,
const IVideoScaler scaler = nullptr,
Real  gamma = 1.0f 
)
overridevirtual

Implementation of IVideoSurface::BlitScaled().

Parameters
sourceThe source surface.
scalerPointer to a scaler object or null to scale using the BoxVideoScaler.
gammaThe gamma value used during scaling.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Clear()

Bool Murl::Util::EvictableVideoSurface::Clear ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
const Color clearColor 
)
overridevirtual

Implementation of IVideoSurface::Clear(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& clearColor).

Parameters
positionXThe source x-position of the region.
positionYThe source y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
clearColorThe clear color to apply.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ GaussBlur()

Bool Murl::Util::EvictableVideoSurface::GaussBlur ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
Real  strength 
)
overridevirtual

Implementation of IVideoSurface::GaussBlur(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, Real strength).

Parameters
positionXThe x-position of the region.
positionYThe y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
strengthThe blur filter strength.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ Dither()

Bool Murl::Util::EvictableVideoSurface::Dither ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  redBits,
UInt32  greenBits,
UInt32  blueBits,
UInt32  alphaBits 
)
overridevirtual

Implementation of IVideoSurface::Dither(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 redBits, UInt32 greenBits, UInt32 blueBits, UInt32 alphaBits).

Parameters
positionXThe x-position of the region.
positionYThe y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
redBitsThe number of significant bits for the red component.
greenBitsThe number of significant bits for the green component.
blueBitsThe number of significant bits for the blue component.
alphaBitsThe number of significant bits for the alpha component.
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ ApplyMatteFringe()

Bool Murl::Util::EvictableVideoSurface::ApplyMatteFringe ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
UInt32  matteFringe,
Real  matteThreshold = 0 
)
overridevirtual

Implementation of IVideoSurface::ApplyMatteFringe(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, UInt32 matteFringe, Real matteThreshold = 0).

Parameters
positionXThe source x-position of the region.
positionYThe source y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
matteFringeThe matte fringe size to apply.
matteThresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ ApplyMatteColor()

Bool Murl::Util::EvictableVideoSurface::ApplyMatteColor ( SInt32  positionX,
SInt32  positionY,
UInt32  pixelSizeX,
UInt32  pixelSizeY,
const Color matteColor,
Real  matteThreshold = 0 
)
overridevirtual

Implementation of IVideoSurface::ApplyMatteColor(SInt32 positionX, SInt32 positionY, UInt32 pixelSizeX, UInt32 pixelSizeY, const Color& matteColor, Real matteThreshold = 0).

Parameters
positionXThe source x-position of the region.
positionYThe source y-position of the region.
pixelSizeXThe number of horizontal pixels of the region.
pixelSizeYThe number of vertical pixels of the region.
matteColorThe matte color to apply.
matteThresholdThe alpha threshold in range [0.0 .. 1.0].
Returns
true if successful.

Implements Murl::IVideoSurface.

◆ RenderText()

Bool Murl::Util::EvictableVideoSurface::RenderText ( const IFont font,
const String text,
const Color textColor,
const Color backgroundColor,
Bool  clearSurface,
Bool  enableWordWrap,
Real  containerPosX,
Real  containerPosY,
Real  containerSizeX,
Real  containerSizeY,
IEnums::TextAlignmentX  alignX,
IEnums::TextAlignmentY  alignY 
)
overridevirtual

Implementation of IVideoSurface::RenderText().

Parameters
fontThe font used for rendering.
textThe text to render.
textColorThe text color to render.
backgroundColorThe text background color to render.
clearSurfaceIf true, the output surface is cleared before rendering.
enableWordWrapIf true, word wrapping is enabled.
containerPosXThe horizontal text position in the video stream.
containerPosYThe vertical text position in the video stream.
containerSizeXThe horizontal size of the text rectangle, or 0 if the video stream's X size should be used
containerSizeYThe vertical size of the text rectangle, or 0 if the video stream's Y size should be used
alignXThe horizontal text alignment.
alignYThe vertical text alignment.
Returns
true if successful.

Implements Murl::IVideoSurface.


The documentation for this class was generated from the following file:
  • murl_util_evictable_video_surface.h


Copyright © 2011-2024 Spraylight GmbH.